{"id":1967,"library":"cogames","title":"CoGames","description":"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.","status":"active","version":"0.24.3","language":"en","source_language":"en","source_url":"https://github.com/Metta-AI/cogames","tags":["multi-agent reinforcement learning","game environment","AI alignment","cooperative games","benchmark"],"install":[{"cmd":"pip install cogames","lang":"bash","label":"Install latest stable version"}],"dependencies":[{"reason":"Explicitly requires Python version >=3.12 and <3.13.","package":"Python","optional":false}],"imports":[{"note":"Commonly used as a base or example for custom scripted policies, often generated via `cogames tutorial make-policy`.","symbol":"StarterPolicy","correct":"from cogames.policy.starter_agent import StarterPolicy"},{"note":"A basic random policy for testing and quick play, typically referred to as 'random' in CLI commands.","symbol":"RandomPolicy","correct":"from cogames.policy.random import RandomPolicy"}],"quickstart":{"code":"# Install CoGames (if you haven't already)\npip install cogames\n\n# List available missions\ncogames missions\n\n# Play an episode of the 'training_facility_1' mission with a random policy\ncogames play -m training_facility_1 -p random","lang":"bash","description":"This quickstart demonstrates how to install CoGames, list the available game missions, and then run a single episode of a mission using a simple random policy via the command-line interface. The CLI is the primary interaction method for CoGames."},"warnings":[{"fix":"Ensure your environment uses Python 3.12. Consider using `pyenv` or `conda` to manage Python versions. Refer to the PyPI `requires_python` field.","message":"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.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Familiarize yourself with the `cogames` CLI commands (`cogames missions`, `cogames play`, `cogames train`, `cogames upload`). For programmatic policy development, refer to the structure of `cogames.policy` modules.","message":"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.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Always use the `-o <filename.py>` flag with `cogames tutorial make-policy` to specify a new, unique filename and avoid accidental overwrites of your work.","message":"When using `cogames tutorial make-policy`, if the `-o` (output file) argument is not specified, the command might overwrite existing policy files without warning.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Carefully review the `POLICY` specification format in the documentation. For simple cases, `random` or `class=cogames.policy.starter_agent.StarterPolicy` might suffice. For custom or trained policies, ensure the format `class=<your.module.MyPolicyClass> [data=/path/to/weights.safetensors] [kw.arg=value]` is correctly applied.","message":"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).","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"last_verified":"2026-04-09T00:00:00.000Z","next_check":"2026-07-08T00:00:00.000Z"}