An extensive-form games simulator project developed for the Game Theory course at Sharif University of Technology.
This project implements advanced game-theoretic concepts natively in Python, specifically focusing on modeling sequential move games, simultaneous actions, and calculating optimal strategies using game trees.
- Extensive Form Game Modeler (
game.py): A comprehensive Python class usingNetworkXto construct, manipulate, and visualize complex game trees. Features include:- Node and edge definitions for players and actions.
- Payoff matrices modeling and hierarchical tree visualization.
- Support for modeling simultaneous moves alongside sequential actions.
- Subgame Perfect Nash Equilibrium (SPNE) Solver: Deep dive into game theory logic via
spne.ipynb. Computes SPNE recursively across subgames to find optimal strategies for all players. - Graph Visualizations: Leverages
matplotlibandNetworkXto draw structured, easy-to-read game trees directly in Jupyter environments.
- Language: Python
- Environment: Jupyter Notebook
- Core Libraries: NetworkX (for graph theory mapping), Matplotlib
Sharif University of Technology - Computer Science Department