---
kind: concept
slug: evolutionary-dynamics
title: Evolutionary dynamics (sexual recombination as a learning rule)
summary: >-
  How sexual recombination and selection change allele frequencies over generations, and when that process matches a multiplicative-weights learning rule. Covers the two update orders (selection before or after recombination), the marginal-only equivalence, and what regret guarantees follow. Based on one paper so far.
tags: [evolution, game-theory, learning-dynamics]
papers: ["1502.05056"]
related: [neuroevolution]
status: draft
updated_at: 2026-11-01
---

## Overview

The question is how a population's gene frequencies change when individuals
reproduce sexually, recombining genes from two parents, and fitness selects
which genotypes survive. The shared core is a generation step: selection
weights each genotype by its fitness, and recombination mixes the genes of the
selected genotypes. Each gene can then be read as a player that keeps a
probability over its alleles, the versions it can take [arxiv:1502.05056 §2.1].

The invariant the variants share is that the allele marginals, not the full
joint population, follow a multiplicative-weights (polynomial-weights) update
with a parameter-free or mixed utility [arxiv:1502.05056 §3] [arxiv:1502.05056 §4].
The earlier theory of this link needed weak selection and an assumption that
the population stays a product of independent allele frequencies; the paper
treats the general case [arxiv:1502.05056 §1].

## Variants

### Selection before recombination (SR)

Each genotype is first weighted by fitness, then the population recombines.
For two genes, the SR update mixes a recombinant term, weighted by the
recombination rate r, with a selection-only term [arxiv:1502.05056 §2.1]
[arxiv:1502.05056 eq. 1]. Its gene-level marginals equal a parameter-free
polynomial-weights update, for any fitness matrix, any r and any population
distribution [arxiv:1502.05056 §3] [arxiv:1502.05056 prop. 1].
Card: [On Sex, Evolution, and the Multiplicative Weights Update Algorithm](/papers/1502.05056).

### Recombination before selection (RS)

