How to play
Build a program from instruction tiles, run it, and guide the automaton to the target. There are no lives and no timers.
The board
The automaton is the dark block with a yellow wedge; the wedge shows which way it faces. The target is the yellow cell with a ring and a dot. Hatched cells are walls. Reach the target to solve the level.
Commands
- MoveMove one cell in the direction the automaton faces.
- LeftTurn 90 degrees to the left without moving.
- RightTurn 90 degrees to the right without moving.
- Count upAdd one to the counter N. It keeps its value between rounds and stops at 11.
- MarkDrop a breadcrumb on the cell the automaton stands on: an arrow that points to the cell behind it.
- RepeatStart a loop. Add commands to it, then end the loop.
- Repeat untilStart a loop that runs until a wall or the edge of the board is straight ahead, or until the goal is reached.
- IfLook at the cell on one side. Run the commands under then if it is open, and the commands under else if it is not.
- ProcedureDefine a named group of commands, A, B or C. It does not run where it stands.
- CallRun a procedure you defined, then carry on with the next command.
Each level lists the commands you can use and the most instructions a program may hold. The counter above the board shows how many you have used.
Loops
A loop carries out the commands inside it again and again. Select its count tile to change how many rounds it runs. A loop uses one slot for its count and one for each command inside it, and the counter above the board counts slots. While a loop runs, the count tile shows the current round.
A repeat until loop has no count. Before each round it looks at the cell straight ahead. If that cell is a wall or off the board, the loop ends. Otherwise the commands inside run once more. A loop that starts facing a wall runs none of them. It uses the same slots as any other loop, and it works for a corridor of any length.
If and sensors
An if block makes a decision. It has a sensor: clear ahead, clear left or clear right. The sensor is true when the cell on that side is on the board and is not a wall. Reading it costs no step. If it is true, the commands under then run. If it is not, the commands under else run, and else may be empty.
An if block uses one slot, plus one for each command in then and in else. It can stand on its own or inside a loop, but not inside the then of another if block. A repeat until loop can also wait for the goal, which keeps a program with decisions going until it arrives.
The counter
Some levels give you a counter named N. It starts at 1 each run. The count up command adds one to it and takes one slot and one step. A repeat loop can take N as its count instead of a number: it reads N when it starts and runs that many rounds, whatever happens to N inside it.
Use it for shapes that grow: a loop that walks N cells, turns, and counts up, repeated again and again, draws a spiral.
Loops inside loops
A few levels let a loop hold one more loop. The inner loop runs all its rounds each time the outer loop runs a round. That is two levels at most. Slots add up: a loop uses one slot plus the slots of everything inside it, inner loop included.
Breadcrumbs and else if
The mark command leaves a breadcrumb on the cell the automaton stands on. It is a small arrow pointing to the cell behind the automaton, which is the cell it came from when it has just stepped forward. A cell keeps the first breadcrumb it gets. Marking a cell again changes nothing.
With marks on the board, an if block gains six sensors. Fresh ahead, left and right are true for an open cell with no breadcrumb. Back ahead, left and right are true for the cell that the breadcrumb under the automaton points to: the way back. Reading a sensor costs no step.
The else of an if block can hold one more if block, called else if, instead of commands. A chain of up to six ifs chooses between many cases, and the first sensor that is true wins. Each if in the chain uses one slot plus its own then commands. Together they let a program explore a maze that has loops: mark the cell, step onto a fresh cell, and follow the breadcrumbs back when none is left.
Visit every cell
Some boards have no target. The level is solved the moment the automaton has entered or started on every floor cell, that is, every cell that is not a wall. The board shows the cells visited so far and the game counts them, for example 12 of 30 cells. A step limit still applies, so wandering fails. A common answer is to run to the wall, step over, and run back, row by row.
Procedures
A procedure is a named group of commands, A, B or C. You define it once and call it from several places, so a shape that comes back along the route is written only once. A definition does not run where it stands. Each call runs the commands of that procedure and then the program goes on.
A call uses one slot. A definition uses one slot plus one for each command in it. A procedure can hold moves, turns, if blocks and loops, but not a call to another procedure. A call can stand on its own or inside a loop.
Several boards
Some levels have more than one board. One program must solve every board, so a program that counts the steps of the first board fails on the next. The board area shows one board at a time with a tab for each. Run tries the program on the selected board, and a board it has solved is marked with a check and the word. Editing the program clears the checks.
The tape
Your program is a strip of tiles. Tap a command to add it to the end; tap a tile to remove or move it. While a program runs, the strip slides under a fixed read-head.
- Solid tile: already run.
- Yellow tile: the instruction running now.
- Outlined tile: still to run.
- Dashed slot: empty, ready for a new instruction.
The number under each tile is its step.
Run, step, reset
- Run executes the program at a readable speed.
- Step runs one instruction at a time.
- Reset puts the automaton back at the start and keeps your program.
You can edit the program again after any run.
When a run fails
A failed run always says what happened.
- The automaton tried to move into a wallThe run stopped. The wall it hit is striped yellow and the instruction that did it is marked with a cross. A move past the edge of the board counts the same way.
- The program ended before the goalEvery instruction ran and the automaton is not on the target. Add instructions or change them.
- The program ran too long and was stoppedEach level has a step limit so a program can never run forever. Shorten the program or change what it does.
Download Algomind for Android to play.