Chapter 14 · Simulation

AI Agent Strategy Tournament

← Chapter 14

Rounds0
Best agent—
Best avg. payoff0
Mutual cooperation0%

Your move (you are the row player):

Recent rounds (you / agent → your payoff):

Latest results

    How to use

    Choose a game, a mode and a level and press Run experiment. Most agents are random or learn from history, so Another run repeats the experiment to show how much the results vary. Reset clears the results.

    Why game theory?

    This last lab compares not a single game but classes of strategies. You can observe how success depends on the environment, the opponent, feedback, noise and the adaptation rule. No strategy is best in every strategic environment.

    Scenarios (row payoff, column payoff)

    • Prisoner’s Dilemma: actions Cooperate / Defect; payoffs (3,3), (0,5), (5,0), (1,1). It rewards cooperation but creates a temptation to defect. The final metric is the mutual cooperation rate.
    • Matching Pennies: Heads / Tails; if the coins match the row player wins 1, otherwise the column player wins 1. It is zero-sum with no pure-strategy equilibrium; unpredictability matters. The final metric is the matching rate.
    • Coordination Game: A / B; both get 3 if they match, otherwise 0. It highlights the formation of conventions. The final metric is the coordination rate.
    • Rock–Paper–Scissors: cyclic dominance rewards mixed or adaptive behaviour over any single fixed action. The final metric is the tie rate.

    Modes

    • Agent vs. agent: agent A (row) and agent B (column) play 60 rounds (Level 1) or 120 rounds (Levels 2–3).
    • Human vs. agent: you are the row player and choose every action yourself with the action buttons; agent B adapts to your history. Run experiment starts a new match.
    • Full tournament: every agent plays every other agent once (round-robin) and the ranking is by total payoff.

    Agents

    • Random: a uniformly random action.
    • Always first / Always second: a fixed action (for example always Cooperate / always Defect).
    • Best Response: predicts the opponent’s most frequent action so far and plays the best response to it.
    • Fictitious Play (Level 2 and up): the best response to the observed frequency of all of the opponent’s past actions.
    • Reinforcement (Level 2 and up): keeps an exponentially weighted average payoff for each action (each new payoff moves the estimate 12% of the way, so recent results count more), usually plays the best one, and explores at random 15% of the time.

    Levels

    • Level 1: Fixed strategies: Random, always-first, always-second and the simple best-response agent.
    • Level 2: Learning agents: fictitious play and reinforcement agents that update from the observed history are added.
    • Level 3: Noisy environment: learning agents; every executed action changes with probability 8%, testing robustness and forgiveness under imperfect execution.

    Interpretation

    Tournament success depends on context. A strategy may beat one opponent and do badly against another; so an evaluation should include payoff, stability, exploitability and robustness.