A new algorithm for learning control of repetitive motion is described and experimental results are reported. At each sampling time, the control input is modified so as to minimize the cost function of predicted future errors. This algorithm is very practical because: (1) the algorithm can be easily implemented on a personal computer or a microprocessor since simple calculations are used, (2) existing controllers can be used without modification, (3) the learning converges very quickly, (4) no identification is required other than measuring the step response of the system. Experimental results on a DC servomotor showed that tracking errors were reduced to within ±1 pulse after only four attempts. In addition, the servomotor accurately followed the reference input of which the frequency was five times as high as the bandwidth of the original position control system.