The central nervous system, and the brain in particular, is one of the most remarkable products of evolution. This system allows an individual to acquire, process, store and act on information gathered from the environment. The resulting flexibility in behavior beyond genetically coded strategies is a prime adaptation in animals. The field of animal cognition examines the underlying processes and mechanisms. Fishes are a particularly interesting group of vertebrates to study cognition for two reasons (Figure 1). First, they occupy a key position in the vertebrate phylogenetic tree: the common ancestor of the tetrapods was a bony fish. Thus, all vertebrates share key genetic features that code for the body structure, including the vertebrate brain. Similarities in brain structure and function are hence likely to be due to common ancestry. A second reason to study fish cognition is that fish have had their own independent evolution/radiation since they split from tetrapods. Bony fishes are by far the most species-rich vertebrate group. As a consequence, they provide the best options for a comparative approach that aims to link the evolution of cognition to a species' ecology. Therefore, the study of fishes may reveal general principles of ecological effects on cognitive abilities in vertebrates.