⬡PipelineGaming & SimulationFree
OpenSpiel — Game Theory & RL Research Framework
DeepMind's Apache-2.0 framework for game theory and RL research: 70+ games (Chess, Go, Poker, Hex), CFR, MCTS, deep RL, and Nash equilibrium solvers.
OpenSpiel — Game Theory & RL Research Framework
OpenSpiel is Google DeepMind's comprehensive framework for research in reinforcement learning and game theory. It implements 70+ two-player and multi-player games — from board games (Chess, Go, Hex, Breakthrough) to card games (Poker, Bridge, Skat) to matrix games and auction mechanisms — along with a library of algorithms including CFR (Counterfactual Regret Minimization), MCTS, deep RL baselines, and Nash equilibrium solvers.
Key Features
- 70+ games: perfect/imperfect information, zero-sum and general-sum
- Algorithms: CFR, CFR+, MCCFR, MCTS, AlphaZero-style search, DQN, REINFORCE, Actor-Critic
- Nash equilibrium solvers and game theory utilities
- Python and C++ APIs — same game logic in both languages
- PyTorch and TensorFlow integration for deep RL agents
- Used in AlphaStar, AlphaZero, and Pluribus research
Quick Start
pip install open_spiel
import pyspiel
game = pyspiel.load_game("chess")
state = game.new_initial_state()
print(state) # Starting board
# Simulate a random game
import random
while not state.is_terminal():
actions = state.legal_actions()
action = random.choice(actions)
state.apply_action(action)
print("Returns:", state.returns()) # [1.0, -1.0] = white wins
npx ai-supply add open-spiel-game-theory-rl
Curated mirror of the open-source OpenSpiel (Apache-2.0). Get it from the source.