GridBot

Program the robot in simple Python — loops, conditionals, wall sensors — to get it from start to goal. One wall-hit and it stops cold.

Idle
Moves: 0 Optimal: Grid: 16 × 16

Program

Python — full syntax in the reference below
Speed
Manual drive
Log
Robot API reference

Move & turn

move_forward() steps one block. turn_left() / turn_right() rotate 90° in place — no move.

Sensors (booleans)

wall_ahead(), wall_left(), wall_right(), at_goal() — read the maze, don't move the robot.

Loops

for i in range(3): repeats a block a fixed number of times. while <condition>: repeats while it's true. break / continue work as usual.

Conditionals

if / elif / else, with not, and, or, True, False.

Indentation

Just like real Python: a colon : opens a block, and the next lines must be indented to belong to it.

Comments

A line starting with # is ignored — use it to leave yourself notes.