--- id: open-spiel version: "2.0.2" license: Apache-2.0 license_treatment: permissive maintenance: active --- # open-spiel — A Framework for Reinforcement Learning in Games License: permissive · Maintenance: active · Downloads: 139.2K/mo ## What it is and what it does OpenSpiel is a research framework for game-based reinforcement learning and game theory, built on a C++ core with Python bindings. It provides a collection of game environments—ranging from classic games to grid worlds and social dilemmas—along with algorithms for learning and planning. The framework represents games as procedural extensive-form games and supports n-player scenarios with varying information structures (perfect and imperfect information), move timing (turn-taking and simultaneous), and payoff structures (zero-sum, cooperative, general-sum). The package is designed for researchers studying multi-agent learning dynamics, game-theoretic algorithms, and reinforcement learning in complex interactive settings. It includes tools for analyzing learning dynamics and standard evaluation metrics. Games and core APIs are implemented in C++ for performance, while algorithms and analysis tools are available in both C++ and Python, allowing researchers to prototype in Python or optimize critical paths in C++. Use it for: - Implement and test multi-agent reinforcement learning algorithms on standardized game benchmarks. - Study game-theoretic properties and learning dynamics in cooperative, competitive, and mixed-motive games. - Develop and evaluate AI agents for imperfect-information games. - Prototype game environments and reward structures for multi-agent research without building from scratch. - Analyze equilibria and convergence behavior in n-player games with varying information and move structures. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. OpenSpiel provides game environments and reinforcement learning algorithms for research in multi-agent learning, game theory, and planning across diverse game types including zero-sum, cooperative, and general-sum games with perfect and imperfect information. Yes, if you are conducting research in multi-agent reinforcement learning, game theory, or game-playing AI. The framework is actively maintained, permissively licensed, has no known vulnerabilities, and offers a comprehensive suite of game environments and algorithms. Install friction is moderate due to compiled components, but wheels are available for common platforms. Not recommended for production game servers or applications requiring real-time performance without careful profiling. ## Install pip install open-spiel uv add open-spiel poetry add open-spiel ## Installing open-spiel Before you install: Medium install friction due to compiled C++ components; wheels are available for Python 3.11–3.14 on Linux, macOS (ARM), and Windows. Active maintenance with a recent release (2 days old) and 5411 repository stars. License in practice: Licensed under Apache-2.0 (permissive), allowing commercial and private use with minimal restrictions. Quickstart: pip install open-spiel import open_spiel Requires Python 3.11 or later; compiled wheels available for common platforms but may require build tools on unsupported architectures. Verify before relying: - Specific game environments available and their names for import examples. - Whether the C++ core is performant enough for large-scale multi-agent training without custom compilation. - Availability of pre-built wheels for Python 3.14 on all advertised platforms or fallback build requirements. ## Package facts - License: Apache-2.0 (permissive) - Python support: supports_current - Install friction: medium - Maintenance: active - Downloads: 139.2K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags reinforcement learning game environments, multi-agent game theory framework, game playing algorithms, extensive-form game simulation, RL research platform, game AI research, multi-player game environments, game-theory, multi-agent-learning, research-framework [View on SkillFed](https://skillfed.io/packages/open-spiel) · [View on PyPI](https://pypi.org/project/open-spiel/)