CoGames
CoGames is a collection of multi-agent cooperative and competitive environments designed for reinforcement learning research. It serves as the game environment for the Alignment League Benchmark (ALB), a suite of multi-agent games to measure AI alignment, coordination, and collaboration. It currently features the 'Cogs vs Clips' game, offering environments for creating new games, training agents, and submitting them to the ALB leaderboard.
Warnings
- gotcha CoGames has strict Python version requirements, specifically supporting Python 3.12. Using other versions (e.g., Python 3.11 or 3.13+) may lead to installation or runtime issues.
- gotcha The primary interaction model for CoGames, especially for quickstarts and common tasks like playing or training agents, is through its comprehensive command-line interface (CLI). Users expecting a rich, immediately accessible Python API for environment setup or direct game manipulation might find the documentation lean in that area, favoring CLI commands.
- gotcha When using `cogames tutorial make-policy`, if the `-o` (output file) argument is not specified, the command might overwrite existing policy files without warning.
- gotcha Specifying policies for CLI commands like `cogames play`, `cogames train`, or `cogames run` can be complex. Policies can be referenced by URIs (for checkpoint bundles) or in a key-value format (for explicit class paths, optional weights, proportions, and `__init__` keyword arguments).
Install
-
pip install cogames
Imports
- StarterPolicy
from cogames.policy.starter_agent import StarterPolicy
- RandomPolicy
from cogames.policy.random import RandomPolicy
Quickstart
# Install CoGames (if you haven't already) pip install cogames # List available missions cogames missions # Play an episode of the 'training_facility_1' mission with a random policy cogames play -m training_facility_1 -p random