Gradient Boosting Implementation Python Snake