Fig. 1: Schematic of the escape response measures.

The grey fish silhouette represents the fish’s position prior to starting the escape reaction, the black fish silhouette represents the fish’s position during different stages of the escape response, and the white dot indicates the estimated centre of mass of the fish. A The escape latency was measured as the time that elapsed from the appearance of the predator (when the predator was first visible from the centre of the food patch) to the time that the fish first reacts. B The turn rate (Θ) was measured by dividing the angle achieved during the first unilateral bend of the reaction (orange dashed lines) by the duration of time to achieve that angle, with higher turning rate indicting greater agility in the response71. The curvature index was calculated as the minimum distance between the head and tail during the escape (blue double arrow line) divided by the fish’s body length (thus an index of 1 indicates that fish did not bend). C The distance from the predator is measured as the distance between fish’s position prior to the attack and the edge of the tank at the point where the predator is first visible (blue double arrow line). Initial speed was measured as the distance travelled (orange dashed line) during the first 42 ms of the reaction (equivalent to 10 frames, chosen for comparison to previous studies71). The escape direction was measured as the direction of the fish at 42 ms after the initial reaction (blue arrow). The angle of escape was derived from the escape direction relative to the orientation of the fish before the attack (orange dashed angle). The angle of the attack was defined as the angle formed by the orientation of the fish before the attack and the predator’s location (blue dashed angle).