This paper presents a new method to compensate for nonlinearity in machine control. The method uses a recurrent neural network as a servo controller with a feedback loop. The recurrent neural network has dynamic characteristics and can express functions which depend on time. It is necessary to determine appropriate interconnection weights of the network. The approach proposed applies the genetic algorithm to determine the interconnection weights of the recurrent neural networks. This approach does not need the teaching signals. The proposed method is applied to compensate for nonlinear backlash in machine control. Simulations illustrate the performance of the proposed approach.