Examples tagged with cooperationllms.txt

Select an example to explore it in the playground.

Beginner - Introductory Models
Intermediate - Classic Dynamics
Advanced - Complex Simulations

Hawk-Dove Game: When Does Fighting Pay?

Hawk-Dove game theory simulation of the evolutionarily stable strategy: when a fight costs more than the prize, Hawks and Doves settle into a stable mix; cheapen the fight below the prize and the population escalates into all-out war.

Level: Advanced

game-theoryevolutionary-gamemixed-strategyequilibriumconflictcooperationreplicator-dynamicsreinforcing-loopbalancing-loop

  • Stocks: hawk population
  • Flows: switches to Hawk, switches to Dove
  • Feedback Loops: imitation of success (reinforcing), frequency-dependent payoff (balancing)
  • Probes: hawk_fraction, avg_payoff, conflict_cost, hawk_advantage

Prisoner's Dilemma: Noise, Tit-for-Tat, and Forgiveness

One accidental defection turns unforgiving tit-for-tat into a prisoner's dilemma revenge spiral. Forgive some of those slips and cooperation holds.

Level: Advanced

game-theorycooperationreciprocitytit-for-tatnash-equilibriumsocial-dilemmarepeated-gamenoisesimpy

  • Stocks: trust (last move seen), cumulative payoff
  • Flows: defections, retaliations, forgiveness events
  • Feedback Loops: retaliation echo (reinforcing), forgiveness (balancing)
  • Probes: cooperation_rate, round_payoff, cumulative_payoff