Program the robot to collect as many diamonds as possible within each level's symbol limit.
COMMANDS
- m or m1โm9 โ move forward 1โ9 cells (
m = one cell).
- l / r / b โ turn left, right, or 180ยฐ.
- df ... ; โ define a function (indexed from 1 in definition order).
- f idx [arg] n โ call function idx exactly n times (n = 1โ9). Use arg only when that function body contains
x.
- x / mx โ placeholders used only inside
df body. mx requires numeric arg 1โ9 (e.g. f 1 3 2).
- Symbol limit: each move/turn = 1, each
f ... call = 1, each df ... ; = 1 + body symbols (; not counted).
SCORING
- +10 points per diamond collected
- โ2 points per command symbol used
- โ15 points each time the robot enters an obstacle cell
- โ5 points each time the robot hits the map edge
- +20 bonus if all diamonds collected
- Leaderboard: only perfect runs (all diamonds) can be submitted
FORBIDDEN CELLS
- Entering an obstacle costs 15 points but the robot keeps moving โ it does not get stuck on that cell.
- Hitting the map edge costs 5 points and that step does not move the robot.
df l m m m r ; df m m ; m f 1 2 m f 2 2