Implement open-loop predictive control, which uses optimization to predict optimal input/state trajectories a certain amount of time into the future.

Link to Github here.