The generation of a complete robotic brain for locomotion based on the utility function (UF) method for behavioral organization is demonstrated. A simulated, single-legged hopping robot is considered, and a two-stage process is used for generating the robotic brain. First, individual behaviors are constructed through artificial evolution of recurrent neural networks (RNNs). Thereafter, a behavioral organizer is generated through evolutionary optimization of utility functions. Two systems are considered: a simplified model with trivial dynamics, as well as a model using full newtonian dynamics. In both cases, the UF method was able to generate an adequate behavioral organizer, which allowed the robot to perform its primary task of moving through an arena, while avoiding collisions with obstacles and keeping the batteries sufficiently charged. The results for the simplified model were better than those for the dynamical model, a fact that could be attributed to the poor performance of the individual behaviors (implemented as RNNs) during extended operation. [ABSTRACT FROM AUTHOR]