-
Notifications
You must be signed in to change notification settings - Fork 0
CLI
Dan Riddell edited this page Aug 7, 2026
·
2 revisions
gambit [flags]
Headless by default — every move is logged to the terminal in algebraic notation.
| Flag | Default | Description |
|---|---|---|
--white <agent> |
minimax |
White agent strategy |
--black <agent> |
random |
Black agent strategy |
--depth <n> |
4 |
Search depth/horizon for depth-limited agents |
--seed <n> |
current time | RNG seed for stochastic agents |
--fen <fen> |
standard start | Starting position |
--delay <duration> |
400ms |
Pause between moves in the GUI |
See Agents for the strategy names accepted by --white and --black.
--seed defaults to the current time, so stochastic agents differ run to run. Pass an explicit seed to make a game reproducible.
--delay only affects the GUI — headless runs are not paced.
The window lives behind the ebiten build tag. A plain go build or go install gives you the headless binary.
# from a checkout
just gui
# or build it yourself
go build -tags ebiten ./cmd/gambitThe Homebrew cask ships the GUI build; the formula ships the headless CLI.
Set a side to human in the GUI build, then click a piece and a destination:
just gui -- --white human --black minimaxThe window needs OpenGL/X11. On Debian/Ubuntu:
sudo apt install libgl1-mesa-dev libxrandr-dev libxcursor-dev libxinerama-dev libxi-dev# Terminal game, default pairing
just run
# Start from a specific position
gambit --fen "r1bqkbnr/pppp1ppp/2n5/4p3/2B1P3/5Q2/PPPP1PPP/RNB1K1NR w KQkq - 4 4"
# Deeper search, reproducible
gambit --white minimax --black minimax --depth 6 --seed 1
# Watch it slowly
just gui -- --delay 1sjust test # tests
just perft # move-generation correctness
just lint # golangci-lint
just demos # regenerate demo GIFs (headless, via tools/demogen)