Back home

LogicBot: a strategy guide

LogicBot is the closest thing on the site to actual programming. You are not steering a robot in real time — you are writing a short program up front, pressing Run, and watching it succeed or fail exactly as written.

The interesting constraint is space. The MAIN track has only a handful of command slots, always fewer than the number of moves the route requires. The only way to fit the route is to notice that part of it repeats, put that part in the P1 subroutine, and call P1 from MAIN. LogicBot is really a puzzle about spotting repetition.

The rules, restated

  • The robot starts on the arrow tile, facing the direction the arrow points.
  • Every glowing tile must be lit before the level counts as solved.
  • Commands: Forward moves one tile, Left and Right turn in place, Jump climbs one level up or drops any number down, and Light switches on the tile you are standing on.
  • Tiles sit at different heights. A lighter tile is one step higher than a darker one, and Forward cannot climb — only Jump can.
  • MAIN runs top to bottom. P1 is a subroutine: calling P1 from MAIN executes the whole P1 track, then returns.
  • An illegal move — walking into a wall or into a height you cannot climb — is ignored rather than fatal. It simply wastes a step.
  • You can reset and edit the program as many times as you like.

A worked example

Imagine a spiral of twelve tiles where the route is: forward, forward, light, turn right — repeated three times, then a final forward and light.

Written out longhand that is fourteen commands, and MAIN only has eight slots. But the repeated block is exactly four commands: Forward, Forward, Light, Right.

So put those four in P1. MAIN then becomes P1, P1, P1, Forward, Light — five slots for a fourteen-command route, with three to spare.

The general shape of every LogicBot solution looks like this. When a level seems impossible, you are not missing a clever move; you are missing the repeating block.

Programs, not moves

The mental shift that makes LogicBot click is to stop thinking about where the robot should go next and start thinking about what the whole program says. A real-time control game rewards reaction; LogicBot rewards a correct model. You cannot correct mid-run, so every level is solved entirely in your head before the first Run.

This is why tracing the route first is not optional advice. The route is data; the program is a compression of that data. You cannot compress something you have not yet written out, and every player who places commands exploratively ends up with a MAIN track full of one-off moves and no room left.

It also explains why the levels feel harder than their tile count suggests. A twenty-tile route with a clean four-command period is easy. A twelve-tile route with no repetition at all is nearly impossible in eight slots — and the generator knows that, so if a level looks unrepeating, look again.

Finding the repeating block

Repetition in LogicBot is almost always geometric. Spirals repeat with a turn at the end of each arm. Zig-zags repeat with alternating turns. Staircases repeat with a Jump in the block. Identify the shape of the board and you have identified the shape of P1.

When the period is not obvious, try writing the route as a string of letters and looking for the substring that appears most often. F F L R is a very different block from L R F F, but they describe the same loop entered at a different point — and one of the two will fit MAIN while the other leaves an awkward remainder.

The remainder is the other half of the craft. A perfect P1 that leaves five stray commands for MAIN is worse than a slightly imperfect P1 that leaves two. Optimise the pair, not the subroutine in isolation.

Common mistakes

Forgetting the robot's facing. Turns are relative, so a P1 that works the first time it runs may point the robot the wrong way on the second call. A block that ends facing the same relative direction it started in is the one you want.

Using Jump as a general move. Jump climbs one and falls any number, which makes it tempting as a Forward substitute. It is a slot spent for one tile of progress and usually the reason a program does not fit.

Running before tracing. Watching the robot fail is entertaining but it is a slow debugger. Read the program once more instead; the bug is almost always a turn.

Quick reference

Trace the route on paper firstWork out the full sequence of moves before you place a single command. You cannot spot repetition in a route you have not written down.

Look for the period, not the patternThe repeating block is often four or five commands long and starts in an unintuitive place. Try aligning the repetition at different offsets.

Light earlyLighting a tile as you pass costs one slot; coming back for it later costs several. Fold Light into the repeated block whenever the geometry allows.

Use failed moves deliberatelyBecause a blocked Forward is ignored rather than fatal, a P1 that occasionally bumps into a wall can still be the shortest correct program.

Read the heights before routingA route that looks two tiles shorter is worthless if it needs a climb your commands cannot make. Check the shading first.

Frequently asked questions

How often does LogicBot appear?
It is one of three Game of the Month entries and rotates into the featured slot every third month. You can play it off-season as practice at any time.
Do I need to know how to code?
No. The commands are icons and the subroutine is just a second list. Programmers will recognise the idea of a function call, but nothing is written in text.
Is the shortest program always required?
No — you only need a program that fits the available slots and lights every tile. Fewer commands is a nicer solve, not a requirement.
Why did my robot ignore a command?
Forward into a wall or into a tile more than one step higher is silently skipped. Use Jump to climb.

Play today's LogicBot puzzle or read another guide.