Registry / ai-ml / cogames

cogames

JSON →
library0.28.0pypypi✓ verified 28d ago

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.

pip install cogames
INSTALL
IMPORT
SIG · COGAMES
C
cogames
ai-mlpythonv0.28.0
Install
2.0s avg
Import
—
Disk
16MB
Pass rate
4/ 10
Env Coverage4 / 10
glibc
3.9–3.13
musl
3.9–3.13
Install & Compatibility
Where this runs
tested against v0.28.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
glibc
py 3.10
✕ build_error
✕ build_error
py 3.11
✓ —
✓ 2.1s
py 3.12
✓ —
✓ 2s
py 3.13
✕ build_error
✕ build_error
py 3.9
✕ build_error
✕ build_error
16MB installed
● package 16MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

StarterPolicy
✓ from cogames import StarterPolicy
✗ from cogames import StarterPolicy

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.

# 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
Debug
Known issues
gotchaCoGames 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.
fix
Ensure your environment uses Python 3.12. Consider using `pyenv` or `conda` to manage Python versions. Refer to the PyPI `requires_python` field.
affects: All versions
gotchaThe 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.
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.
affects: All versions
gotchaWhen using `cogames tutorial make-policy`, if the `-o` (output file) argument is not specified, the command might overwrite existing policy files without warning.
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.
affects: All versions
gotchaSpecifying 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).
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.
affects: All versions
Upgrade
Version history
0.28.0latest on PyPI · released May 30, 2026
Audit
Dependencies
PythonrequiredExplicitly requires Python version >=3.12 and <3.13.
Agent activity
43 hits · last 30 days
node
38
OpenAI (training)
1
Resources
cogames — pip install cogames · libregistry