Experimental setup. Bees were housed in a glass- walled observation hive (a) that contained a one-sided honeycomb and was connected to a hole in the wall allowing unlimited access to the out- doors for foraging. The hive was illuminated with eight infrared LED lights mounted on an aluminum frame (b). To facilitate automatic image analysis, the honeycomb was backlit with an array of infrared lights mounted behind the hive (c, hidden). Images were recorded with a high-resolution mono- chrome camera (d) that controlled the infrared lights via a breakout board (e). A standard personal computer (f) controlled the camera and stored images. From Gernat et al. 10.1073/pnas.1713568115