Skip to content

Code reference

Generated from the docstrings in the source, so it cannot drift from what the code actually does.

The library

Module What it owns
env Level, SokobanEnv: state, moves, push rules, the solved test
levels Level generation, and the hidden set's difficulty ramp
solver BFS optimal solutions and deadlock detection
render Board state to 64×64×3 RGB
dataset Trajectory generation for training
evaluation Local evaluation harness and metrics
agent The Agent interface your submission implements

The solver is not for agents

solver exists so the server can know each level's optimal solution length and detect deadlocks. Calling anything like it from inside an agent is against the rules: it is exactly the symbolic search the benchmark is built to exclude.

Where to start

Implementing a submission means implementing one interface, latent_sokoban.agent.Agent. Everything else is either the environment you are being tested against or tooling for producing training data.

For the end-to-end picture of how these pieces fit together at evaluation time, see how it works.

Not documented here

server/app.py is the evaluation API; its interface is the HTTP surface documented in the agent protocol, and there is a machine-readable OpenAPI schema at /api/openapi.json.

baseline/ is a reference implementation rather than a stable API. Read it as an example, not as something to import against.