Skip to content

Add an evaluation to your world

An evaluation makes your world gradeable: students press Start, drive, and get a score — lap time, points, anything your script measures.

Set it up

  1. In the World Builder, tick Evaluation in the sidebar, then click Edit.
  2. Config tab — description (shown to students before they start), whether lower or higher scores are better, the time limit, and the run command that launches the student's code.
  3. Script tab — the grading script. It must define evaluate(sim), called on every observation; report with sim.result(value) and end the run with sim.finish(). An optional initialize(sim) runs once at the start.
  4. Save, and save the world.

Writing the script

The evaluation API (what sim exposes — pose, laps, collisions, signals) is documented on the World Builder page. Two tips:

  • Start from the simplest metric (elapsed time to the finish line) and grow.
  • The site's AI assistant can draft the script with you, right on the World Builder page — describe the rules of your competition and iterate.

Use it

Publish the world (next page) — students who load it see your description and a Start button; scores come back comparable because everyone runs the same script, the same time limit, the same robot.

AI