Skip to content

Add cogames.cogs-v-clips install/training command#400

Merged
jsuarez5341 merged 3 commits intoPufferAI:3.0from
relh:richard-cogames-train
Nov 25, 2025
Merged

Add cogames.cogs-v-clips install/training command#400
jsuarez5341 merged 3 commits intoPufferAI:3.0from
relh:richard-cogames-train

Conversation

@relh
Copy link
Copy Markdown
Contributor

@relh relh commented Oct 22, 2025

Install (pip or uv/pip):

pip install setuptools numpy torch

Then:

pip install pufferlib[cogames] --no-build-isolation

Train:

puffer train cogames.cogs_v_clips.training_facility.harvest

or:

puffer train cogames.cogs_v_clips.machina_1.open_world

Everything currently runs and uses two variants that are shaped rewards

inventory_heart_tune = start agents with resources in their inventory
heart_chorus = shaped rewards via diversity etc

puffer train cogames.cogs_v_clips.training_facility.harvest --train.device cpu --vec.num-workers 12 --vec.num-envs 144 gets to hearts: agent/heart.gained 9.240 in 20m on a macbook

image

@relh relh changed the title Add cogames.cogs-v-clips.training_facility.harvest install/training command Add cogames.cogs-v-clips install/training command Oct 25, 2025
sasmith pushed a commit to Metta-AI/cogames that referenced this pull request Nov 17, 2025
I'm not sure what's needed to package cogames to work with `pip install
pufferlib[cogames]` but this seems to be sufficient.

Paired with: PufferAI/PufferLib#400, it enables:

```
Install (pip or uv/pip):

pip install setuptools numpy torch
Then:

pip install pufferlib[cogames] --no-build-isolation
Train:

puffer train cogames.cogs-v-clips.training_facility.harvest
or:

puffer train cogames.cogs-v-clips.machina_1.open_world
Everything currently runs but it's hooked up to a few simplifying variants:

lonely_heart = less resources per heart
heart_chorus = shaped rewards via diversity etc
```

[Asana
Task](https://app.asana.com/1/1209016784099267/project/1210348820405981/task/1211773293280028)
Adds minimal integration for CoGames (cogs-v-clips) environments:
- environment.py: 31-line wrapper that strips package prefixes and calls cogames API
- torch.py: Policy and Recurrent classes
- cogames.ini: Config for machina_1.open_world mission
- pyproject.toml: Add cogames extras with mettagrid dependencies
- setup.py: Relax gymnasium/pettingzoo version constraints (>= vs ==)
@relh relh force-pushed the richard-cogames-train branch from 67a6efd to b1ae20e Compare November 22, 2025 23:21
@jsuarez5341 jsuarez5341 merged commit 8f88d9f into PufferAI:3.0 Nov 25, 2025
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants