Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion MAKING_A_COGAME.md
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ HardOreMineMission = OreMineMission(
```bash
cogames tutorial train \
--mission my_module.OreMineMission \
--timesteps 2000000
--steps 2000000
```

CoGames uses [PufferLib](https://github.com/PufferAI/PufferLib) for training — PPO with parallel vectorized environments. The trained checkpoint loads back for play or eval:
Expand Down
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ readme = "README.md"
requires-python = ">=3.12,<3.13"
classifiers = ["Programming Language :: Python :: 3", "Programming Language :: Python :: 3.12"]
dependencies = [
"mettagrid==0.26.12",
"mettagrid==0.26.13",
"softmax-cli==0.26.5",
"packaging>=24.0.0",
"pydantic>=2.11.5",
Expand Down Expand Up @@ -75,8 +75,8 @@ testpaths = ["tests"]
source = ["cogames"]

[tool.uv.sources]
mettagrid = { workspace = true }
softmax-cli = { workspace = true }
mettagrid = {git = "https://github.com/Metta-AI/mettagrid.git"}
softmax-cli = {git = "https://github.com/Metta-AI/softmax-cli.git"}
diplomacog = { git = "https://github.com/Metta-AI/cogame-diplomacog.git" }
hungercog = { git = "https://github.com/Metta-AI/cogame-hungercog.git" }
overcogged = { git = "https://github.com/Metta-AI/cogame-overcogged.git" }
Expand Down
7 changes: 4 additions & 3 deletions src/cogames/docs/AMONGTHEM_POLICY.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,14 @@ that will run in the tournament worker, uploading it, and checking whether it sc
cogames tutorial make-policy --amongthem -o amongthem_policy.py
```

Edit `AmongThemPolicy._choose_actions()` in the generated file. The template receives raw BitWorld observations and must
write integer action indices from the BitWorld trainable action set into `raw_actions`.
Edit `AmongThemPolicy._choose_actions()` in the generated file. The template receives raw BitWorld observations and
must return an `np.ndarray` of integer action indices from the BitWorld trainable action set; the parent
`step_batch()` writes those into `raw_actions`.

## 2. Log in and pick a season

```bash
cogames login
cogames auth login
cogames season list
cogames season show <season>
```
Expand Down
2 changes: 1 addition & 1 deletion tutorials/02_TRAIN.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
"Training on mission: arena\n",
"...progress logs...\n",
"Training complete. Checkpoints saved to: ./train_dir\n",
"Checkpoint saved to: ./train_dir/<run_id>/model_000001.pt\n",
"Final checkpoint: ./train_dir/<run_id>/model_000001.pt\n",
"```\n",
"\n",
"Replace `<run_id>` with your actual run ID from your training output.\n",
Expand Down
2 changes: 1 addition & 1 deletion tutorials/02_TRAIN.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Expected terminal output (example):
Training on mission: arena
...progress logs...
Training complete. Checkpoints saved to: ./train_dir
Checkpoint saved to: ./train_dir/<run_id>/model_000001.pt
Final checkpoint: ./train_dir/<run_id>/model_000001.pt
```

Replace `<run_id>` with your actual run ID from your training output.
Expand Down
2 changes: 1 addition & 1 deletion tutorials/02_TRAIN.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
# Training on mission: arena
# ...progress logs...
# Training complete. Checkpoints saved to: ./train_dir
# Checkpoint saved to: ./train_dir/<run_id>/model_000001.pt
# Final checkpoint: ./train_dir/<run_id>/model_000001.pt
# ```
#
# Replace `<run_id>` with your actual run ID from your training output.
Expand Down