Modelling animal contests based on spatio-temporal dynamics

We present a general theoretical model for the spatio-temporal dynamics of animal contests. Inspired by interactions between physical particles, the model is formulated in terms of effective interaction potentials, which map typical elements of contest behaviour into empirically verifiable rules of contestant motion. This allows us to simulate the observable dynamics of contests in various realistic scenarios, notably in dyadic contests over a localized resource. Assessment strategies previously formulated in game-theoretic models, as well as the effects of fighting costs, can be described as variations in our model’s parameters. Furthermore, the trends of contest duration associated with these assessment strategies can be derived and understood within the model. Detailed description of the contestants’ motion enables the exploration of spatio-temporal properties of asymmetric contests, such as the emergence of chase dynamics. Overall, our framework aims to bridge the growing gap between empirical capabilities and theory in this widespread aspect of animal behaviour.


Introduction
Contests over limited resources are a common feature of animal behaviour, and have been the focus of many empirical and theoretical works over the past decades [1]. Due to the cost and benefit trade-offs that they entail, and following the foundations laid by the seminal works of the 1970s [2][3][4][5][6], animal contests were predominantly modelled within the framework of game theory [7][8][9][10]. Although they can generate empirically testable predictions-notably trends of contest duration and escalation [11], experimental verification of game-theoretic contest models remains elusive [11][12][13][14], as empirical studies rarely yield more than anecdotal evidence in support of a particular class of models or the rejection of another [11,13,14]. Moreover, the theoretical foundations of these models are typically stated in terms of how contestants gather information about their own and their rival's 'resource holding potential' (RHP) [7][8][9][10][15][16][17][18][19], a generally defined measure for the ability to obtain and defend resources [5] that can rarely be measured directly. These difficulties have sparked disagreement over best practice in measuring animal contests [12,14,[20][21][22], and highlight the fact that most contest models meet the observable dynamics of contest behaviour only in their endpoint predictions-and ignore the detailed dynamics of contests in real time and space. This makes direct comparison of theoretical contest games with real animal contests inherently difficult.
The most striking aspect of animal contests is the spatial dynamics of contestants as they react to real-time inputs. Importantly, the spatial dynamics of contests are directly measurable, and nowadays can be readily tracked [23,24]. Although seemingly intricate and diverse [25], these dynamics commonly involve stereotypical behavioural elements that characterize contests in many species [1,25,26]. Another central element is a spatially localized resource, commonly a mate [27,28] or territory [29], which attracts potential rivals and drives them into contest range. Once the contestants are engaged in an interaction, their spatial dynamics are governed by behavioural elements that typify agonistic encounters, such as displays, attacks and retreats [25]. These features of animal contests can be described as universal rules of contestant motion, which, we propose, can then be associated with effective interaction forces that encode the contestants' behaviour, as we have recently shown for a system of spider contestants [30]. This approach yielded new mechanistic explanations for previous observations regarding the competitive advantage of larger contestants [30]. Similar methods have been applied to model inter-agent interactions in animal groups in the context of collective behaviour [31][32][33][34][35][36]. This motivates us to propose a new theoretical framework for the observable dynamics of animal contests, which relies on generic and broadly applicable rules of inter-contestant interactions.
In this work, we construct a general theoretical model for the spatial and temporal dynamics of animal contests. The model is formulated in terms of effective interaction potentials, which map typical elements of contest behaviour into rules of attraction and repulsion between contestants, and are analogous to the potential interaction energies between physical particles. Through the effective interaction forces that they generate, these potentials govern the motion of contestants as they interact with each other and with a localized resource. This fundamental framework is used to simulate the spatiotemporal dynamics of our model's contestants in dyadic contests. Using simulated data, we demonstrate how our model's interaction potentials can be measured empirically in any system in which contest dynamics can be observed.
The scope of this general framework goes far beyond that of our motivating special case [30]. We show that the previously proposed RHP-assessment strategies [7][8][9][10][15][16][17][18][19], which are stated in terms of how contestants gather information about their own and their rival's RHP, can be described as variations in the model's parameters. This is done by introducing an 'assessment function', which can describe various modes of assessment within its continuous parameter space. Further extending the relation between the model's parameters and the underlying behaviour, we account for fighting costs. Using the model's representation of the well-studied self-and mutual assessment strategies [11], we show that the RHP-dependent trends of contest duration associated with these assessment strategies can be derived and understood within our model as an emergent property of contest dynamics. Finally, we explore spatiotemporal properties of asymmetric contests between RHP-unmatched contestants. These results showcase the applicability of the model to various realistic contest scenarios, in which the comparison between theory and experiment can be facilitated by the analysis of spatiotemporal data derived from the contestants' trajectories.
2. The basic model: construction and measurement

