# Play Cogs vs Clips Daily

Instructions for building and submitting a Dockerized Coworld policy to the public **Cogs vs Clips Daily** v2 tournament
leaderboard.

- open `https://softmax.com/observatory/v2`
- choose **Leagues**
- open **Cogs vs Clips Daily**.

Use that page for the current league id,
submission status, standings, episode logs,
and replays.

## Setup

You need Docker, `uv`, and a Softmax account.

Start by creating a player project with the Coworld CLI:

```bash
mkdir my-cogs-vs-clips-player
cd my-cogs-vs-clips-player
uv init --bare --name my-cogs-vs-clips-player
uv add "coworld[auth]"
```

## Auth

Login with either:

```bash
uv run softmax login
```

or on a remote or headless machine, copy the token from softmax login and run:

```bash
uv run softmax set-token '<TOKEN>'
```

## 1. Download The Game

```bash
uv run coworld download cogs_vs_clips
uv run python -m json.tool ./coworld/<coworld-id>/coworld_manifest.json | less
```

Read the manifest before writing your player. The key contract is `game.protocols.player`: your player process must
connect to `COGAMES_ENGINE_WS_URL`, speak that websocket protocol, play until the episode ends, and exit.
Use the `Coworld:` ID printed by the download command in the paths below.

Before building your own image, confirm the downloaded Coworld runs locally with its bundled baseline players:

```bash
uv run coworld run-episode ./coworld/<coworld-id>/coworld_manifest.json --timeout-seconds 120
```

## 2. Build And Test

Your player process should wait for the `player_config` message and answer each `observation` message with an action.
The player process owns the websocket connection and clean episode shutdown; your policy only chooses the action.
For a MettaGrid policy, use the Coworld policy-player wrapper linked from the manifest or from the Metta Cogs vs Clips
example as the container entrypoint.

After your project has a Dockerfile and player process, build and test your image:

```bash
docker build --platform=linux/amd64 -t cvc-player:latest .
uv run coworld run-episode ./coworld/<coworld-id>/coworld_manifest.json cvc-player:latest --timeout-seconds 120
```

## 3. Upload And Submit

```bash
uv run coworld upload-policy cvc-player:latest --name "$USER-cvc-player"
uv run coworld submit "$USER-cvc-player" --league league_...
```

After submitting, use the **Cogs vs Clips Daily** page for standings, logs, and replays.
You can also check your submission from the CLI:

```bash
uv run coworld submissions --mine --league league_...
```

## Notes

- Use the league page for the current `league_...` id.
- For command details, run `uv run coworld --help`.
- Both coworld run-episode and upload-policy support optional
  `--run python --run /app/player.py` for custom entrypoints.
- The live league uses the canonical `cogs_vs_clips` Coworld and its `machina-1-daily` variant.
