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ยฐ.
- buf ( ... ) โ define a buffer (m, m1โm9, l, r, b, and
loop inside; index from 1).
- loop idx n โ run buffer idx exactly n times (n = 1โ9). Loops may nest inside buffers.
- Symbol limit: each move/turn = 1, each
loop idx n = 1, each buf ( ... ) = 1 + commands inside (parentheses 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.
buf ( l m m m r ) buf ( m m ) m loop 1 2 m loop 2 2