Effective interaction potentials
Our model is based on the mapping of typical contest behaviour to generic rules of inter-contestant interactions. These rules are encoded by effective 'contestant interaction potentials' V j→i , which capture the influence of a rival contestant j on the motion of contestant i ( figure 1a,b). Not to be confused with RHPs, our interaction potentials are analogous to the potential interaction energies that govern the interactions between physical particles. We construct these potentials based on the following generic features of contest behaviour, which we state in terms of effective attraction or repulsion between contestants i and j depending on the distance between them: (i) long-range repulsion due to mutual avoidance (which can be surmounted due to an attracting resource, as shown in figure 1c,d ), (ii) medium-to shortrange attraction when the contestants reach a separation distance in which conflict escalation is inevitable (and hence move towards each other), (iii) strong repulsion at contact, and (iv) the strength of the interaction decays to zero when the contestants are far apart. Note that the tendency to decrease the inter-contestant distance (effective attraction) is associated here with conflict escalation, while the tendency to increase this distance (effective repulsion) is associated with de-escalation. These effects can be directly measured in experiments, as we demonstrate in a later section. Various interaction potentials can be constructed to satisfy the above requirements, that is to have a qualitative shape as in figure 1a,b. Here, we propose one such particular potential, a combination of a logarithmic repulsion and an attractive Gaussian well, for which the extrema can be obtained analytically (electronic supplementary material, S1), where x ij is the (dimensionless) distance between contestants i and j (with respective position vectors r i and r j ), α j→i and δ j→i are positive 'interaction parameters' that set the strengths of effective attraction and repulsion (experienced by i when interacting with a rival j), β > 0 determines the range of effective attraction, and x 0 is a length scale distance parameter. Both β and x 0 are assumed to be the same for all contestants in a given system, and in this work will be set to equal 1. Electronic supplementary material, S2 addresses the addition of an intermediate 'evaluation' regime, which has been observed in various animal contests [7,17,30,37], to V j→i , demonstrating the inclusion of other (system-specific) features in this interaction potential. The same approach can account for the spatio-temporal characteristics of any contest behaviour that occurs at a typical inter-contestant distance. An omnipresent example for such behaviours is agonistic displays [38][39][40][41]. Note that α j→i reflects the motivation of contestant i to escalate the interaction (that is, how aggressive i is) and is, therefore, associated with the (absolute or relative) RHP of i, while δ j→i reflects how intimidating (repulsive) the rival j is perceived by i, and is, therefore, associated with the (absolute or relative) RHP of j. In a later section, we construct an explicit functional relationship between the parameters α j→i and δ j→i and the contestants' RHPs depending on the assessment strategy that they employ. An analogous interaction potential V i→j (with interaction parameters α i→j and δ i→j ) is experienced by the rival j due to the interaction with i and, as implied by the directional arrow notation, in general V j→i ≠ V i→j since these potentials manifest asymmetries between the contestants (as illustrated in figure 1e). The influence of V j→i and V i→j on the motion of the contestants is governed by the non-reciprocal forces that they generate, F j→i = −dV j→i /dx ij and F i→j = −dV i→j /dx ij .
Access to limited resources is the primary motivation of animals to engage in contests in the first place [1]. Most of these resources, notably mates, food and territories, are inherently spatially localized, and therefore act as attracting regions in space that drive competitors closer to each other until conflict is inevitable. The level of attraction towards a given resource is determined by the perceived resource value, which could vary not only according to an absolute scale, but also between contestants and contexts [10]. We model the influence of a localized resource on the motion of contestant i as an effective 'resource potential' V res→i . As with V j→i , V res→i should not be confused with the concept of RHP, but rather should be thought of as the effective 'energy' landscape created by the resource. The particular shape of the resource potential's landscape may be systemspecific [30], but its global qualitative effect is generic: to bring contestants into contest range due to their mutual attraction to the resource. A resource potential with a simple radially symmetrical form is shown in figure 1c,d. Note that the effective potential landscapes of figure 1a,c describe interactions in a two-dimensional ( planar) space, but the model is equally applicable in three dimensions.
Once contestants become strongly engaged in a contest interaction, their attention is predominantly given to their rival until the encounter is resolved. This implies an 'attention switch' in the interactions with a resource and with rivals, where the contestants' motion is significantly affected by their attraction to the resource (i.e. by V res→i and V res→j ) only when they are relatively far apart, and is dominated by their interaction with each other (i.e. by V j→i and V i→j ) when they are within the contest range. This attention switch can be expressed by the total effective potential experienced by contestant i, V tot→i , which combines the influence of a rival j and of a resource on the motion of contestant i, where x > is the contest onset distance, as defined below and in figure 1f. A respective total effective potential V tot→j is experienced by the rival j due to contestant i and the resource. Below we demonstrate how these potentials can be extracted from contest trajectories, and in [30] we demonstrate their extraction in a specific system of spider contestants, where the resource potential has a non-trivial shape.

