Evolutionary simulation of tribal survival under selection pressure on patriotism. Each agent carries a patriotism trait (0–1) — how much they sacrifice for the group. Sacrifice raises individual death risk but keeps the tribe alive; tribes whose mean patriotism drops below a threshold collapse.
Tribe patriotism over 200 generations — higher starting patriotism delays but doesn't prevent collapse.
Mean generation of death by initial patriotism — tribes starting too low die immediately; higher starting patriotism buys more time but yields diminishing returns.
jax
numpy
matplotlib
# Run a sweep over initial patriotism values
python scripts/run.py --init_sacrifice 0.5
# Regenerate figures
python scripts/visualize.py --y_param init_sacrifice