A new learning paradigm which employs a natural aversive stimulus, tightly constrains learned behavior and demonstrates learning in individual animals is described. Locusts were restrained so that only the femoro-tibial joint of a single metathoracic leg was free to move. Animals were required to maintain a particular range of femoro-tibial joint angle to avoid heating of the head. The position of the tibia was sampled by an on-line computer which set the limits of joint angle and controlled the aversive stimulus while storing data for further analysis. Control animals received patterns of aversive stimuli identical to those received by experimental animals but independent of their own joint position. Quantitative evaluation of the learned behavior of individual animals allowed the identification of three different behavioral strategies by which learning was achieved.