Matrix Game & Nash Equilibrium Lab

Play compact two-action games, inspect payoffs, and observe how opponent intelligence changes strategic behavior.

Matrix Game Lab

Your action

You0
Opponent0
Rounds0

How this teaches game theory

Complete scenario, mode, and level guide

Use this reference after playing to understand what each setting changes and which game-theory idea it demonstrates.

Scenario explanations

Prisoner's Dilemma

Actions: Cooperate or Defect.

Each player is individually tempted to defect. Defection is a dominant strategy because it gives a better payoff regardless of the opponent's choice. However, when both players defect, both receive less than they would have received through mutual cooperation.

  • Main concept: dominant strategies and Nash equilibrium
  • Key tension: individual rationality versus collective welfare
  • What to observe: whether repeated interaction encourages cooperation

Coordination Game

Actions: Concert or Cinema.

Both players benefit from choosing the same activity, but each player prefers a different coordinated outcome. The game has two pure-strategy Nash equilibria, so the main challenge is not finding an equilibrium but selecting the same one.

  • Main concept: multiple Nash equilibria
  • Key tension: coordination and equilibrium selection
  • What to observe: how predictable behavior helps players coordinate

Matching Pennies

Actions: Heads or Tails.

One player benefits when the choices match, while the other benefits when they differ. Any predictable pure strategy can be exploited. The unique Nash equilibrium is a mixed strategy in which each action is selected with probability one half.

  • Main concept: mixed-strategy Nash equilibrium
  • Key tension: predictability versus randomization
  • What to observe: how adaptive opponents exploit repeated patterns

Mode explanations

Human vs Computer

You choose one action each round, and the computer chooses according to the selected level. This is the primary learning mode because it lets you test a strategy against increasingly capable opponents.

  • Use Level 1 to learn the payoff matrix.
  • Use Level 2 to study best responses.
  • Use Level 3 to test whether your behavior becomes predictable.

Human vs Human

Two people share the same device. Player 1 selects an action first; it is stored without resolving the round. Player 2 then selects an action, after which both choices and payoffs are revealed.

  • Useful for classroom demonstrations and pair work.
  • The level setting does not affect either human player.
  • Players should avoid watching each other's selection.

Computer vs Computer

The application automatically simulates twenty rounds when a new match begins. Both computer players use the currently selected level logic, allowing quick observation of repeated-game outcomes.

  • Useful for comparing aggregate behavior.
  • Press New match to generate another simulation.
  • Level 1 is stochastic; repeated runs may differ.

Level explanations

Level 1 — Random

The computer selects each action with equal probability and does not examine previous rounds. It cannot deliberately exploit you.

  • Difficulty: introductory
  • Learning goal: understand actions, payoffs, and basic outcome frequencies
  • Best use: first exploration of every scenario

Level 2 — Best Response

The computer looks at your most recent action and selects the action that produces the higher payoff against that action. It assumes that you may repeat your last move.

  • Difficulty: intermediate
  • Learning goal: understand best-response reasoning
  • Best use: compare stable and alternating strategies

Level 3 — Adaptive

The computer counts your previous actions, predicts the action you have used most often, and chooses a best response to that prediction. Repeated patterns therefore become exploitable.

  • Difficulty: advanced
  • Learning goal: study adaptation, predictability, and mixed behavior
  • Best use: Matching Pennies and repeated strategic experiments

How every combination behaves

ModeLevel 1Level 2Level 3
Human vs ComputerThe computer acts randomly. Focus on reading the matrix and comparing payoffs.The computer best-responds to your previous action. Avoid blindly repeating a move.The computer learns your most frequent action. Use balanced or deliberately changing behavior.
Human vs HumanBoth participants choose manually. The level selector is intentionally inactive in strategic terms and does not alter either player's decisions.
Computer vs ComputerTwo random agents generate a baseline simulation.Both agents react to recent play, which may create stable outcomes or cycles depending on the scenario.Both agents adapt to observed frequencies. Outcomes illustrate how learning rules interact over repeated rounds.
Suggested learning path: Begin with each scenario in Human vs Computer, Level 1. Repeat it at Levels 2 and 3, then use Computer vs Computer to compare long-run behavior. Finish with Human vs Human and ask both players to explain their strategy before revealing the result.