Crescent Engine
Documentation

Spatial Bench workflows

Run the same scenarios against controllers, models or engine builds. Keep the recorded camera, actions and outcomes together so a run can be verified later.

Check your installation and run the quickstart

Extract Spatial Bench and open Terminal inside Crescent-Spatial-Bench. Doctor checks package files, reproducible physics and a Metal camera capture. Quickstart records two scripted policies in Dispatch and verifies their replays. Both run locally without a model key.

Terminal
runs=$(mktemp -d)
./spatial-bench doctor --report "$runs/doctor.json"
./spatial-bench quickstart --output "$runs/quickstart"
open "$runs/quickstart/report.html"

Choose Inspect the shortcut failure in the quickstart report to see its input image, chosen action and terminal rule. Open the generated world-task bundle in Experiments → Benchmark → Custom Tasks to inspect the task in the editor. For an optional connection check, add --models models.json to Doctor. It sends one Dispatch observation per configured endpoint.

Run and verify the sample

Extract Spatial Bench on an Apple silicon Mac with macOS 26.1+ and Python 3.10+. Inside Crescent-Spatial-Bench, run the included Closing Route sample. It runs a direct controller, a detour controller and a wait control.

Terminal
runs="$(mktemp -d)"
./spatial-bench sample --output "$runs/sample"
./spatial-bench sample --verify "$runs/sample/report.json"

Open report.json for the paired outcomes. Verification rerenders observations and replays the recorded actions. It runs offline.

Read the results

Scenario and seed
A specific layout and starting condition. Matched trials use the same inputs.
Outcome and reward
Arrival, timeout, forbidden contact or a run error. The task defines success; a failed model can still produce a valid recording.
Tick and decision
A tick is a simulation step. A policy decides on its configured interval. Inspect the camera at that decision to see its effective input.
Duration
Physics, camera capture, data transfer and model decisions can have separate timing fields. Comparisons use the same measurement boundary.
Camera observation before the barrier closes
Tick 84 · The route is open.
Camera observation with the blue barrier across the route
Tick 108 · The barrier has entered the route.

These are the actual observation frames from the Closing Route benchmark. The engine records both inputs and can verify the moment the route changes.

Author a matched suite

  1. In World, prepare a saved scene with a perspective camera, dynamic box agent, target and static box obstacle.
  2. In Experiments, choose Benchmark → Export Matched Benchmark. Select the agent, obstacle and camera, set the task and seeds, and export.
  3. Use Reveal Exported Suite to locate suite.json. Keep the scene and asset tree with the manifest. Run ./spatial-bench sample --suite /path/to/suite.json --output "$runs/custom" to run the direct and detour controls against the exported suite.

A matched suite keeps the goal, camera and seeds consistent while varying the obstacle. Use development scenarios to tune a policy and evaluation scenarios to test the resulting policy on separate seeds. The sample uses the development partition by default.

Run a model on your World

Start with a saved realtime World, a .spatial.json task captured from that scene, and its authored sensor camera. Put the instruction in a UTF-8 text file. Set CRESCENT_ENDPOINT to your compatible vision endpoint and CRESCENT_MODEL_TOKEN when the provider requires a token.

Terminal
./spatial-bench task-model --project /path/to/Project.cproj \
  --scene Scenes/Main.cscene --task /path/to/Task.spatial.json \
  --camera 1 --instruction /path/to/instruction.txt \
  --endpoint "$CRESCENT_ENDPOINT" --model-id your-model-id \
  --token-env CRESCENT_MODEL_TOKEN --output "$runs/model-a"
./spatial-bench task-model --verify "$runs/model-a"

For local vision, use --server, --model and --projector instead of the endpoint, model ID and token options. A task archive contains its World snapshot, camera evidence, decisions and replay data. Keep the archive intact when you move it.

To connect an executable policy to a suite, pass --policy label=/path/to/policy.py. The package includes the socket client and a working example in Benchmarks/Spatial/pixel_policy.py. See the package README for native policy libraries, instruction and route-safety suites, data export and learning examples.

Compare two model recordings

Use the same task, World, seed, instruction and sensor camera in both runs. In the editor, use Compare Vision Runs. In Spatial Bench, run the command below with both archives. It verifies the recordings and shows the first differing or incomplete decision alongside its camera evidence.

Terminal
./spatial-bench compare-task-models --baseline "$runs/model-a" \
  --candidate "$runs/model-b" --output "$runs/model-comparison"

Check an engine build

In the current Editor Preview, open Experiments → Compare → Compare Engine Builds. Select one Vision Run, the extracted Spatial Bench folder for the build that recorded it, and the extracted candidate folder. The editor shows the first changed tick and can reveal its JSON report. Select the same folder twice to check repeatability.

Use regression for one recorded episode. Use regression-suite to check recorded scenarios and seeds across builds. Both replay the same actions and report the first change in physics or camera output.

Terminal · from the candidate package
reference=/path/to/reference/Crescent-Spatial-Bench
suite="$reference/fixtures/closing-route/suite.json"
runs="$(mktemp -d)"
"$reference/spatial-bench" sample --suite "$suite" --output "$runs/recordings"
./spatial-bench regression-suite --baseline "$reference" --candidate "$PWD" \
  --suite "$suite" --recordings "$runs/recordings/report.json" \
  --policy direct --policy detour --output "$runs/release-check"

Keep the recordings with the exact reference binaries and suite. release-check/report.json summarizes the cases and links to details. Report exit codes are 0 for a match, 2 for a completed check with a regression, and 1 for an invalid input or incomplete run. Compare timings on a consistent Metal machine under comparable load; a slowdown budget is opt-in.

Command reference

For a worked failure investigation, see Debug a spatial decision.

doctor / quickstart
Check an installation and verify the first local evaluation.
custom-task-suite / delivery-report
Run custom cases and generate a paired Delivery report with per-decision failure evidence.
custom-task-counterfactual
Test an alternate action or plan offline from a verified decision. Verify or package the evidence.
sample / suite
Run built-in or custom scenario suites and verify recorded cases.
task-model / model
Run and verify a vision model on a single task or a suite.
compare-task-models / compare
Compare vision archives with recorded decisions and matched conditions.
instruction-pair / instruction-suite
Check grounding and instruction following across controlled scenarios.
evidence / replay
Export verifiable evidence or rerender a recorded episode.
dataset / learn
Export verified development trajectories, or fit and evaluate a demonstration policy.
author
Export a matched benchmark from a saved World scene.
regression / regression-suite
Compare engine build behavior with a fixed action recording.

Run ./spatial-bench COMMAND --help for flags. The extracted package also includes a full README and editable fixtures.