How to play

Each puzzle comes with a few examples, and each one shows an input and the output it should become. The input is written on the tape, and the machine starts at its left end in state 1. Fill every ? cell in the rule table so that, for every example, the machine stops on ✓ with the output on the tape. You get six submissions.

In the picture the input is A B and the table has one ? cell. The answer is to write B, move right and stay in state 1: the head turns A into B, walks over the B, and stops on ✓ at the blank cell, leaving B B.

How the machine works

Every step does the same four things, 1 to 4 below, and the machine repeats them until it stops.

  1. The machine reads the symbol under the head and looks up one cell of the table: the row is the symbol it read, the column is its current state. Here the head is on A in state 1, so it uses row A, column 1.

  2. The symbol in the small tape square of the cell is written under the head. Here it is B, so the A becomes B. A cell can also write back the symbol it read.

  3. The arrow says which way the head moves, one cell left or right. Here it moves right, onto the B.

  4. The number in the hexagon at the top of the cell is the next state. Here it is 2, so the next step looks in column 2.

  5. When the machine uses a cell marked ✓, it stops. If the tape then shows the example's output, the example passes.

  6. If the machine reaches an empty cell, it stops without ✓ and the example fails. Every cell that some example reaches needs a rule; cells no example reaches can stay empty.

Tips

  • Pick an example to put its input on the tape. Run plays the machine, Step moves it one step, and Back takes one step back.
  • Run all examples checks every example at once without using a submission.
  • After a wrong submission, the first example that failed is put on the tape so you can watch where it goes wrong.

Practice puzzles: two small puzzles to warm up before today's, each with a walkthrough. They don't count toward your record.