Definition of a contest
In order to clearly define the onset of a 'contest' in our model, we consider the relative motion between the contestants along the inter-contestant axis (figure 1a) due only to V j→i and V i→j . Note that according to equation (2.1), this relative where p i > 0 sets the attractiveness of the resource (as perceived by contestant i), and e . 0 prevents divergence at the resource (defined as the origin), with p i = 4 and e ¼ 1. (e) Asymmetries between contestants are manifested by their contestant interaction potentials (in general V j→i ≠ V i→j ). Here, V j→i is the same as in (b), and V i→j is shown with α i→j = 8, δ i→j = 4 and β = 1. ( f ) The relative 'contest force' F contest = F j→i + F i→j governs the relative motion along the inter-contestant axis (arrows). This force is associated with a relative 'contest potential' V contest = V j→i + V i→j , which has its local maximum (x > ) and minimum (x < ) where F contest = 0 (no relative motion between the contestants). The distance x ij ¼ x > is defined as the contest onset.
royalsocietypublishing.org/journal/rsif J. R. Soc. Interface 20: 20220866 motion depends only on the distance between the contestants, and is governed by the effective forces F j→i and F i→j . Taking the j → i direction as the 'positive' direction x ij ¼ ðr i À r j Þ=jr i À r j j, and the position of contestant j as a fixed point of reference, contestant i appears to be driven alongx ij by a relative 'contest force' F contest , given by where note that the sum is taken since F i→j , which is applied by i on j in the Àx ij direction, appears to drive i relative to j in the opposing þx ij direction. Equation (2.3) motivates the definition of a relative 'contest potential' V contest as the sum of the individual interaction potentials, such that F contest = −dV contest /dx ij . We use equations (2.3) and (2.4) to define the onset of a contest according to the direction of relative motion, which changes at the locations of the local maximum (x > ) and minimum (x < ) of V contest (see electronic supplementary material, S1 for the analytic expressions of these extrema). When the contestants reach a separation x ij that is shorter than x > , the relative force becomes attractive (F contest < 0) towards x < , and the interaction is governed by a transient bounded state (see figure 1f ). This bounded state is equivalent to the ultimate escalation into a short-range contest, in which the contestants are completely engaged with each other. We, therefore, define x > as the contest onset distance, and regard two contestants as engaged in a contest when x ij , x > (figure 1f ). Note that according to the particular choice of equation (2.1), the relative contest potential is given by ð2:5Þ To simulate the dynamics of our model's contestants, we treat them as Brownian particles moving in space under the influence of an external potential [42], as described in electronic supplementary material, S3. Note that in this work, all contests were simulated in a two-dimensional ( planar) space. Figure 2a-c describes typical trajectories of a simulated symmetric interaction between two identical contestants (V j→i = V i→j ), where the attraction of both contestants to the resource brings them into contest range.

