The optimal values of the five feedback gains of a double-loop controller for the speed control of an overcentred variable-displacement hydraulic motor are experimentally determined by using genetic algorithms. The reciprocal of the criterion of integration of time multiplied by absolute error is proposed as the fitness function that evaluates the performance of the control. The appropriate specification of the genetic algorithms and the search range of each control gain for the speed control system are presented. It is found that the near-optimal values of the feedback gains can be obtained within ten generations, which corresponds to about 100 experiments. The optimal gains are also obtained when the inertia or the supply pressure is varied. Optimized feedback gains are confirmed by plotting the fitness function in a given gain space. The fitness distribution indicates that finding the optimal feedback gains by manual tuning is an extremely time-consuming task, and that the genetic algorithm is an efficient scheme economizing time and labour, in optimizing feedback gains for hydraulic servo systems.