The calculation of the optimal trajectory of the stepped top-down robot was made using a genetic algorithm and a computational torque controller. First, the total energy efficiency was minimized using the Red-Cold Generic Algorithm (RCGA) consisting of reproductive, cross, and mutation. The reproducibility condition related to the position assembly of the start and end of the stride and the joints, angles, and angular velocities are linear constraints. Next, the unequal constraint accompanies the condition for preventing the collision of the swing leg at the corner with the outer surface of the stairs, the condition of the knee joint for preventing kinematic peculiarity, and the condition of no moment in safety in the traveling direction. Finally, the angular trajectory of each joint is defined by fourth-order polynomial whose coefficient is to approximate chromosomes. This is to approximate walking. In this study, the energy efficiency of the optimal trajectory was analyzed by computer simulation through a biped robot with seven degrees of freedom composed of seven links.