Extracting interaction potentials from empirical measurements
Using simulated contestant trajectories as in figure 2a, for which the underlying potentials are known, we demonstrate how the contestants' effective interaction potentials can be extracted from the spatio-temporal dynamics of contests. These potentials govern the velocity at which the contestants tend to move with respect to one another depending on their position. With minimal a priori assumptions about the observed interactions, this relative motion can be gauged by the averaged relative velocity between the contestants as a function of where note that v rel > 0 (a tendency to increase x ij ) indicates effective repulsion between the contestants, while v rel < 0 (a tendency to decrease x ij ) indicates effective attraction. Figure 2d shows the relative velocity profile described by v rel , as calculated from the trajectories of n = 30 simulated contests as in figure 2a. To be informative, v rel requires sufficient sampling, such that the stochastic components of the motion are mostly averaged out, and that the sampled contests are comparable, so that the remaining averaged dynamics represents the data well. For example, the relative velocity profile of figure 2d represents a fairly large but experimentally feasible set of RHP-matched contests with the same initial set-up (comparable contests). Then, an averaged relative interaction potential can be derived from v rel by integration with respect to x ij , where the 'integral' denotes the approximate cumulative integration over the discrete values of the measured v rel (see electronic supplementary material, S4 for the formal definition). Equation (2.7) assumes that the effects of the contestants' inertia can be neglected on average, such that the averaged relative velocity is directly proportional (through the 'mobility' η, see electronic supplementary material, S3) to the effective relative force associated with V rel . In practice, η can be simply absorbed into V rel by setting η = 1. Figure 2d shows the result of this integration, and electronic supplementary material, S4 describes the full practical implementation of equations (2.6) and (2.7) to a set of contest trajectories. Although the overall shape of the observed potential V rel is in good qualitative agreement with the actual contest potential, it includes contributions from the residual attraction of both contestants towards the resource, and therefore cannot be strictly identified with V contest . By observing the typical contest behaviour of the studied animals, one should be able to estimate the average inter-contestant distance at which the 'attention switch' of equation (2.2) comes into play, and thereby estimate the range of x ij within which the interaction is dominated by V contest and the effect of the resource is negligible. For example, a clear change of the averaged relative motion from effective repulsion to effective attraction, as indicated by a sign change of v rel , is a possible indicator for the onset of this range. In this range, a model for V contest can be fitted to V rel (electronic supplementary material, S4), as illustrated in figure 2e. With the n = 30 simulated trajectories used here, a fit according to equation (2.5) deviates only slightly from the actual V contest . In the context of contest experiments, one should also be mindful when analysing trajectories of contests that occur in the presence of spatial constraints, notably those of staged contests inside bounded experimental arenas (such as tanks and pens), so as to minimize the effects of such constraints on the extraction and interpretation of the underlying interaction. This could be done, for example, by constructing arenas that are sufficiently large and by considering only trajectory fragments that are well away from a boundary.
Finally, for contests between RHP-matched contestants as in the current example, the fitted V contest can be simply divided by 2 to obtain the contestant interaction potentials V j→i and V i→j , as shown in figure 2f. Otherwise, a relation royalsocietypublishing.org/journal/rsif J. R. Soc. Interface 20: 20220866 between the contestants' RHP and the parameters of the interaction potentials (an RHP-assessment strategy) has to be assumed in order to dissect V contest into V j→i and V i→j . To avoid such a priori assumptions about the underlying assessment strategy, we propose that the initial extraction of effective interaction potentials should always rely on contests sampled from an RHP-uniform pool of contestants, e.g. contestants of similar sizes in systems where size is strongly correlated with RHP. Once effective interaction potentials are established for these RHP-matched contestants, evidence for the assessment strategy can be gathered, based on the theory developed in the following section, by sampling contests between contestants of other RHPs.

The assessment function
The type of RHP-related information used by contestants to resolve contests, commonly termed the 'RHP-assessment royalsocietypublishing.org/journal/rsif J. R. Soc. Interface 20: 20220866 strategy', has been widely used to classify contests in different species [11,43]. Historically, theoretical and empirical studies have analysed and classified animal contests according to two main categories of assessment: self-assessment, in which contestants only consider their own RHP and do not gather information about their rival's RHP [11], and mutual assessment, in which contestants consider both their own and their rival's RHP in their decision-making [11]. Existing game-theoretic models of contest behaviour were mostly constructed according to a specific assessment strategy of either the self-or mutual assessment categories, and this often limits their applicability only to systems which closely follow their underlying assessment paradigm [14].
Here, we propose that any mode of assessment can be expressed in terms of how the parameters α j→i and δ j→i of equation (2.1) vary with the contestants' RHP. We assume that the RHP of contestants i and j can be sufficiently expressed by single numeric variables, respectively denoted m i and m j . Henceforth, we will often refer to m i and m j as the contestants' (effective) sizes, although in general RHP is not strictly interchangeable with size [5]. Nevertheless, any metric or proxy of RHP that can be numerically expressed is compatible with this approach. In order to facilitate comparisons across taxa and scales, it is useful to define such that m i and m j are dimensionless effective 'sizes' that express the RHP of the contestants relative to some chosen reference in the population of interest, e.g. the estimated average. We construct an 'assessment function' A j→i (of contestant i with respect to a rival j) which can express, in principle, any assessment strategy. For a two-component interaction potential as in equation (2.1), A j→i can be represented as a twoelement vector that defines the functional relationship between the parameters α j→i and δ j→i and the effective size variables m i and m j . As explained above, α j→i is directly associated with the (absolute or relative) size of contestant i, while δ j→i is directly associated with the (absolute or relative) size of the rival j, and these features can be expressed by A j→i as follows: where α 0 and δ 0 are scaling parameters, and the different RHP-dependent components represent: m i s -absolute selfassessment; m j r -absolute rival-assessment; ðm i =m j Þ sQ and ðm j =m i Þ rQ -relative self-and rival-assessment (mutual assessment), respectively. Note that the opponent's assessment function, A i→j = (α i→j , δ i→j ), is obtained by swapping the functional roles of m i and m j in equation (3.2). The assessment strategy, which is now defined in terms of how α j→i and δ j→i vary with m i and m j , is represented by the (non-negative) values of the exponents s, r, s Q , r Q . In particular, we propose that 'pure' self-assessment can be described by s > 0 and r, s Q , r Q = 0, that is and that 'pure' mutual (relative) assessment can be described by s, r = 0 and s Q , r Q > 0, that is for pure mutual assessment:

