Three branches leave the root, each an option under uncertainty with the same objective expected value: a certain "Safe" payoff, a 50/50 "Coin-flip" gamble, and a 10% "Longshot" bet. Two agents pick a branch every trial and then really sample an outcome from its true probabilities — you watch both the choice and the payout happen live.
The rational agent (cyan orb) maximizes expected utility over the objective probabilities:
u(x) = sign(x)·(|x|+1)^(1−r) − 1
EU(choice) = Σ p·u(x)
The biased agent (orange orb) instead maximizes cumulative prospect theory value: it distorts probabilities (overweighting small ones, the "certainty effect") and treats losses as roughly twice as painful as equal gains feel good (loss aversion):
w(p) = p^γ / (p^γ + (1−p)^γ)^(1/γ)
v(x) = x^0.88 if x ≥ 0
v(x) = −λ·(−x)^0.88 if x < 0
PT(choice) = Σ w(p)·v(x)
- Payoff frame — flips every payoff's sign. In the gain frame a risk-averse rational agent prefers Safe; flip to the loss frame with the same magnitudes and the biased agent often flips to the Longshot — the classic Kahneman–Tversky reflection effect: risk-averse for gains, risk-seeking for losses.
- Risk aversion — curvature of the rational agent's utility function; higher values make it favor the certain option even when expected values tie.
- Loss aversion λ — how much more a loss of size x hurts than an equal gain helps; only bites once payoffs go negative.
- Probability distortion γ — at γ=1 the biased agent sees true probabilities; below 1 it overweights the Longshot's 10% chance and underweights the Coin-flip's 50%, pulling choice toward extremes — the certainty effect.
The "cost of bias" stat is the rational agent's realized earnings-per-trial minus the biased agent's — a live estimate of what systematic cognitive biases cost a decision-maker who otherwise faces the exact same tree.