Active Inference: Courtship vs Survival
Courting to survive, and to learn: an active-inference reading of the courtship–survival trade-off
A classic life-history problem asks how an organism with a finite
life should divide effort between surviving and reproducing. My earlier
mathematical model of courtship versus survival [1] solved a two-year version by maximizing
lifetime fitness over mating
effort m, giving the optimal effort. So the key idea is invest hard now when survival
is poor or mates are abundant now; conserve when the future is bright.
Natural selection shapes organisms whose internal models encode adaptive prior preferences. Expected free energy minimization therefore provides a mechanistic process theory for achieving fitness rather than replacing evolutionary theory. Hence, I recast the same problem as active inference i.e. action selection by minimization of expected free energy (EFE) and
show two things. First, the classic optimum is recovered almost exactly as the pragmatic (preference-satisfying) limit of EFE
minimization, so nothing is lost. Second, active inference adds
a term the optimizer [1] did not express: when mate availability is uncertain
(rather than a known constant f), courtship, and more specifically, mate assessment, acquires
epistemic value, and the agent engages in mate
sampling i.e. prospecting to learn how good the mating market is
before committing costly, risky courtship.
In other words, the original optimization [1] assumes mate availability is known. Active inference instead treats it as a hidden state whose uncertainty naturally generates information-seeking behaviour without adding an extra objective.
All results are produced with
SPM’s variational message passing (spm_MDP_VB_X).
1. The trade-off and its optimal solution
Consider a two-year life. In year 1 the organism allocates a fraction
m ∈ [0,1] of its time to courtship and the rest to
foraging. Courtship yields m·f₁ matings now but reduces
survival to year 2, modelled as s = 1 − m²; a survivor then
obtains f₂ matings. With a maximum survival probability
Smax, expected lifetime reproductive success is
W(m) = m·f₁ + Smax·(1 − m²)·f₂
Because d²W/dm² = −2·Smax·f₂ < 0, W is
concave and its unique interior stationary point maximizes it:
m* = min( f₁ / (2·Smax·f₂), 1 )
The optimum rises as Smax falls (a doomed animal should
breed now i.e. terminal investment) or as f₁ grows,
and falls as f₂ grows (bank on the future).
2. The same problem as active inference
An active-inference agent does not maximize an external fitness
function; it holds a generative model of its world and selects the
policy π that minimizes expected free energy,
G(π) = − E_Q[ ln P(o | C) ] (pragmatic: expected prior preference)
+ E_Q[ H[P(o | s)] ] terms (epistemic: expected information gain).
I build a partially-observable Markov decision process (POMDP) whose
pragmatic term reproduces W, then relax an
assumption to expose the epistemic term.
2.1 Generative model (core)
Hidden states. Viability
{alive, dead}(dead absorbing) and a courtship factor whose controllable transitions set the enacted effort level.Effort as a policy. The agent enacts one of
Kdiscrete effort levelse_k ∈ [0,1]; it infers which level minimizesGrather than solving calculus.Survival in the transitions. From alive,
P(stay alive | e) = Smax·(1−e²)i.e. the survival costs = 1−m²andSmaxlive in the transition matrixB.Fitness weights as preferences. A mating outcome carries log-preference
cMate; a future / survival outcome carriescFuture. WithP(mated | e) = e, the expected preference of efforteisV(e) = e·cMate + Smax·(1 − e²)·cFuture , e* = cMate / (2·Smax·cFuture),algebraically identical to
m*undercMate ↔︎ f₁,cFuture ↔︎ f₂. The 2014 optimum [1] is the pragmatic limit of expected-free-energy minimization.
In active inference, agents possess prior preferences over outcomes rather than an explicit fitness function. Choosing logarithmic preferences proportional to expected reproductive success causes expected free energy minimization to recover the same optimal strategy.
2.2 Recovering the classic predictions
Solving the POMDP with spm_MDP_VB_X:
- Safe vs dangerous world (Fig. 1). With
Smax = 1the policy posterior peaks ate ≈ 0.5(m* = 0.5); withSmax = 0.4it collapses ontoe → 1i.e. terminal investment emerges as an inference, not an assumption.
- Survival sweep (Fig. 2). The posterior-mean effort tracks
m*(Smax) = min(f₁/(2·Smax·f₂),1)acrossSmax ∈ [0.3, 1].
m*(Smax). - Future-mates sweep (Fig. 3). Effort falls
monotonically as
f₂rises, trackingm*i.e. the “bright future ⇒ conserve” prediction.
f₂ rises.The active-inference curve lies slightly below the analytic one near
the e = 1 boundary, reflecting (i) the bounded effort grid
and (ii) the risk term in G, which makes
the agent mildly risk-sensitive, a first thing the reframing adds over
pure expected-value maximization. Unlike expected-value optimization, expected free energy penalizes uncertain outcomes, producing mildly conservative behaviour near decision boundaries.
3. What active inference adds: courting to learn
The 2014 model [1] assumes f₁, f₂ are known. Real
animals rarely know how many receptive mates are around; assessing this
is the ethological phenomenon of mate sampling. Active
inference captures it for free through epistemic value.
I make the mating market a persistent hidden state
{rich, poor} (rich markets rarer) and give the agent,
alongside foraging and (risky) courtship, a cheap
prospect action that returns a signal about the market
but does not itself mate. Solving the two-decision (T = 3)
model (Fig. 4):
- When the market is known to be rich, the agent courts; when known poor, it forages. Neither needs to sample.
- When the market is unknown, the agent prospects first i.e. it courts (or forages) in year 2 only after learning the market in year 1.
- Crucially, prospecting is chosen only when it is
informative (i.e. only when it is expected to reduce uncertainty about the mating market): with an identical prior but an
uninformative prospect (signal precision
zeta = 0), P(prospect) collapses from1.00to0.17. The +0.83 difference is pure information gain i.e. the epistemic term the 2014 optimizer [1] does not represent.
Thus early courtship / assessment can be partly
epistemic: organisms display and prospect not only to mate now
but to estimate the reproductive market and allocate later
effort accordingly. This is a qualitatively new, testable prediction
(e.g. more sampling under greater market uncertainty), unavailable to a
fitness optimizer [1] that takes f as given.
4. Discussion
Framing the courtship–survival trade-off as active inference is not merely a notational change. The active-inference formulation subsumes the classical optimizer as a limiting case while naturally extending it to partially observable environments. Rather than introducing separate objectives for fitness maximization and information gathering, both emerge from minimizing expected free energy. Classical life-history optimisation therefore appears as a special case of a more general inferential framework.
Active inference provides a generative-model interpretation of the original fitness function: Smax becomes a
transition probability, f₁, f₂ become prior preferences,
and the optimum becomes a belief about which policy minimizes expected
surprise. It generalizes the account to
uncertainty: the same machinery that recovers the optimum also predicts
mate sampling, risk-sensitive hedging, and (with learnable
A/B) experience-dependent tuning of effort,
none of which the static optimizer [1] addresses.
The model is deliberately minimal and its parameters are illustrative levers, not data fits; the contribution is conceptual i.e. a demonstration that a canonical behavioural-ecology optimum is the pragmatic special case of a broader inferential principle, whose epistemic component turns “courtship versus survival” into “courtship to survive, and courtship to learn”.
Reference
[1] Pradeep D, (2014). "A mathematical model of courtship versus survival."
https://blog.pradeepd.com/2014/11/mathematical-model-of-courtship-versus.html




Comments
Post a Comment