The invention relates to behavioral experiments with rodents, and especially to monitoring, data collection and control of such experiments. This invention provides a method for automatically observing the behavior of rodents in a way that provides accurate determination of location and direction of the head of the rodent, even in darkness under infrared light, by determining the location and the direction of the rodent's head on the basis of the triangle formed by the ears and the snout of the rodent.