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¶
- In the World Builder, tick Evaluation in the sidebar, then click Edit.
- 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.
- Script tab — the grading script. It must define
evaluate(sim), called on every observation; report withsim.result(value)and end the run withsim.finish(). An optionalinitialize(sim)runs once at the start. - 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.