Technical Project

Nash Equilibrium Solver

Iterative algorithm to find equilibrium strategies in non-cooperative games.

Interactive Visualization

Live Python Simulation Data

Strategy Convergence (Fictitious Play)

24681114172024283236404448525660646872768084889296100Iteration00.250.50.751Probability
  • P1: Rock
  • P1: Paper
  • P1: Scissors
  • Nash Eq (0.33)

Shows how Player 1's mixed strategy probabilities converge to the Nash Equilibrium (1/3, 1/3, 1/3) over time.

The Concept (In Plain English)

In any competitive situation—like pricing a product against a competitor or playing poker—your best move depends on what you think *they* will do. But they are thinking the same thing about *you*. A 'Nash Equilibrium' is the stalemate where neither side can gain an advantage by changing their strategy alone. This tool simulates two players learning from each other over time until they reach that perfect, unbeatable balance point.

The Build (Technical Deep Dive)

This solver uses the Fictitious Play iterative algorithm to approximate Nash Equilibrium in 2-player zero-sum games. It simulates thousands of rounds where each player updates their beliefs about the opponent's strategy based on historical play frequencies. The visualization tracks the convergence of strategy probabilities over time, demonstrating how rational agents settle into equilibrium even without explicit coordination.

Key Metrics

Iterations1,000
Convergence< 0.01 Error
Game TypeZero-Sum

Tech Stack

Game TheoryPythonAlgorithm DesignSimulation