In this thesis, the problems of generating and optimizing motor behaviors for both simulated and real, physical robots have been investigated, using the paradigms of evolutionary robotics and behavior-based robotics. Specifically, three main topics have been considered: (1) On-line evolutionary optimization of hand-coded gaits for real, physical bipedal robots. The evolved gaits significantly outperformed the hand-coded gaits, reaching up to 65% higher speed. (2) Evolution of bipedal gait controllers in simulators. First, linear genetic programming was used with two different simulated bipedal robots. In both these cases, the gait controller was evolved starting from programs consisting of random sequences of basic instructions. The best ev...