Robot Logic Game

Six levels. One robot. Six blocks. Reach the goal — then make your program shorter.

Forward
Backward
Turn Left
Turn Right
Repeat N
If Can Move

1 · Sequence

Stack instructions. The robot does them in order.

1

First Steps

7×7 grid, no walls. Reach the green tile.

★★★ ≤ 5 blocks · ★★ ≤ 8

2 · Detour

Same instructions. A wall is in the way.

2

Around the Wall

Plan a route — the direct path is blocked.

★★★ ≤ 11 blocks · ★★ ≤ 14

3 · Iteration

The same block, repeated, fits inside one Repeat N times.

3

The Long Way

A longer detour. Use Repeat to keep your program short.

★★★ ≤ 11 blocks · ★★ ≤ 17

4 · A new block

Sometimes the goal is behind you. Move Backward appears.

4

Reverse Course

Three stars in two blocks. Find them.

★★★ ≤ 2 blocks · ★★ ≤ 4

5 · Patterns

A small repeating pattern, repeated. Reach for a Repeat inside a Repeat.

5

Corridor Maze

Zigzag through stacked corridors.

★★★ ≤ 13 blocks · ★★ ≤ 20

6 · Selection

If Can Move Forward arrives. The robot can now decide.

Five blocks is enough. The robot doesn't need to know how long the corridors are.

6

Right-Hand Spiral

One nested loop. Walk-then-turn until the goal.

★★★ ≤ 5 blocks · ★★ ≤ 9

Challenges

1. Earn three stars on every level.
2. Solve Level 6 without If Can Move Forward. Count the extra blocks.
3. Pick any three-star solve and try to remove one more block.
4. Add a level: open _projects/robot-logic-game/levels/levelConfigs.js and define one.