WorksPhysics and Astronomy
Microswimmers lose by swimming selfishly
Abstract
At low Reynolds number, microswimmers are coupled by the flows they create, even when they are apart. The best way for each swimmer to push itself forward then depends on its neighbors, turning swimming together into a game. To study this, we optimize the shape changes of soft swimmers, alone and in pairs, with a differentiable Stokes solver. From random initial membrane motions, a lone swimmer converges to a traveling membrane wave. In a pair, the stroke of a swimmer affects its neighbor far more than the neighbor affects its own best stroke. For swimmers in line, this influence decays as with their separation , whereas the incentive to respond decays as . Selfish swimmers, which maximize their own payoff, respond only to the weak incentive. The cooperative gain they miss decays only as , and their selfish adaptations leave the pair worse off than if both had kept their solitary strokes. Related swimmers, which also value the payoff of their neighbor, recover this gain, whereas competitors pay to hinder each other, both following a law that we derive analytically. Hydrodynamics alone thus makes swimming in company a social dilemma, whose outcome depends on how much the swimmers value each other.
Introduction
Microorganisms rarely swim alone. Bacteria, amoeboid cells, sperm and algae move in groups and colonies [1, 2, 3, 4]. In such groups, cells interact through the fluid they swim in, and at the scale of a cell, viscosity dominates over inertia (low Reynolds number) [5, 6], meaning that the flow each stroke sets up appears instantly, decays only slowly with distance, and is very much felt by neighboring cells. Through these flows, swimmers with fixed strokes attract, repel and lock their phases [7, 8, 9, 10], and the coupling can have strong consequences, such as making colonies feed worse than single cells [11].
Even at larger scales, where inertia dominates, fish can learn to exploit the wake of a leader [12]. Whether the coupling also changes the stroke of self-promoting cells in the more strongly coupled regime of low Reynolds number is still unknown. Nevertheless, the strength of these interactions suggests that it may, and if the best stroke for one cell depends on the strokes of the others, swimming in a group becomes a game. According to evolutionary game theory [13], natural selection acting on each cell then favors a Nash equilibrium [14], a set of strokes in which no cell can improve its own payoff by changing only its own stroke. At such an equilibrium every cell does the best it can for itself, yet the group may swim worse than if the cells had chosen their strokes together. Whether this matters or not depends on how much worse the equilibrium is than the cooperative optimum, a gap measured by the price of anarchy (PoA) [15].
For a single swimmer, the question of how best to swim is well understood. Amoeboid cells such as Dictyostelium and neutrophils can swim by changing their shape alone [16, 17], and for small deformations the optimal stroke of such a body is known to be a traveling wave [18].
Here, we ask what happens to this optimum when the swimmer has company. To avoid building the answer into the model, we assume no particular form for the stroke and instead optimize a general Fourier representation of the membrane shape over time, starting from random strokes that we improve by gradient-based optimization [19]. By making the Stokes solver differentiable [20], we not only optimize the shape but also obtain the gradient of the payoff of each swimmer with respect to the strokes of its neighbors, which measures how strongly the swimmers influence each other.
We find that the flows between swimmers create a social dilemma. The effect of a swimmer on its neighbor is much larger than the reason the neighbor gives it to modify its own stroke, which creates an interesting problem for the cells. Even when they selfishly optimize their own movement, the effect of their changes on each other leaves both in a worse position than if they had not adapted at all. It is therefore only when the cells help each other, as natural selection favors among related cells, that swimmers collect most of the benefit of swimming together. Notably, the same strong effect means that a swimmer can disrupt the movement of its neighbor, but only by hindering its own performance.
Model
Let each swimmer be a closed membrane in the plane, given by its radius in the body frame,
where is the polar angle measured from the body axis, the exponential keeps the radius positive for any deformation, and the scale keeps the enclosed area constant, as for an incompressible cell. We expand the deformation in a Fourier series in angle and time,
with fundamental frequency over the period , , , and for a real radius. Keeping only the terms in makes the shape mirror-symmetric about the body axis, which prevents the cell from turning. While this enforced symmetry may seem restrictive, optimal strokes over one period can otherwise turn the cell, an artifact of scoring the displacement over a single period (see Appendix § 10). Note that we leave out the mode to avoid moving the body off the polar origin. We optimize the stroke of each cell, given here by its set of coefficients for swimmer .
The surrounding fluid, of viscosity , obeys the two-dimensional Stokes equations, and a point on swimmer moves with the membrane velocity , where is the deformation velocity set by the stroke, and and are the unknown translation and rotation about the centroid . The membrane exerts a force density on the fluid, and the no-slip condition requires the flow created by all swimmers to match the membrane velocity,
where is the two-dimensional Stokeslet. Each swimmer is force- and torque-free, and , which determines and at every instant. Being force-free also avoids the Stokes paradox [21], as the flow of a force-free swimmer decays at least as fast as , even though the Stokeslet itself grows logarithmically with distance (see Appendix § 11).
We solve Eq. (3) with the method of regularized Stokeslets [22], which places point forces on the membrane and spreads each of them over a small region of width with the kernel
We place the points at equal distances along the membrane, where they move with the material as the cell deforms.
The energy a swimmer spends over a period is the work it does on the fluid,
With no inertia at low Reynolds number, this work is dissipated by viscosity instantly, and the dissipation in the fluid equals the work of all swimmers together.
Each swimmer aims to travel as far as possible for as little energy as possible, and we write its payoff over a period as the Lagrangian
where is the net displacement, the energy the swimmer spends, and the Lagrange multiplier.
Cell membranes bend easily but hardly stretch [23], and as in models of amoeboid swimming [17, 24] we treat the membrane as inextensible and free to bend, with a perimeter a fraction longer than that of a circle of the same area. A circle cannot change shape without stretching, and it is this excess membrane, which real cells keep in folds and other reservoirs [25], that allows the cell to swim at all. We use , a reduced area .
Because Stokes flow has no intrinsic time scale, a stroke performed faster covers the same distance per beat but costs more energy. Thus, a larger only makes the optimal stroke slower, which amounts to choosing the unit of time. We use L-BFGS [19], with gradients obtained by automatic differentiation through the full simulation [20], to find the optimal stroke such that
where the stiff quadratic penalty, of strength , holds the perimeter at .
A lone swimmer
We first optimize a single swimmer, starting from random coefficients . In the optimal stroke Figure 1(a), a wave of deformation travels from the front of the cell to the back on both sides at once and pushes the cell forward by nearly three quarters of its radius every period. Notably, this wave emerges from a random initial motion Figure 1(b), with different random starts also converging to the same stroke (see Appendix § 10).
Figure 1. The optimal stroke of a lone swimmer. (a) The membrane over a third of the period , colored by its radius relative to the dotted circle. (b) Membrane radius from the front () to the back () over one period, before and after optimization. The dotted line marks the end of the window in (a). (c) Mean-square deformation (circles) and displacement per period (squares) against the excess membrane . The blue line is the prediction (see Appendix § 10), with averaged over the scan, and the gray line has slope one.
The excess membrane sets the amplitude of this wave. Displacement, dissipation, and with them the payoff all grow with the square of the deformation [17, 18], and the optimal stroke uses all the membrane it has, with a mean-square deformation that follows from the excess alone Figure 1(c) and Appendix § 10.
This stroke agrees with previous results, and at small amplitude it is the traveling wave found by Shapere and Wilczek [18], which is also the optimal stroke for slender and ciliated swimmers [26, 27, 28]. Its chevron pattern resembles the protrusions observed on swimming Dictyostelium cells [16], and the way its displacement grows with the excess membrane Figure 1(c) agrees with models of amoeboid swimmers [17]. Here, we use to denote the optimal stroke of a single swimmer without neighbors.
Influence and incentive
We now place two swimmers in-line or lateral at a distance , in units of the cell radius, with for the cells to stay at least two radii apart, and with both using their optimal stroke . We hold this arrangement fixed while computing the payoffs, as the separation drifts only over thousands of periods (see Appendix § 12). To first order, the coupling between the two swimmers is described by two gradients, both taken with the two swimmers at . The first is how much swimmer could gain for itself by adapting its stroke to the neighbor,
which we call the incentive. Note that it vanishes for an isolated swimmer, because is the solitary optimum. The second is how much the stroke of swimmer changes the payoff of its neighbor,
which we call the influence. As we show below, a selfish swimmer can exploit only its incentive, whereas cooperating swimmers also exploit their influence. Differentiating the payoff of one swimmer through the solver gives both its incentive and the influence of its neighbor at once.
How these gradients decay with distance follows from the flow of a force-free swimmer (see Appendix § 11). Far from the swimmer, its time-averaged flow is that of a force dipole of strength along the swimming axis ,
where is the angle between and . An in-line neighbor (, ) is carried forward at speed , and a swimmer controls this push through , which gives . The best stroke of a swimmer, in contrast, ignores a flow that is uniform across its body, which simply carries it along, and responds only to how the flow varies across the body, given by the derivative of Eq. (10), and to its own flow reflected by the neighbor, which together give . For a lateral neighbor (), the flow of Eq. (10) points across the swimming direction, and the influence also falls to order .
The simulations confirm these scalings [Fig. 2]. For in-line pairs, the influence exceeds the incentive at every separation, by a factor that grows from 6 at to 33 at , and more than 98% of the influence comes from the neighbor being carried along by the flow, rather than from changes in the viscous dissipation the two cells share. For lateral pairs, both gradients decay as and remain comparable at all separations, and selfish and cooperative swimmers should then change their strokes alike. In-line swimmers that respond only to the incentive, in contrast, should leave most of the possible gain unused.
Figure 2. Influence and incentive at the solitary stroke. Influence (circles) and incentive (squares) of the dark cell against the separation , for (a) in-line and (b) lateral pairs. Lines show the predicted scalings.
Price of anarchy
We now let the two swimmers adapt their strokes, keeping their arrangement fixed. A selfish swimmer maximizes its own payoff given the stroke of its neighbor, and we find the resulting Nash equilibrium, where neither cell can improve by a small change of its stroke, by letting the two swimmers take turns to play their best stroke, starting from . Cooperating swimmers instead maximize their total payoff , which we optimize jointly. The price of anarchy (PoA), , where is the payoff averaged over the two cells, is the factor by which a cooperating pair outperforms a selfish one, and PoA is the relative gain from cooperating.
To see how these quantities depend on distance, we expand the payoffs around (see Appendix § 13). Because maximizes the solitary payoff, a change of its own stroke alters the payoff of a swimmer only at second order, whereas the coupling to the neighbor contributes at first order through the two gradients. If the two swimmers change their strokes by small amounts and , the payoff of swimmer becomes
where is its payoff when both use , and is the curvature of the solitary payoff at its optimum. The three corrections are the cost of leaving the solitary optimum, the gain from changing its own stroke, and the gain from the change of its neighbor. A selfish swimmer maximizes alone, whereas cooperating swimmers maximize , which also contains the gain that swimmer gives its neighbor, and the two change their strokes by
Inserted into Eq. (11), these strokes show that a selfish swimmer whose neighbor keeps gains , whereas each cooperating swimmer gains about , which sets PoA . When both swimmers adapt selfishly, each also feels the change of its neighbor through the term . Because the influence exceeds the incentive, this side effect outweighs what a swimmer gains from its own change, and its sign decides whether selfish adaptation helps the pair at all. In line, the influence falls off as and the incentive as , and the gain from cooperating then decays as , while that of a selfish swimmer decays as and is already 65 times smaller at . For lateral pairs, both fall off as , and the gain from cooperating decays as . The simulations follow these scalings (Figure 3(a) and Figure 3(b)), with cooperating pairs doing 14% better than selfish ones at and 1.4% better at in line, and only 0.4% better at for lateral pairs. These values hold for mirror-symmetric strokes, which keep the cells swimming straight (see Appendix § 10).
Figure 3. Selfish and cooperative strokes. (a) Gain per cell from adapting the solitary stroke in in-line pairs, for cooperative cells (circles) and for a selfish cell whose neighbor keeps (squares). (b) PoA for in-line (circles) and lateral (squares) pairs. (c) Payoff per cell of a pair with solitary strokes against the relative phase at , for in-line (circles) and lateral (squares) pairs, with fits (dashed). Dotted lines mark lone cells and the selfish and cooperative in-line pairs. (d) Shapes of the back and front cell of an in-line pair at , swimming to the right, drawn closer than their separation and with deviations from the solitary shape magnified three times. In (a) and (b), lines show the predicted scalings.
A social dilemma
Part of the benefit of swimming together comes from timing alone. Even with their solitary strokes, two cells gain or lose depending on their relative phase , as found for waving sheets [7, 9]. Note that since the optimal stroke beats three times per period (see Appendix § 12), this payoff repeats every in [Figure 3(c)]. Both cells are best off at the same relative phase, a delay of rad for in-line pairs and none for lateral ones, which leaves them to disagree only on the shape of the stroke.
Adapting the shape selfishly does not even beat this simple strategy. At , two in-line cells that keep their solitary strokes and only adjust their relative phase gain 17% over two lone cells, whereas the selfish pair gains only 14% and the cooperative pair 29%. Each selfish cell improves its own payoff given the stroke of the other, yet together they end up worse off than if neither had changed its shape, much as in a prisoner’s dilemma [29].
To see which cell adapts and how, we compare the strokes of the in-line pair at [Figure 3(d)], measuring the change of a stroke by the relative change in its Fourier coefficients after removing any shift in its timing. The selfish front cell changes its stroke by only 5%, whereas the back cell, which swims in the wake of the front one, adapts by 12%. Cooperating cells both change their strokes by about 27%, and the front cell now adapts not for its own benefit but because its stroke shapes the flow in which its follower swims. Each selfish change does gain [Figure 3(a)], but it also alters the payoff of the other cell, and here this side effect harms both.
Relatives and competitors
Cells in a clone or a colony share their genes, and as natural selection carries these genes on, it also favors the payoff of related cells, through the weighted sum , where the weight that a cell gives to its neighbor is the relatedness of the two cells [30]. It runs from for competitors, which gain when their neighbor loses, through zero for unrelated cells to one for clones [31]. Thus, we can express Eq. (12) as , which interpolates between the selfish and cooperative strokes. Inserting this stroke into Eq. (11), we find that the payoff of the pair, averaged over its two cells, differs from that of a selfish pair by
Figure 4. Relatives and competitors. Payoff per cell of an in-line pair against the relatedness of its cells, measured from that of a selfish pair in units of the cooperative gain , at three separations. The line is the prediction of Eq. (13).
where the cooperative gain , between cooperative and selfish pairs, is set by the influence alone (see Appendix § 13). Here, the first term sets the help a swimmer receives from its neighbor, while the second sets what it gives up to help in return. Since the incentive does not depend on , it cancels in this difference. From Eq. (13) we see that clones () recover the gain that selfish cells forgo, and that competitors () lose more the more they focus on reducing the payoff of the other.
The simulations agree closely with the theoretical curve [Fig. 4], with and on the curve by construction. While the agreement is strong for relatives (), the prediction does worse for competing cells at close range (), as these cells change their strokes so much that the expansion no longer holds. We observe that the two cells of a pair gain almost exactly the same, within 2%, and the front–back asymmetry of the in-line pair plays little role here.
Discussion
Hydrodynamic coupling turns swimming in company into a game, but a lopsided one. The stroke of a swimmer strongly affects its neighbor, while the neighbor gives it little reason to change, and selfish swimmers, which respond only to this weak incentive, miss a gain set by their influence and leave each other worse off than if they had kept their solitary strokes. Because the flow of a force-free swimmer decays slowly, as in two dimensions, this missed gain is long-ranged, and PoA decays only as for swimmers in line.
In three dimensions the dipole flow decays as , and the same argument gives PoA (see Appendix § 11), which confines the dilemma to close neighbors, where hydrodynamic interactions between real swimmers also stand out from noise [32]. In bacterial swarms and other crowded groups the cells are closer than our separations of 5 to 20 cell radii, and the near field will add to the effects described here.
The gain that selfish swimmers miss is available to cells that share their payoffs, as relatives do. Related cells should then cooperate, whereas competing cells pay a cost to hinder each other, as in sperm competition [33]. Natural examples are the clonal cells of a colony, or the sperm of deer mice, which swim faster in groups formed with sperm of the same male while competing with those of other males [34]. Experimentally, we expect unrelated swimmers in line to adapt unequally, with the follower changing its stroke more than twice as much as the leader, whereas related swimmers should both change by similar amounts.
In larger groups the equilibria are harder to define, but as Stokes flow is linear, the influence of a cell on each of its neighbors adds up, and the gain that selfish cells leave unused can grow with the number of neighbors. The same tension between the benefit of a cell and its effect on its neighbors has recently been proposed in chemical sensing, where a cell that absorbs a signal depletes it for the cells around it [35]. Microrobots trained by reinforcement learning on their own reward [36, 37] should likewise end in the selfish equilibrium unless they share it. Even without any signal or contact, the fluid alone makes swimming a social act, and how a cell should swim depends not only on itself but on its company.
Acknowledgments
The author gratefully thanks Julius B. Kirkegaard for his conceptual input and many fruitful discussions, and Lukas H. Kristensen for his thorough feedback on this manuscript.
The lone swimmer at small amplitude
Random starts.—Three optimizations from different random coefficients all converge to the optimal stroke [Figure 5]. Within 800 iterations their payoffs reach that of to within , with two bulges () and three beats per period (), and after removing an arbitrary shift in time their strokes correlate with above 0.999.
Figure 5. Random starts of the lone swimmer. (a) Membrane radius , as in Figure 1(b) of the main text, for three random initial strokes (top) and the strokes they converge to (bottom), shifted in time onto . (b) Distance of the payoff from that of during the optimization.
Without mirror symmetry.—We repeated the lone optimization with all and terms, starting from a random stroke and letting the cell rotate. The optimal stroke is still a wave with that travels from front to back, but it becomes lopsided and turns the cell by about 0.7 radian per period, and the cell swims in a circle with a radius of about one cell radius [Figure 6(a)]. Its payoff over one period is 29% higher than that of the symmetric stroke, because a curved path still makes good progress along the initial heading within a single period [Figure 6(b)]. Over 12 periods, however, it ends only 1.7 radii from its start, against 8.4 for the symmetric stroke.
Figure 6. A lone swimmer without mirror symmetry. (a) Path of the centroid over 12 periods for the optimal stroke without the symmetry (red) and for the mirror-symmetric optimum (black), starting at the origin and heading along , with lengths in cell radii. The outlines at the top show both shapes at . (b) Displacement along the initial heading after periods.
Our objective, the displacement along the body axis over one period, is meaningful only for strokes that keep the heading fixed, which the mirror symmetry guarantees. Finding whether an asymmetric stroke that swims straight can beat the symmetric one would require a longer horizon or a penalty on turning, which we do not pursue here.
Symmetry and lateral pairs.—A lateral neighbor breaks the mirror symmetry of the surroundings of a swimmer, and the constraint could then bind for lateral pairs. Without the symmetry and with the orientation of each cell held fixed, a cooperating lateral pair at raises its payoff by 1.1%. A lone cell under the same conditions, however, already gains about 1% by breaking its symmetry, because a fixed orientation lets an asymmetric stroke score the forward speed of a cell that would in fact turn. The gain of the pair thus comes mostly from this single-cell artifact, and a free cell would turn instead, as shown above. The price of anarchy we report for lateral pairs applies to mirror-symmetric strokes, and the in-line results, where the neighbor does not break the symmetry, are unaffected.
Small-amplitude payoff.—Write the coefficients of Eq. (2) as , where sets the shape of the stroke and is its amplitude, the root-mean-square value of over the membrane and the stroke. A circle that deforms slightly swims only at second order in , because the first-order flow reverses when the stroke reverses. The dissipation is also of second order. Per unit time, the payoff is then
with stroke frequency and two matrices that depend only on the circle. The matrix A gives the swimming speed. A circle translates only through products of neighboring modes, and , so A couples only neighboring modes. The matrix B gives the viscous dissipation. The arguments below use only the fact that both are quadratic forms, and not their explicit entries, which can be computed along the lines of Ref. [18].
Unbounded amplitude.—The bracket in Eq. (14) is a downward parabola in . Its maximum is at , which leaves
Swimming and dissipation are both quadratic in the amplitude, which gives the beat frequency a well-defined optimum but leaves the amplitude free. Since , the payoff keeps growing with the amplitude, and only the membrane can fix it. Optimal strokes in Stokes flow always need a limit on the deformation, such as a fixed area or a bounded amplitude [18, 27, 38], and without one our simulations indeed run away.
Amplitude from the excess membrane.—A membrane that cannot stretch keeps its length , where is the radius of a circle with the same area as the cell. For the shape of Eq. (1) at fixed area, expanding the perimeter to second order in gives the excess length
where . A deformation of mode has on average times larger than , so each mode lengthens the perimeter in proportion to . Averaging over the stroke, the constraint becomes
where is the average of weighted by the power of the stroke in each mode, with L diagonal, so that the amplitude follows from the geometry of the membrane alone. For a single traveling wave , whose mean square is , Eq. (17) gives . Because the swimmer would deform further if it could, the constraint pushes back, and the membrane tension is positive. For the optimal stroke at , the measured gives , against the measured 0.173. The difference comes from the terms beyond second order in the expansion of the perimeter, which grow with the amplitude, as Figure 1(c) of the main text shows.
The wavelength.—Inserting Eq. (17) into Eq. (15) gives the payoff of a stroke shape ,
The optimal shape maximizes this ratio, and its dominant mode sets the wavelength. Short waves use more membrane, since grows as , and at fixed excess their amplitude falls as . In the simulations the benefit does not grow fast enough with to compensate, and the optimum is the longest wave allowed, , at every excess membrane we tried.
How the influence and the incentive decay with distance
The far field of a swimmer.—Let be the force per unit length that a swimmer centered at the origin exerts on the fluid. In two dimensions, the flow it creates is
where is the two-dimensional Stokeslet. Far from the swimmer, , and we expand . The first term multiplies the net force, which is zero, and the flow starts with the second term,
where is the force dipole of the swimmer. The antisymmetric part of is the torque, which is zero. Its trace produces no flow, because the Stokeslet is divergence-free, . Only the symmetric, traceless part remains. The derivative of the Stokeslet is
Contracted with a symmetric, traceless , the first three terms cancel, and only the last one survives. Averaged over a stroke period, the far field is
where is the time-averaged dipole. It decays as , more slowly than the of three dimensions.
For a swimmer that is mirror-symmetric about its axis , the dipole must have the same symmetry, which gives with a single strength . Writing for the angle between and , Eq. (22) becomes
The flow points directly towards or away from the swimmer.
The influence.—The neighbor sits at distance and angle . Only the part of the flow along the swimming direction changes its payoff, and Eq. (23) gives
Over the horizon , the neighbor is carried a distance . The stroke of the swimmer enters only through its dipole strength , which gives the influence .
For in-line pairs (), is of order . For lateral pairs (), the flow at the neighbor is perpendicular to the swimming direction, and the term vanishes. The influence then starts at the next order, , as measured for lateral pairs. The same argument in three dimensions, where the dipole flow decays as , gives and for in-line pairs.
The incentive.—The incentive is the part of the interaction that depends on the stroke of the swimmer itself. A uniform flow cannot contribute to it, because in Stokes flow a swimmer in a uniformly moving fluid behaves exactly as in a fluid at rest and is carried along with the same best stroke. The best stroke can change only through the variation of the flow of the neighbor across the body of the swimmer, given by the gradient of Eq. (22), and through the flow of the swimmer reflected by the body of the neighbor. The variation is of order and acts on the shape changes of the swimmer, on its small oscillations in position, and on the shared dissipation. The reflected flow reaches the neighbor with a gradient of order , the neighbor responds with a dipole of that order, and its flow travels back with a further factor , which makes the reflected flow of order . The incentive is thus of order , a factor below the influence of in-line pairs and comparable to that of lateral pairs. The simulations confirm that the incentive decays as for both in-line and lateral pairs [Fig. 2] of the main text.
Numerical parameters
Table 1 lists the parameters of all simulations. Energies are in units where , and lengths in units of the radius of a circle with the same area as the cell.
| Quantity | Symbol | Value |
| Spatial modes | ||
| Temporal modes | ||
| Basis frequency and period | ||
| Optimization horizon | one period | |
| Viscous weight | ||
| Excess membrane | (varied in Figure 1(c) of the main text) | |
| Points on the membrane | , equally spaced along the membrane | |
| Kernel width | spacing between points | |
| Time step | ||
| Perimeter penalty stiffness | (perimeter within of ) | |
| Optimizer | L-BFGS, memory 100, line-search step |
Table 1. Parameters of the simulations.
The choice of .—Because Stokes flow is rate independent, playing a stroke times faster multiplies its distance per period by and its dissipation by . The payoff of a given shape, , is largest at a beat frequency set by , so only fixes the unit of time. Because our strokes repeat after one period of the Fourier basis, the number of beats per period is a whole number. We choose , for which the optimal beat frequency of the optimal shape falls at three beats per period. The optimal stroke then has its dominant temporal harmonic at , and the highest harmonic carries only of its power.
Horizon.—A lone swimmer repeats its stroke exactly, and optimizing over one period or three periods gives the same stroke, with payoffs per period that agree to . We thus optimize over one period.
Drift of the arrangement.—In the main text each pair is held at a fixed separation and angle. Free swimmers would slowly move apart or together, because the two cells do not swim at exactly the same speed. Table 2 gives the difference in distance per period between the back and front cell of in-line pairs, or between the two cells of lateral pairs, and the number of periods it would take to close the gap between them. The fastest drift, about periods, occurs for selfish in-line pairs at . The arrangement is quasi-static on the time scale of a period.
| Pair | solitary | selfish | cooperative |
| in-line, | () | () | () |
| in-line, | () | () | () |
| in-line, | () | () | () |
| lateral, | 0 (symmetry) | () | () |
| lateral, | 0 (symmetry) | () | () |
Table 2. Difference in distance per period between the two cells of a pair, and in parentheses the number of periods needed to close the gap between them, for the solitary, selfish and cooperative strokes. The cells travel about 0.7 radii per period.
Resolution.— The regularized Stokeslets converge to first order in the spacing between points. Re-evaluating a lone optimum with 96, 192 and 384 points, the differences in distance and payoff halve at each refinement. For the reference stroke, doubling the points from 192 to 384 raises the payoff of a lone swimmer from 0.372 to 0.412, so the production values are about 10% low. Ratios are much less sensitive. Re-evaluating the in-line strokes at with 384 points raises the total payoffs by 9–10% but changes the price of anarchy by only 4%, from PoA − 1 = 0.139 to 0.133, and the cooperative gain per cell by 7%. The small selfish gain, a difference of close numbers, changes by 30%. Solitary strokes at their best relative phase still beat the selfish equilibrium on the finer mesh. Because these strokes were optimized at 192 points, this tests the evaluation rather than equilibria re-optimized on the finer mesh.
Selfish and cooperative strokes near the solitary optimum
We treat the neighbor as a small perturbation of the solitary problem, which gives the strokes of selfish, cooperative and related swimmers, and their payoffs, in closed form.
Setting.— Two identical swimmers are at a distance , and is the angle between the swimming axis and the line joining them. Swimmer uses the stroke , which is its set of Fourier coefficients , and its payoff is Eq. (6) of the main text, evaluated over a whole number of periods. We hold the arrangement fixed, with constant and over the stroke, and evaluate the payoff of each swimmer at that arrangement.
Splitting the payoff.— Because Stokes flow is linear, to leading order swimmer moves with its solitary velocity plus the velocity of the flow that swimmer creates at its position. This splits the payoff of swimmer into three parts,
The first part, , is the payoff the swimmer would have alone.
The second part, , is how far swimmer is carried by the time-averaged flow of swimmer . It depends only on the stroke of swimmer , hence the label, because a flow that is uniform over the size of a swimmer carries it along, whatever stroke it uses. Appendix § 11 shows that decays as in two dimensions.
The third part, , contains everything that depends on both strokes at once, namely the viscous dissipation the two swimmers share, the coupling between the shape changes of swimmer and the gradients of the flow of swimmer , and the flow of swimmer reflected back to it by the body of swimmer . All three decay at least as fast as , as shown in Appendix § 11. When the swimmers are not too close, is thus small compared with .
Two gradients.—Let be the solitary optimum, the stroke that maximizes . Near it, the solitary payoff is a downward parabola with curvature matrix . Because a shift of the stroke in time leaves the solitary payoff unchanged, is zero along this direction, and denotes its pseudoinverse, taken on the other directions. Two gradients, both taken with both swimmers at , describe the interaction. The influence
measures how much swimmer can change how far its neighbor is carried, by changing its own stroke. It is the leading part of the gradient used in the main text, which also contains the smaller term . The incentive
measures how much swimmer can gain for itself from the presence of the neighbor, by changing its own stroke.
The payoff near the solitary optimum.—Let both swimmers change their strokes slightly, to . Expanding each part of Eq. (25) to the lowest order that matters gives
where is the payoff when both use . The first term has no linear part, because is the solitary optimum. The quadratic terms of and are smaller than the ones kept and are dropped. The remaining terms are the loss from leaving the solitary optimum, the gain of swimmer through the coupling from its own change, and the gain it receives from the change of its neighbor.
Selfish, cooperative and related swimmers.—Following Hamilton [30], swimmer maximizes
where the relatedness weighs the payoff of the neighbor. Selfish swimmers have . Cooperative swimmers, which maximize the total payoff, have . Competing swimmers, which gain from the loss of the neighbor, have . Swimmer controls only . By Eq. (28), enters its own payoff through the first two terms and the payoff of the neighbor through . The optimum satisfies
which gives the new stroke
A selfish swimmer () moves away from its solitary stroke by , which is only as large as the small incentive. A cooperative swimmer () moves by , which is dominated by and is as large as the influence. Because , and increasingly so with distance for in-line pairs, the selfish stroke moves less than the cooperative one.
How much the payoff changes.—Inserting Eq. (31) into Eq. (28) and collecting powers of , the terms linear in that involve cancel, and the payoff changes by
The selfish change involves the incentive and does not depend on , and only shifts the parabola. Since is much smaller than , this offset is small compared with the terms in . Averaged over the two swimmers, the payoff of the pair satisfies
which holds even when the two swimmers are not in equivalent positions, as for in-line pairs, and for any relatedness . Measured from the selfish pair, fully competing swimmers () each lose three times the cooperative gain , because each one gives up payoff to harm the other. The selfish gain itself is only of order .
Price of anarchy.—The price of anarchy (PoA) [15] is the total payoff of cooperative swimmers divided by that of selfish swimmers. Each selfish swimmer earns on average, and Eq. (33) gives
The cooperative gain is quadratic in the influence. Since the influence decays as for in-line pairs (Appendix § 11), decays as .
Computing the strokes.—The simulations do not use this expansion, which serves only to explain the results. We find the selfish strokes by letting the two swimmers take turns to maximize their own payoff with L-BFGS, starting from , and stop when neither can gain more than by changing its stroke. This converges within two or three rounds. Because each best response is a local optimization, the result is a Nash equilibrium in the local sense that no swimmer can improve by a small change of its stroke. We find the cooperative strokes by maximizing over both strokes at once. Restarting both optimizations from perturbed strokes gives the same total payoffs to within of the payoff of a lone swimmer.
The relative phase.—Shifting a stroke in time leaves the solitary payoff unchanged. The phase of the stroke is thus a direction in which is flat, which the pseudoinverse in Eq. (31) leaves out. The time-averaged flow does not depend on phase either, so cannot set the phase. Only the small cross term does, for selfish and cooperative swimmers alike. Two swimmers can still lock their phases, but the phase they choose changes their payoffs only by an amount of order .
References
- [1]Eshel Ben-Jacob, Inon Cohen, and Herbert Levine. Cooperative self-organization of microorganisms. Advances in Physics, 49(4):395–554, 2000. doi: 10.1080/000187300405228.
- [2]Wouter-Jan Rappel, Alastair Nicol, Armand Sarkissian, Herbert Levine, and William F. Loomis. Self-organized vortex state in two-dimensional Dictyostelium dynamics. Physical Review Letters, 83(6):1247–1250, 1999. doi: 10.1103/PhysRevLett.83.1247.DOI
- [3]Jens Elgeti, Roland G Winkler, and Gerhard Gompper. Physics of microswimmers—single particle motion and collective behavior: a review. Reports on progress in physics, 78(5):056601, 2015. doi: 10.1088/0034-4885/78/5/056601.DOI
- [4]Raymond E. Goldstein. Green algae as model organisms for biological fluid dynamics. Annual Review of Fluid Mechanics, 47:343–375, 2015. doi: 10.1146/annurev-fluid-010313-141426.DOI
- [5]Edward M. Purcell. Life at low Reynolds number. American Journal of Physics, 45(1):3–11, 1977. doi: 10.1119/1.10903.DOI
- [6]Eric Lauga and Thomas R. Powers. The hydrodynamics of swimming microorganisms. Reports on progress in physics, 72(9):096601, 2009. doi: 10.1088/0034-4885/72/9/096601.DOI
- [7]Geoffrey Ingram Taylor. Analysis of the swimming of microscopic organisms. Proceedings of the Royal Society of London. Series A. Mathematical and Physical Sciences, 209(1099):447–461, 1951. doi: 10.1098/rspa.1951.0218.DOI
- [8]Takuji Ishikawa, M. P. Simmonds, and T. J. Pedley. Hydrodynamic interaction of two swimming model micro-organisms. Journal of Fluid Mechanics, 568:119–160, 2006. doi: 10.1017/S0022112006002631.DOI
- [9]Gwynn J. Elfring and Eric Lauga. Hydrodynamic phase locking of swimming microorganisms. Physical Review Letters, 103:088101, 2009. doi: 10.1103/PhysRevLett.103.088101.DOI
- [10]Nariya Uchida and Ramin Golestanian. Generic conditions for hydrodynamic synchronization. Physical Review Letters, 106(5):058104, 2011. doi: 10.1103/PhysRevLett.106.058104.DOI
- [11]Julius B. Kirkegaard and Raymond E. Goldstein. Filter-feeding, near-field flows, and the morphologies of colonial choanoflagellates. Physical Review E, 94(5):052401, 2016. doi: 10.1103/PhysRevE.94.052401.DOI
- [12]Siddhartha Verma, Guido Novati, and Petros Koumoutsakos. Efficient collective swimming by harnessing vortices through deep reinforcement learning. Proceedings of the National Academy of Sciences, 115(23):5849–5854, 2018. doi: 10.1073/pnas.18000923115.DOI
- [13]John Maynard Smith and George R. Price. The logic of animal conflict. Nature, 246(5427):15–18, 1973. doi: 10.1038/246015a0.DOI
- [14]John F. Nash. Equilibrium points in n-person games. Proceedings of the National Academy of Sciences, 36(1):48–49, 1950. doi: 10.1073/pnas.36.1.48.DOI
- [15]Elias Koutsoupias and Christos Papadimitriou. Worst-case equilibria. In STACS 99, volume 1563 of Lecture Notes in Computer Science, pages 404–413. Springer, 1999. doi: 10.1007/3-540-49116-3_38.DOI
- [16]Nicholas P. Barry and Mark S. Bretscher. Dictyostelium amoebae and neutrophils can swim. Proceedings of the National Academy of Sciences, 107(25):11376–11380, 2010. doi: 10.1073/pnas.1006327107.DOI
- [17]Alexander Farutin, Salima Rafaï, Dag Kristian Dysthe, Alain Duperray, Philippe Peyla, and Chaouqi Misbah. Amoeboid swimming: a generic self-propulsion of cells in fluids by means of membrane deformations. Physical Review Letters, 111(22):228102, 2013. doi: 10.1103/PhysRevLett.111.228102.DOI
- [18]Alfred Shapere and Frank Wilczek. Efficiencies of self-propulsion at low Reynolds number. Journal of Fluid Mechanics, 198:587–599, 1989. doi: 10.1017/S0022112089000261.DOI
- [19]Richard H Byrd, Peihuang Lu, Jorge Nocedal, and Ciyou Zhu. A limited memory algorithm for bound constrained optimization. SIAM Journal on scientific computing, 16(5):1190–1208, 1995. doi: 10.1137/0916069.DOI
- [20]Albert Alonso. Mind the Gradient: Differentiable computational methods in microorganism behaviour studies. PhD thesis, University of Copenhagen, 2024. URL https://nbi.ku.dk/english/theses/phd-theses/albert-alonso/albert_alonso.pdf.
- [21]John Happel and Howard Brenner. Low Reynolds Number Hydrodynamics: With Special Applications to Particulate Media. Martinus Nijhoff, The Hague, 1983. doi: 10.1007/978-94-009-8352-6.DOI
- [22]Ricardo Cortez. The method of regularized stokeslets. SIAM Journal on Scientific Computing, 23(4):1204–1225, 2001. doi: 10.1137/S106482750038146X.DOI
- [23]W. Rawicz, K. C. Olbrich, T. McIntosh, D. Needham, and E. Evans. Effect of chain length and unsaturation on elasticity of lipid bilayers. Biophysical Journal, 79(1):328–339, 2000. doi: 10.1016/S0006-3495(00)76295-3.DOI
- [24]Mehdi Ranganathan, Alexander Farutin, and Chaouqi Misbah. Effect of cytoskeleton elasticity on amoeboid swimming. Biophysical Journal, 115(7):1316–1329, 2018. doi: 10.1016/j.bpj.2018.08.005.DOI
- [25]Drazen Raucher and Michael P. Sheetz. Characteristics of a membrane reservoir buffering membrane tension. Biophysical Journal, 77(4):1992–2002, 1999. doi: 10.1016/S0006-3495(99)77040-2.DOI
- [26]François Alouges, Antonio DeSimone, Laetitia Giraldi, Yizhar Or, and Oren Wiezel. Energy-optimal strokes for multi-link microswimmers: Purcell’s loops and Taylor’s waves reconciled. New Journal of Physics, 21(4):043050, 2019. doi: 10.1088/1367-2630/ab1142.DOI
- [27]Sébastien Michelin and Eric Lauga. Efficiency optimization and symmetry-breaking in a model of ciliary locomotion. Physics of Fluids, 22(11):111901, 2010. doi: 10.1063/1.3507951.DOI
- [28]Hanliang Guo, Hai Zhu, Ruowen Liu, Marc Bonnet, and Shravan Veerapaneni. Optimal ciliary locomotion of axisymmetric microswimmers. Journal of Fluid Mechanics, 927:A22, 2021. doi: 10.1017/jfm.2021.744.DOI
- [29]Robert Axelrod and William D. Hamilton. The evolution of cooperation. Science, 211 (4489):1390–1396, 1981. doi: 10.1126/science.7466396.DOI
- [30]W. D. Hamilton. The genetic evolution of social behaviour. I. Journal of Theoretical Biology, 7(1):1–16, 1964. doi: 10.1016/0022-5193(64)90038-4.DOI
- [31]William D. Hamilton. Selfish and spiteful behaviour in an evolutionary model. Nature, 228 (5277):1218–1220, 1970. doi: 10.1038/2281218a0.DOI
- [32]Knut Drescher, Jörn Dunkel, Luis H. Cisneros, Sujoy Ganguly, and Raymond E. Goldstein. Fluid dynamics and noise in bacterial cell–cell and cell–surface scattering. Proceedings of the National Academy of Sciences, 108(27):10940–10945, 2011. doi: 10.1073/pnas.1019079108.DOI
- [33]G. A. Parker. Sperm competition and its evolutionary consequences in the insects. Biological Reviews, 45(4):525–567, 1970. doi: 10.1111/j.1469-185X.1970.tb01176.x.DOI
- [34]Heidi S. Fisher and Hopi E. Hoekstra. Competition drives cooperation among closely related sperm of deer mice. Nature, 463(7282):801–803, 2010. doi: 10.1038/nature08736.DOI
- [35]Julius B. Kirkegaard, Albert Alonso, and Robert G. Endres. Limits of cell sensing in observer-absorber assemblies. Under review, 2026.
- [36]Simona Colabrese, Kristian Gustavsson, Antonio Celani, and Luca Biferale. Flow navigation by smart microswimmers via reinforcement learning. Physical Review Letters, 118(15):158004, 2017. doi: 10.1103/PhysRevLett.118.158004.DOI
- [37]Albert Alonso and Julius B. Kirkegaard. Learning optimal integration of spatial and temporal information in noisy chemotaxis. PNAS Nexus, 3(7):pgae235, 2024. doi: 10.1093/pnasnexus/pgae235.DOI
- [38]J. E. Avron, O. Gat, and O. Kenneth. Optimal swimming at low Reynolds numbers. Physical Review Letters, 93:186001, 2004. doi: 10.1103/PhysRevLett.93.186001.DOI





