Programming your robot
A program, or controller, runs in a loop: read the sensors, decide, set the motors, and let the simulation advance one step. Everything your robot does comes from this loop.
All the examples here run on the starter robot. Load it before running them, and they work as they are. Each example has a Python and a C/C++ version: choose your language in the tabs, and the whole site follows your choice.
The path
Section titled “The path”| Step | You learn to… |
|---|---|
| 1. Your first program | Write, load and run a program |
| 2. Movement | Drive and turn |
| 3. Sensors | Find walls, holes, tokens and your position |
| 4. Navigate the maze | Put it together in a complete program |
| 5. Communication | Report tokens and score points |
| 6. Wall Tokens | Tell victims, targets and fakes apart |
| 7. Exploring and mapping | Explore systematically and remember the maze |
| 8. Mapping rules and Submitting the map | Earn the mapping bonus |
Each step builds on the ones before it. If you have not read it yet, read the Rules summary first: it explains what your robot has to do, and what scores points.
If you write in C or C++, read C++ controllers first, to compile and run your programs.
