agent

command
v0.3.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 7, 2026 License: MIT Imports: 3 Imported by: 0

README

Gem Rush (agents only)

demo

Collect all six gems before the timer runs out. This game accepts no human input by design: it exists to be played by agents, and the demo GIF above was recorded by the game's own agent playing itself.

Watch the agent play

cd examples/agent
go run .

A window opens and the built-in pilot plays, endlessly looping rounds. It runs on g.Autopilot(game.Decide): every frame the engine hands the pilot an observation (tags, positions, HUD text) and receives an action back. Decide chases the nearest gem using nothing an external agent would not have.

Headless (the CI shape)

cd examples/agent/bot
go run .

The same Decide pilot drives the game with no window at all through g.Headless("play") and g.Step(action), then prints how long the win took (~4 game seconds). This is how you playtest games with bots in CI.

External agents (MCP)

$env:COLLIDER_AGENT="mcp"; go run .

The game becomes an MCP server on stdio with observe, act and reset tools. Connecting Claude to it is one command, nothing to install, because the game binary is the server:

go build -o gemrush.exe .
claude mcp add gemrush -e COLLIDER_AGENT=mcp -- .\gemrush.exe

Any MCP client works the same way. Agent play is on by default for every Collider game; games opt out with g.DisallowAgents().

Documentation

Overview

Gem Rush: a game with NO human input. Running it opens a window where the built-in agent plays, using only observations, exactly like an external agent would.

go run .                        watch the agent play
$env:COLLIDER_AGENT="mcp"       serve MCP on stdio for external agents
cd bot && go run .              headless run, no window (CI style)

With COLLIDER_RECORD set, the agent records its own demo GIF and the program ends itself after ~22 seconds.

Directories

Path Synopsis
The headless run: the same Decide pilot plays Gem Rush with no window at all, via Headless and Step.
The headless run: the same Decide pilot plays Gem Rush with no window at all, via Headless and Step.
Package game is Gem Rush: collect all gems before the timer runs out.
Package game is Gem Rush: collect all gems before the timer runs out.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL