Skip to content

Windowed demo

Dan Riddell edited this page Aug 5, 2026 · 1 revision

Windowed demo

Every environment has a live, watchable window. It requires a display and OpenGL, and is built with the ebiten tag. Drop --headless to open it.

just gui                                       # racing demo
go run -tags ebiten ./cmd/galapagos cartpole   # cart-pole swarm
go run -tags ebiten ./cmd/galapagos maze --agent qlearning

Controls

The current controls are listed in the window's top-right overlay:

Key Action
space Pause
f Follow / fit camera
+ / - Speed
r Regenerate (new random seed)
s Save best
l Load best
d Toggle sensor rays

Availability

The native window is macOS-only in the released binaries — it uses Metal, which needs no extra libraries. The Homebrew cask ships it; the formula ships the cross-platform CLI without it.

On Linux you can build the window from source:

go build -tags ebiten ./cmd/galapagos
Linux: OpenGL/X11 libraries
sudo apt install libgl1-mesa-dev libxrandr-dev libxcursor-dev libxinerama-dev libxi-dev

If you have no display, or no native graphics libraries, the browser demo runs the same window compiled to WebAssembly.

Clone this wiki locally