I used to work on this stuff.[1] Raibert's insight was that balance dominates gait. My insight was that slip control dominates balance. On flat surfaces, slip control isn't a big issue, but on hills, it dominates the problem.
Here's a simple example of a two-point boundary value problem. Suppose you want to accelerate an stationary object so that at time T1 it has velocity V1 and position P1. Your only controllable variable is acceleration, but you can change that over time. No constant acceleration will do this. You're going to need a changing acceleration. For this particular problem, there are closed-form solutions. Look up "shooting method" for how to solve this in general.
An appropriate use of machine learning here would be to correct for small errors. You can calculate an idealized solution from the dynamics, and when you use it on a real robot, it will probably be somewhat off. That's when it's appropriate to use machine learning, or at least hill-climbing, to tweak the tuning parameters until it's on target.
Obligatory Freefall: [2]
[1] https://www.youtube.com/watch?v=kc5n0iTw-NU [2] http://freefall.purrsia.com/ff2900/fc02895.htm