Moving in and out of small cavelike structures is a common daily activity of Colostethus palmatus. Such sites are used for shelter and spawning. Therefore, cave quality is important to survival and reproductive success. The frogs' association with caves was studied in a 24-cave communal paludarium. Adult frogs recognised cave quality, and chose large damp caves for spawning, but large, wet and dark caves were preferred for shelter, while small ones were used less or ignored. The search time needed to find an available cave gradually shortened over trials, reaching a minimum in about eight days, indicating that frogs learned cave position. Males and females had similar search times. Frogs less familiar with the test area had longer initial search times than frogs with more experience, but achieved equally short search times after about eight days. In conjunction with previous findings the results suggest that visual cues are important in habitat choice and spatial learning, and that territorial and reproductive behaviour are intimately associated with learning performance.