ð3:4Þ
Importantly, any combination of these modes of assessment can be expressed by the assessment function A j→i , and this allows the description of animal contests that do not follow a pure assessment strategy [14].
Representing the attractive and repulsive components of equation (2.1) as a two-element vector V 0 , ð3:5Þ we can conveniently express V j→i as the dot product of equations (3.2) and (3.5),

Accounting for fighting costs
The RHP is in general time-dependent, as it reflects the current state of a contestant. For example, injured or energydepleted individuals would have a decreased RHP compared with their uncompromised state. Direct costs of fighting come in two main forms: (i) self-inflicted costs (due to a contestant's own actions) and (ii) costs inflicted by the rival. The contributions of these costs to the contestants' decisionmaking have been previously considered as a feature of the assessment strategy [11]. In particular, pure self-assessment models assume that the rival's actions do not inflict costs, while in mutual assessment (as well as in 'cumulative assessment' [9], which we do not explore here) both self-and rival-inflicted costs are integrated [11].
Here, we extend the model to account for these two main costs, but note that the following approach can be used, in principle, to account for any cost. We set the total self-inflicted cost and the total rival-inflicted cost as increasing functions of the accumulated contest time t s royalsocietypublishing.org/journal/rsif J. R. Soc. Interface 20: 20220866 and model the dependence of the effective size on these costs as where μ i is the effective size of contestant i before the contest had started, C i is the accumulated self-inflicted cost and C j→i is the accumulated cost inflicted by the rival j. As a proof of concept, we write simple but useful expressions for C i and C j→i as where K self and K ij μ j /μ i are the rates at which their respective costs are accrued. Equation (3.8) naively assumes that costs are incurred continuously and deterministically, and that the rate of incurring self-inflicted costs is independent of the contestant's own effective size. Furthermore, it assumes that the rate of incurring costs from the rival is proportional to the initial effective size ratio-such that the larger contestant inflicts costs faster but incurs them slower. Importantly, the integration of costs into the model, using equation (3.7), is not predicated on these simplifying assumptions. Combining equations (3.7) and (3.8), the resulting expressions for m i and m j during the contest are While both m i and m j decrease monotonically with t s , when μ i > μ j and K ij ≠ 0 (e.g. in an asymmetric contest with mutual assessment), the ratio m i /m j increases and approaches a constant as t s ! 1 (electronic supplementary material, S5). The dynamics of m i , m j and m i /m j according to equation (3.9) is shown with only self-inflicted costs (K ij = 0) in figure 4a, and with both self-inflicted and rival-inflicted costs (K ij ≠ 0) in figure 4b. The dependence of the effective sizes on t s due to costs means that the interaction potentials themselves depend on t s through equation (3.6), as demonstrated in figure 4c,d. This ultimate manifestation of costs in the model has a straightforward behavioural interpretation: the accumulation of costs affects the internal motivation of the contestants to fight and/or their perception of the opponent, and therefore alters the nature of their interaction. In pure self-assessment, self-inflicted costs lead to simultaneous reduction in the effective attraction of both contestants towards their rival, as evident by the diminishing potential wells of figure 4c. In mutual assessment, rival-inflicted costs increase the asymmetry of the interaction, as captured by the opposing trends of the potentials in figure 4d. The relative contest potentials vary accordingly with t s , as shown in figure 4e,f. For both cases studied here-pure self-assessment (equation (3.3) with s = 1) and pure mutual assessment (equation (3.4) with s Q = 1 and r Q = 2)-the bounding well of V contest , which defines the contest regime, becomes less attractive (shallower) as the contest proceeds. In figure 4e, this trend eventually leads to contest termination, as the bounding well disappears and V contest becomes strictly repulsive.

Trends of contest duration
The duration of contests is widely used as a readily observable and relatively unbiased measure of contest dynamics.  x ij Many behavioural studies examine the relation between contest duration and the RHP of the contestants in order to determine whether a given species tends to settle contests through self-or mutual assessment [11,13,14]. Notably, pure self-assessment models predict that contest duration would generally increase with the mean RHP of the contestants [12], as the persistence of purely self-assessing contestants is determined by their absolute RHP. By contrast, mutual assessment models predict contest duration to strongly decrease with the contestants' RHP ratio, and that the duration of RHP-matched contests would not scale with RHP at all [12]. Here, we show that the same trends can be derived and understood within our model using a physics-inspired reasoning of 'contestant particles' escaping a potential well. When deriving these trends, we consider two limiting cases in terms of fighting costs. In the 'no-cost' limit, the costs accumulated during the course of a single contest are negligible. This means that the effective sizes m i and m j do not change during the contest, making V contest effectively independent of contest duration. Although not realistic, the no-cost limit sets a useful upper bound on contest duration. In the opposing 'cost-driven' limit, a single contest entails very significant costs, resulting in m i and m j decaying substantially during the contest, and in a corresponding dependence of V contest on contest duration-as illustrated in figure 3e,f. The termination of a no-cost contest is noise-driven-entirely governed by the stochastic component of the contestants' motion and the shape of V contest , while the duration of a cost-driven contest is dominated by the accrued costs, as described below.
In the context of the model, contest duration can be thought of as the time it takes for the contestants to escape the potential well of V contest once they are trapped by its transient bounded state. The effective 'contest bounding energy', U, can be obtained for any mode of assessment (electronic supplementary material, S6) as a function of m i and m j , where note that V contest , as well as x > and x < , depend on m i and m j through equation (3.2). Figure 5a,b illustrates the dependence of U on m i and m j in pure self-and pure mutual assessment. Notably, in pure self-assessment U increases with the sum of the effective sizes (for s ≠ 1 in equation ( In the no-cost case, contest dynamics are analogous to the dynamics of Brownian particles in an energy trap of constant depth U [44]. Then the mean contest duration, t c , should increase exponentially with U, where the pre-exponential factor P is assumed to vary weakly with m i and m j -such that the exponential dictates the qualitative trend of t c , and T eff is the 'effective temperature' of the contestant particles' interaction. Equation x ij (e,f ) The relative contest potential vary accordingly with t s , such that the bounding well that defines the contest regime becomes less attractive (shallower).
royalsocietypublishing.org/journal/rsif J. R. Soc. Interface 20: 20220866 quickly-within an average time that is significantly shorter than t c -and spend the rest of the contest near the minimum until they escape, as in figure 2b.
In the cost-driven case, the cost-dominated contest duration, denoted t cost henceforth, can be obtained by considering the decay of the effective sizes due to costs up to the point where V contest is no longer attractive, as illustrated in figure 4e. This happens when the two extrema of V contest merge into a single inflection point, which for our particular choice of interaction potentials satisfies the condition (electronic supplementary material, S1) where e is Euler's number. Together with equations (3.2) and (3.9), the condition of equation (4.3) can be invoked to evaluate t cost for any mode of assessment. In electronic supplementary material, S8, we derive analytic expressions for t cost under pure self-assessment and pure mutual assessment, which are valid estimates when the costs are large enough to make t cost much smaller than the noise-driven duration t c .
Since we are interested in the trends of contest duration with respect to m i and m j under a particular assessment strategy, and since absolute durations vary between species, it is useful to define relative durations as t c ¼ t c =t w c and where P w and U w correspond to a no-cost contest between two sizematched contestants of the reference effective size (m i = m j = 1, recall equation (3.1)), for which all modes of assessment described by equation (3.2) yield identical interaction potentials, and therefore the same mean contest duration t w c . We examine three trends of contest duration with respect to the initial effective sizes, μ i and μ j , for pure self-and pure mutual assessment: (i) increasing size in size-matched contests, (ii) increasing size of the smaller contestant in asymmetric contests, and (iii) increasing size of the larger contestant in asymmetric contests, as described in figure 5c-f. The theoretical trends predicted by equations (4.1)-(4.3) are in agreement with the mean trends obtained from simulations, and are aligned with previously reported experimental trends and predictions of game-theoretic models [11,14]. This demonstrates that contest duration can be derived directly from the underlying physical properties of the interaction, as an emergent feature of contest dynamics. Comparison between the no-cost trends (figure 5c,d) and the cost-driven trends (figure 5e,f ) shows that both cases give rise to the same qualitative trends-suggesting that explicit integration of fighting costs (which relies on a cost function that typically cannot be measured) is not necessary to explain these previously observed trends.

Dynamics of asymmetric contests
Interactions between unmatched contestants are characterized by broken symmetry. Here, we explore in the model the effects of this asymmetry on the spatio-temporal dynamics of the contest and the emergence of chase dynamics-a ubiquitous feature of animal contests. As illustrated in figure 6a for strongly asymmetric interaction potentials, within the 'chase' range the larger contestant is attracted by a deep minimumleading it to move towards its smaller rival, while the smaller contestant is repelled in the same direction-moving away from its larger rival. Together, these effects gives rise to directed chase behaviour during the contest, where the larger contestant tends to chase its smaller rival away. The extent to which a contest is dominated by chase dynamics is determined by the magnitude of asymmetry between the inter-contestant effective forces, measured by In particular, since contests are governed by the forces near the minimum of V contest , the extent of chase dynamics during a contest is determined by DF ij ðx < Þ. Figure 6b shows ΔF ij as a function of x ij for strongly unmatched contestants (left) and DF ij ðx < Þ as a function of the larger contestant's effective size m i (right) under pure self-assessment (equation (3.3) with s = 1) and pure mutual assessment (equation (3.4) with s Q = 1 and r Q = 2). This comparison further illustrates that in mutual assessment, a relatively small effective size difference is translated into strong interaction asymmetry.
To quantify chase dynamics in the contestants' trajectories, we consider the direction correlation between the velocity of the contestants' midpoint-measured byv m , and the inter-contestant directionx ij , as defined in figure 6c (inset). The temporal mean of this 'chase correlator', denoted by hv m Áx ij i, is theoretically zero for symmetric interactions, but positive for asymmetric interactions because of the directional bias imposed by the asymmetry, and approaches 1 if the interaction is dominated by the chase phase. Figure 6c,d compare typical trajectories of strongly asymmetric and symmetric contests (under pure mutual assessment) in simulations. While the trajectories of symmetric contests are scrambled and relatively localized, the trajectories of strongly asymmetric contests feature substantial directional alignment and persistence, and consequently much greater displacement, due to chase dynamics. Figure 6e shows the chase correlator hv m Áx ij i as calculated from simulations, where x ij and m i are varied as in figure  6b. Evidently, the trends of hv m Áx ij i mirror the trends of ΔF ij , suggesting that the relation between hv m Ár ij i and ΔF ij follows simple (linear) scaling within almost the entire contest range and for a wide range of asymmetries.

Contest outcome and size-related advantage
The ultimate expression of the RHPs is the outcome of the contest, wherein the winner obtains the resource. In the model, the resource is well-defined as the global minimum of the effective resource potential, and the outcome of the contest is determined when one of the contestants reaches the resource after the contest has ended. The advantage of larger effective size can be, therefore, examined directly in the model. In figure 7, we demonstrate for pure mutual assessment (equation (3.4) with s Q = 1 and r Q = 2) how interaction asymmetry increases the winning probability of the larger contestant-further showcasing the scope of the model in the describing observable contest dynamics.
We consider 'fair start' contests (figure 7a), which start when the contestants reach the contest range at equivalent vantage points with respect to the resource-such that neither of them has an initial positional advantage. Any advantage at winning such contests would, therefore, emerge from the dynamics of the contest itself. In figure 7b, we examine how the distribution of the contestants' positions at the end of the contest is affected by the size asymmetry. As the size asymmetry increases, contests increasingly end with the larger contestant at positional advantage with respect to the resource (|θ| < 90°, see upper panel in figure 7b). This effect is due to increasing chase dynamics, in which the larger contestant tends to chase its rival away from the resource-leaving the larger contestant closer to the resource when the contest terminates. Figure 7c compares the probability that the larger contestant is closer to the resource at the end of the contest with the probability that it is the winner, as a function of the size ratio. The match between these probabilities means that in the model's simulations, the positional configuration at the end of the contest determines its outcome, where the contestant closer to the resource becomes the winner.

Discussion
The study of animal contests has a rich history, extending back to the first formal application of evolutionary stable strategies to explain the evolutionary logic of these agonistic interactions [2,45]. In the following decades, game-theoretic models have yielded great insights into animal contests across taxonomic boundaries and contexts [1,46]. Nevertheless, the scarcity of direct empirical evidence in support of these models highlights the limitations of game-theoretic approaches in the study of animal contests [12][13][14]. In particular, the difficulty of measuring contest dynamics as modelled within game theory has been a topic of recent discussion and debate [12,14,[20][21][22]. One inherent barrier in the correspondence between theory and experiment has been the omission of within-contest dynamics by game-theoretic models, which typically verify their underlying decision rules based on contest endpoints.
In this work, we developed a new theoretical framework for animal contest dynamics based on measurable spatiotemporal characteristics of contest behaviour. The basic building blocks of our model are effective interaction potentials, royalsocietypublishing.org/journal/rsif J. R. Soc. Interface 20: 20220866 which encode generic rules of inter-contestant motion through the effective interaction forces that they generate. Importantly, these rules of motion can be directly extracted from empirical measurements of contest trajectories, and the simulated contest dynamics that our model gives rise to can be directly compared with the observable dynamics of real contests. Our approach requires few a priori assumptions about the observed interactions and is not predicated on decision rules imposed by a specific assessment strategy. Moreover, it has greater applicability to the study of contests in natural conditions, because it can use the entire information provided by the contestants' trajectories and does not critically rely on the ability to measure contest duration. Our approach is, therefore, robust to partially sampled contests, in which the observer may be unsure of the onset of the contest, where the contestants may move out of sight, or when contests are prematurely ended by an external stimulus.
Once the basic form of the effective interaction potentials has been established, our framing of assessment strategies as variations of the interaction parameters depending on the contestants' RHPs, as represented by the assessment function, allows the exploration of various strategies along the assessment continuum. This includes strategies that do not fall into the self-or mutual assessment categories, such as mixed assessment strategies [14]. Our model's representation of assessment strategies also brings them into the measurable domain where, rather than being retrospectively assigned based on the eventual contest outcome, the assessment strategy can in principle be inferred from the way the interaction varies with the contestants' RHPs. More broadly, modelling approaches that relate the measurable nature of the interaction to the current state of the contestants can be extended to encompass other determinants of behaviour, such as prior fighting experience (winner and loser effects, [47]), as we have demonstrated in our implementation of fighting costs.
While our model offers a new way of deriving and understanding previously described strategy-dependent trends of contest duration as a function of the contestants' RHPs, the detailed description of the contestants' spatial dynamics allows us to go far beyond paraphrasing the predictions of x ij other models. We showcased some of these applications by exploring spatio-temporal properties of asymmetric contests, notably the emergence of chase dynamics and their contribution to size-related advantage. Although we considered here only the archetypal contest scenario of two contestants that compete over a single resource, our framework can be used to describe the interactions between many contestants, various distributions of multiple resources, and even consumable resources (through a time dependence of the resource potentials). These applications are especially useful to the study of complex competitive scenarios, for example systems in which the density of contestants is variable and affects the degree to which size (or any other proxy for RHP) provides a competitive advantage [30], or systems in which many contestants move in a field of consumable resources-where population-level measures could be used to explore the system's dynamics.
Furthermore, the ability to extract effective interaction potentials directly from contest trajectories offers a robust method for detecting changes within an interaction over time. This can be done by sampling the trajectories of the same contestants at different times-for example by dissecting the contests into their initial and terminal stages, or by separately analysing consecutive contests among the same rivals in the same or in different conditions. Such data can be used to determine how strategies update over time or context, which has been previously discussed as a useful contribution to the understanding of assessment strategies [14]. More generally, by monitoring the detailed dynamics of contests, we can study the role that injuries, energetic expenditure, learning from prior experience or an intrinsic change in motivation play in the behavioural outputs of contestants, and thereby gain insights into the mechanisms that underlie these outputs [48]. The above suggests many further applications of our modelling approach, which we leave for future work.
With the rapid development of tools to gather extremely high-resolution data on behavioural interactions in both laboratory [49,50] and field settings [24,51], our model aims to bridge the growing gap between empirical capabilities and theory. Not only can the model recapitulate many predictions of previous models, but, importantly, it enables the description of realistic and detailed contest dynamics within observable time scales. Our theoretical framework should, therefore, facilitate new approaches and insights in the study of this widespread aspect of animal behaviour.
Data accessibility. All data and modelling information essential to this theoretical study are included in the article and/or electronic supplementary material. Code and simulated trajectories are also provided in the following Zenodo: https://doi.org/10.5281/ zenodo.7377238 [52] (see electronic supplementary material, S4). Further data or code requests will be happily fulfilled by the authors.
The data are provided in electronic supplementary material [53].
Authors' contributions. A.H.: conceptualization, formal analysis, investigation, methodology, software, validation, visualization, writingoriginal draft, writing-review and editing; A.J.: conceptualization, funding acquisition, supervision, writing-original draft, writingreview and editing; N.S.G.: conceptualization, funding acquisition, investigation, methodology, supervision, writing-original draft, writing-review and editing. All authors gave final approval for publication and agreed to be held accountable for the work performed therein. The bias towards θ = 0°increases with effective size asymmetry due to increasing chase dynamics, where i chases j away from the resource. (c) Comparison between the probability that the larger contestant i is closer to the resource at the end of the contest (|θ| < 90°) and the probability that i is the winner, as a function of the size ratio. In (b,c), n = 10 000 simulations for each effective size ratio.