One challenging task in the field of robotics is to develop walking behaviors for humanoid and animal-like legged robots. The walking behavior of the robot is produced by a computer-based controller that is constantly analyzing inputs provided by sensors and issuing appropriate commands for the actuators that control the robot. Solving this problem with traditional control engineering strategies, such as Optimal Control, demands formulating a mathematical description of the process to be controlled. As technology evolves and robots get increasingly complex, developing mathematical models that describe the motion dynamics of legged robots is by itself a daunting task. One widely adopted alternative to traditional control techniques is to resort to model-free approaches, such as evolutionary algorithms.

This chapter describes a step by step description of how to apply an evolutionary algorithm to solve this problem. The presentation is complemented with pseudocode, graphs, and Python code.