Abstract
Most animals fight by repeating complex stereotypic behaviors, yet the internal structure of these behaviors has rarely been dissected in detail. We characterized the internal structure of fighting behaviors by developing a machine learning pipeline that measures and classifies the behavior of individual unmarked animals on a sub-second timescale. This allowed us to quantify several previously hidden features of zebrafish fighting strategies. We found strong correlations between the velocity of the attacker and the defender indicating a dynamic matching of approach and avoidance efforts consistent with the cumulative assessment model of aggression. While velocity matching was ubiquitous, the spatial dynamics of attacks showed phase-specific differences. Contest phase attacks were characterized by a paradoxical side-ways attraction of the retreating animal towards the attacker suggesting that the defender combines avoidance maneuvers with display maneuvers. Post-resolution attacks lacked display-like features and the the defender was avoidance-focused. From the perspective of the winner, game theory modeling further suggested that highly energetically costly post resolution attacks occurred because the winner was trying to increase its relative dominance over the loser. Overall, the rich structure of zebrafish motor coordination during fighting indicates a greater complexity and layering of strategies than has previously been recognized.