Determining gait patterns with low energy consumption per distance traveled are important for increasing robots operation range. These gait patterns, a function of the robot's speed and structure, are generally determined by optimization processes. In contrast to previous studies that examined the energy consumption of several gait patterns at specific travel velocities, this study presents an optimization process that determines the optimal gait pattern for a range of velocities. In the first part of the study, three optimization methods are compared - The genetic algorithm, the radial-basis function method and the Nelder-Mead simplex. Results indicated that the preferred optimization method is genetic algorithm. In the second part of the study, we reduced the number of optimization variables, using constraints that represent known gait patterns. This led to a reduction of approximately 50% in optimization runtime, while maintaining similar energy consumption per distance as achieved in the first part of the study.