Cogbench: cogbench
  • Python 75.1%
  • HTML 11.5%
  • Shell 7.6%
  • Dockerfile 3.2%
  • Just 2.1%
  • Other 0.5%
Find a file
Heni 1de79223b5
Default the model endpoint to ishizuki on :8128
ishizuki serves the OpenAI shape with JSON-schema constrained decoding,
so the schema mode holds and invalid generations stay at zero. It refuses
GBNF with a 400, which is what lets the probe fall through to schema
rather than sticking on a silently ignored grammar.

The Kubernetes image copy still points at its own worker and is left
alone.
2026-09-18 08:08:32 -05:00
k8s Record the deployed image tag 2026-09-17 10:07:00 -05:00
notes Support the Steam build, and find the next one mechanically 2026-09-17 05:20:21 -05:00
schema Cogbench harness: episode lifecycle, action space, stat dumps, and agent baselines 2026-09-04 00:18:17 -05:00
stream Carry forward the in-progress docs, packaging and lint work 2026-09-17 05:03:45 -05:00
tests Format every Python source with black 2026-09-17 05:04:03 -05:00
.gitignore Build the SDL shim in the image and install it over the PVC on start 2026-09-17 07:06:05 -05:00
actions.json Cogbench harness: episode lifecycle, action space, stat dumps, and agent baselines 2026-09-04 00:18:17 -05:00
AGENT.md Carry forward the in-progress docs, packaging and lint work 2026-09-17 05:03:45 -05:00
agent.py Default the model endpoint to ishizuki on :8128 2026-09-18 08:08:32 -05:00
bot.py Format every Python source with black 2026-09-17 05:04:03 -05:00
botdex.py Format every Python source with black 2026-09-17 05:04:03 -05:00
build-sdl.sh Cogbench harness: episode lifecycle, action space, stat dumps, and agent baselines 2026-09-04 00:18:17 -05:00
build-statmind.sh Cogbench harness: episode lifecycle, action space, stat dumps, and agent baselines 2026-09-04 00:18:17 -05:00
cogbench.py Format every Python source with black 2026-09-17 05:04:03 -05:00
episode.py Format every Python source with black 2026-09-17 05:04:03 -05:00
extract_proto.py Format every Python source with black 2026-09-17 05:04:03 -05:00
find_build.py Support the Steam build, and find the next one mechanically 2026-09-17 05:20:21 -05:00
gen_actions.py Format every Python source with black 2026-09-17 05:04:03 -05:00
glyphs.py Format every Python source with black 2026-09-17 05:04:03 -05:00
hackdex.py Format every Python source with black 2026-09-17 05:04:03 -05:00
itemdex.py Format every Python source with black 2026-09-17 05:04:03 -05:00
justfile Carry forward the in-progress docs, packaging and lint work 2026-09-17 05:03:45 -05:00
launch-direct.sh Cogbench harness: episode lifecycle, action space, stat dumps, and agent baselines 2026-09-04 00:18:17 -05:00
LICENSE Carry forward the in-progress docs, packaging and lint work 2026-09-17 05:03:45 -05:00
OBS.md Carry forward the in-progress docs, packaging and lint work 2026-09-17 05:03:45 -05:00
pyproject.toml Carry forward the in-progress docs, packaging and lint work 2026-09-17 05:03:45 -05:00
README.md Default the model endpoint to ishizuki on :8128 2026-09-18 08:08:32 -05:00
runner.py Format every Python source with black 2026-09-17 05:04:03 -05:00
SETUP.md Support the Steam build, and find the next one mechanically 2026-09-17 05:20:21 -05:00
snapshot.sh Cogbench harness: episode lifecycle, action space, stat dumps, and agent baselines 2026-09-04 00:18:17 -05:00
stage-test-install.sh Support a second Beta 17.1 build alongside the first 2026-09-17 05:03:19 -05:00
statdump.py Format every Python source with black 2026-09-17 05:04:03 -05:00
stream.py Format every Python source with black 2026-09-17 05:04:03 -05:00
tracemodel.py Format every Python source with black 2026-09-17 05:04:03 -05:00
twitch.py Format every Python source with black 2026-09-17 05:04:03 -05:00
verify_retail.py Support the Steam build, and find the next one mechanically 2026-09-17 05:20:21 -05:00
webstream.py Format every Python source with black 2026-09-17 05:04:03 -05:00

Cogbench

Watch and control a model playing Cogmind, or compare it with scripted policies. The game runs on the Kubernetes worker; your laptop opens the controls and video.

Cogmind and its assets are not included; this is unofficial, independently developed tooling and is not affiliated with or endorsed by Cogmind's developer. You need your own legally obtained copy of the game to run it.

Start here

From the cogbench folder or harness folder on your Mac:

just watch       # open the live game; click Sound on for audio
just control     # open Start / Stop, model selection, and settings

No terminal needed for watching: open the game or open the controls. These addresses require access to the worker's network.

I want to… Go here
Put the game and stats in OBS OBS setup
Connect my laptop or fix an unreachable worker Setup and troubleshooting
Maintain or troubleshoot Kubernetes Worker guide
Play by sending game commands Game command guide
Understand the bridge or build StatMind StatMind README
Check or add a supported game build Build notes
Read the reverse-engineering history Research notebook

Run just to see all available commands, or just urls to print the addresses.

Everyday controls

Use the control page, or these terminal shortcuts:

Command What happens
just status Show agent status and the last result
just start Start the agent with saved settings on the current episode
just stop Stop the agent and cancel pending automatic revival; keep the game open
just restart Restart the agent on the same episode
just models List available model IDs
just model MODEL_ID Switch the live model
just logs Read recent agent messages
just loop on / just loop off Allow or prevent a new episode after the game ends
just revive on / just revive off Allow or prevent recovery after an agent crash

Restart restarts the agent, not the episode. A decision budget running out also leaves the current episode intact.

Result Meaning
ended The game ended; Loop episodes may start a new one
budget_exhausted The agent reached its decision limit
blocked The agent could not recover the game screen; auto-revive may retry

A stopped or crashed agent may leave no result. That does not mean the game ended.

For developers

The main files are agent.py (decisions), runner.py (agent lifecycle), stream.py (controls and overlays), webstream.py (browser video/audio), and cogbench.py (game commands).

just test        # local regression tests
just check       # tests plus syntax and whitespace checks
just changes     # show pending changes in harness and StatMind

Tests do not start the game, call a model, or change the worker. With FFmpeg and libx264 installed, they also check synthetic video encoding and decoding. Actual gameplay, OBS, and browser/device checks are separate.

For a direct agent run, execute this where the game and StatMind are available (the worker, when using Kubernetes):

export COGBENCH_URL=http://127.0.0.1:8128/v1  # replace with your model endpoint
python3 agent.py --statmind /usr/local/bin/statmind \
  --policy model --model MODEL_ID --decisions 200 --stream --out result.json

Set COGBENCH_API_KEY if required. Policies heuristic and scripts need no model endpoint. --cheat exposes ground-truth terrain; compare those runs separately from fair-view runs. The supervisor saves run-result.json in COGBENCH_STREAM_DIR and includes it in status after the agent exits.