This paper presents a model of a three-joint (four links) carangiform fish robot. The smooth gait or smooth motion of a fish robot is optimized by using a combination of the Genetic Algorithm (GA) and the Hill Climbing Algorithm (HCA) with respect to its dynamic system. Genetic algorithm is used to create an initial set of optimal parameters for the two input torque functions of the system. This set is then optimized by using HCA to ensure that the final set of optimal parameters is a “near” global optimization result. Finally, the simulation results are presented in order to demonstrate that the proposed method is effective.