Solving the Locomotion Problem