Recombination first produces the product of the two gene marginals, then
selection acts on the mixed population [arxiv:1502.05056 eq. 2]. The gene
marginals match a polynomial-weights update whose utility mixes an
independent value (using the other gene's marginal) and a conditional value
(using the joint), with mixing weight equal to r [arxiv:1502.05056 §4]
[arxiv:1502.05056 prop. 2]. Card: [On Sex, Evolution, and the Multiplicative Weights Update Algorithm](/papers/1502.05056).

### k loci

For k genes with several alleles each, the paper gives an SR update as a sum
over all subsets of genes inherited from the first parent, and an RS update as
a product of marginals. The SR marginal lemma and the polynomial-weights
correspondence hold for any k [arxiv:1502.05056 app. A]. Card:
[On Sex, Evolution, and the Multiplicative Weights Update Algorithm](/papers/1502.05056).

## When to use which

| Situation | Use | Why |
|---|---|---|
| You only need each gene's marginal behaviour and the joint is not observed | Marginal results (SR or RS) | The paper's equivalence is stated for marginals only [arxiv:1502.05056 §6] |
| Recombination happens before selection (mating, then fitness) | RS | RS matches the polynomial-weights update with a utility mixed by r [arxiv:1502.05056 §4] |
| Selection happens before recombination | SR | SR matches the parameter-free update [arxiv:1502.05056 §3] |
| Two genes and an explicit joint population | Two-gene update in the pseudocode | The joint has n·m entries, so one generation is O(n·m) (our count from the update, not a figure the paper gives) |
| More than two genes | k-locus formulas | The joint has the product of allele counts and SR sums over 2^k subsets [arxiv:1502.05056 app. A] |
| You want a regret guarantee for each gene | Diminishing-regret bound for SR | The bound holds when fitness entries lie in [1 − s, 1 + s], with s in (0, 1/2) [arxiv:1502.05056 §5.1] |
| You want a fitness or quality guarantee | None from this paper | The paper stresses that regret does not give one, and the outcome can be a poor local maximum [arxiv:1502.05056 §6] |

The per-gene learning rule needs the full joint distribution to compute the
conditional utility, so each gene would have to observe the whole population
[arxiv:1502.05056 §2.3]. This is a model assumption, not a constraint the
paper resolves.

## Implementation sketch

The paper's update rules restated in our own notation. Not the authors' code;
the paper releases no code. Shapes: P and W are (n, m).

```pseudocode
# One SR generation  [arxiv:1502.05056 eq. 1]
# Input:  P (n, m) joint frequencies, sum 1; W (n, m) fitness; r in [0, 0.5]
# Output: next P (n, m)

def sr_step(P, W, r):
    # Average fitness of the current population  [arxiv:1502.05056 §2.1]
    w_bar = sum(P * W)
    # Selection-only term  [arxiv:1502.05056 eq. 1]
    selected = P * W / w_bar
    # Recombinant term; the sums factorise into row and column sums  [arxiv:1502.05056 §3]
    row = sum(P * W, axis=1)
    col = sum(P * W, axis=0)
    recombinant = outer(row, col) / w_bar**2
    # Mix with the recombination rate  [arxiv:1502.05056 eq. 1]
    return r * recombinant + (1 - r) * selected
```

```pseudocode
# One RS generation  [arxiv:1502.05056 eq. 2]
# Input:  P (n, m); W (n, m); r
# Output: next P (n, m)

def rs_step(P, W, r):
    # Marginals of the current population  [arxiv:1502.05056 §2.1]
    x = sum(P, axis=1)
    y = sum(P, axis=0)
    # Recombined population is the product of the marginals  [arxiv:1502.05056 §2.1]
    recombined = outer(x, y)
    # Select the mixed population  [arxiv:1502.05056 eq. 2]
    mixed = W * (r * recombined + (1 - r) * P)
    # Normalise  [arxiv:1502.05056 eq. 2]
    return mixed / sum(mixed)
```

```pseudocode
# Parameter-free polynomial-weights step for one gene  [arxiv:1502.05056 §2.3]
# Input:  x (n,) strategy; g (n,) expected utility per allele
# Output: next strategy (n,)

def pw_step(x, g):
    # Weight each allele by its expected utility, renormalise  [arxiv:1502.05056 §2.3]
    weighted = x * g
    return weighted / sum(weighted)
```

The utility for gene 1 is conditional, using P(j | i) = p_ij / x_i, or
independent, using the other gene's marginal; the RS case mixes the two with
weight r [arxiv:1502.05056 §2.3] [arxiv:1502.05056 §4]. Check the SR and RS
steps against the paper's worked table before relying on them, because the
RS column there does not add up (see Contradictions).

## Contradictions

- **Earlier theory versus this paper.** The earlier result that gene-level
  multiplicative weights describe sexual dynamics needed weak selection and
  product-form populations [arxiv:1502.05056 §1] [arxiv:1502.05056 §3]. The
  paper argues the product assumption is inconsistent with the dynamics
  [arxiv:1502.05056 app. B] and drops both assumptions for the marginal
  equivalence [arxiv:1502.05056 prop. 1] [arxiv:1502.05056 prop. 2].
- **Convergence and fitness claims.** The paper revises the convergence and
  fitness implications the earlier work drew for coordination games
  [arxiv:1502.05056 §6]. Its own result gives only diminishing regret per gene
  [arxiv:1502.05056 §5.1] [arxiv:1502.05056 cor. 3], and it reports that no
  fitness or quality guarantee follows from that [arxiv:1502.05056 §6]. Convergence under weak
  selection rests on known results, and for general fitness matrices the paper
  reports that convergence is open [arxiv:1502.05056 §5.2] [arxiv:1502.05056 §6].
- **Internal inconsistencies in the paper.** The text restricts r to [0, 0.5]
  while the main proposition is stated for r in [0, 1] [arxiv:1502.05056 §2.1]
  [arxiv:1502.05056 §3]. The RS column of one table does not sum to its printed
  row total [arxiv:1502.05056 tab. 3]. These are not resolved here; the values
  to test against come from the dynamics, not the table.

## Papers

- [On Sex, Evolution, and the Multiplicative Weights Update Algorithm](/papers/1502.05056): shows that gene marginals under SR and RS follow polynomial-weights updates for general fitness, recombination rate and population, and limits the regret implication to diminishing regret.
