Schematic of the zone model used in the cognitive schooling simulation. Variable fields associated with spatial memory (αi, βi, Ci, Si, Ri and λi ) as implemented in this simulation are defined for two different neighbourhood sizes. The yellow circle indicates a ‘nearest neighbour’ response zone, in which a focal individual assesses local density within a radius rNN. Having assessed whether the nearest neighbourhood density differs from the target density, the appropriate turning direction is determined with reference to a larger ‘detection distance’ neighbourhood of radius rD, indicated jointly by the yellow circle and the red and blue semicircles. The geometrical parameters rNN and rD correspond, respectively, to the spatial scales of strong neighbour interactions, Ld, and maximum detection distance, LD. For simulations in this study, rNN = 2.1 and rD = 6.1. For example, for the focal (red) fish in the schematic, the number of near neighbours is 3, the number of detectable neighbours in the left semicircle is 7 and the number of detectable neighbours in the right semicircle is 3. Hence, an individual with a target density less than three near neighbours would turn incrementally to the right, while an individual with a target density more than three near neighbours would turn incrementally to the left.