For experiments at the torque meter, flies are kept on standard fly medium at 25 degrees C and 60% humidity with a 12hr light/12hr dark regime. A standardized breeding regime assures proper larval density and age-matched cohorts. Cold-anesthetized flies are glued with head and thorax to a triangle-shaped hook the day before the experiment. Attached to the torque meter via a clamp, the fly's intended flight maneuvers are measured as the angular momentum around its vertical body axis. The fly is placed in the center of a cylindrical panorama to accomplish stationary flight. An analog to digital converter card feeds the yaw torque signal into a computer which stores the trace for later analysis. The computer also controls a variety of stimuli which can be brought under the fly's control by closing the feedback loop between these stimuli and the yaw torque trace. Punishment is achieved by applying heat from an adjustable infrared laser.