Alan Turing’s 100th Birthday

Repair the programs of a tiny Turing machine so its tape matches the target digits, and light up the Google logo one letter at a time.

The machine at rest: a tape, a reading head and an empty program

A puzzle begins: click the yellow buttons to repair the program

Press the green arrow and the head steps along the tape

Various iterations of the Turing doodle's design, tried before settling on a workable one

Like this game?

At a glance

Released
June 23, 2012 — Alan Turing's 100th birthday
Made by
Google Doodles: Sophia Foster-Dimino, Jered Wierzbicki and Corrie Scalisi
Genre
Logic and programming puzzle
Players
1
Inside
12 puzzles: six to spell the logo, then six harder ones
Controls
Mouse or touch
Based on
The Turing machine, described by Alan Turing in 1936
Source code
Published by Google in July 2012

What the Alan Turing doodle is

On June 23, 2012, a hundred years after the birth of Alan Turing, Google replaced its logo with a small working computer. Not a picture of one: a Turing machine, the imaginary device Turing described in 1936 to work out what can be calculated at all. It has a paper tape divided into cells, a head that reads and writes one cell at a time, and a short list of instructions.

The doodle turns that idea into a puzzle. Each program is almost right. You repair it, run it, and if the tape ends up showing the right digits, one letter of the grey Google logo takes its colour. Six puzzles colour the whole word.

How to play

  • The box in the top right corner shows the target, for example 01011. The tape below must end up reading the same.
  • The row of circles is the program. Arrows move the head left or right, digits write a 0 or a 1 into the cell under the head. Later puzzles add steps that check what is on the tape and jump back, so the program can branch and loop.
  • Only the yellow buttons can be changed. Click one to switch it to another instruction.
  • Press the green arrow to run the program. The machine carries it out step by step, then compares the tape with the target, cell by cell.
  • If a cell is wrong, the tape resets and you try again.

You never write the answer on the tape yourself. The whole point is to make the machine do it.

The game remembers how far you have got in your browser, so you can come back later.

Who made it

Google's own note on the doodle is signed by three people from the company.

RolePeople
Art and designSophia Foster-Dimino
EngineeringJered Wierzbicki, Corrie Scalisi

TechCrunch's report on the day also named Marcin Wichary, of the Doodles team, among the people behind it.

How it was made

An abstract idea you can click

The team wanted to honour what Turing thought, not only how he looked. After reading up on his work they chose the machine from his 1936 paper On Computable Numbers. The hard part was making something so abstract playable by people who had only come to search. Google says this doodle went through more user testing and redesign than any before it.

What the testers taught them

The game's source code still carries the team's notes, and they read like a design diary.

  • An early first puzzle was too easy: testers clicked the only button, won, and learned nothing.
  • A harder version confused them, because one button cycled through left, right, zero and one. The choices were cut down.
  • The first puzzle was arranged so that the first digit comes out right and a later one wrong. That way the checking animation shows both a match and a miss.
  • One looping puzzle was dropped because testers did not notice the curved tracks that carry the program backwards.

Built for the browser

The doodle is written in JavaScript with ordinary HTML, CSS and image sprites, with no game engine underneath. If you fail a puzzle twice, the machine quietly slows down so that the steps are easier to follow. The speed settings in the code run from slow to one called ludicrous. A program that would loop for ever is stopped after a set number of steps.

Given away

On July 11, 2012, less than three weeks later, Google published the source code: the program under the Apache 2.0 licence, the artwork under a non-commercial Creative Commons licence. Jered Wierzbicki told Wired he hoped people would experiment with it and build on it.

Alan Turing

Alan Turing (1912–1954) was a British mathematician. His 1936 machine is the theoretical model behind every modern computer. During the Second World War he worked on breaking German ciphers at Bletchley Park, and afterwards he designed early computers and wrote about whether machines can think. Google's page adds something less well known: he was a long-distance runner of a very high standard.

In 1952 he was prosecuted under the British laws of the time against homosexuality. He died in 1954, aged 41.

The doodle was part of a wider tribute. Google had helped Bletchley Park raise money to buy a collection of Turing's papers, and in June 2012 it supported the exhibition Codebreaker at the Science Museum in London.

Fun facts and small secrets

  1. There are twelve puzzles, not six

    Finishing the logo is only half of the game. Google's page tells players to come back afterwards: a second, harder set of six puzzles is waiting.

  2. A rabbit hides at the end

    After the puzzles a small rabbit can appear by the target box. Click it and the machine runs a long program that never stops. The source code calls its output the rabbit sequence, a string of ones and zeros tied to the Fibonacci numbers, which were first described with a problem about breeding rabbits.

  3. One puzzle is a Konami Code joke

    The tenth puzzle starts with the tape already showing the answer. A comment in the code explains that it is a silly, easy breather between hard ones, laid out as a nod to the famous cheat code: up, up, down, down, left, right, left, right.

  4. The digits are not random

    The six targets are 01011, 00011, 00011, 01011, 01001 and 10000. They match the letters G, O, O, G, L and E in the five-bit teleprinter alphabet ITA2, the kind of code used on telegraph lines in Turing's own time.

  5. The machine counts while it waits

    Before you touch anything, the doodle is already running a program: it counts upwards in binary on its tape. Leave it alone for long enough and it goes to sleep.

  6. Puzzle nine is a maze

    The ninth puzzle has so many branches that its own authors describe it as a maze in the code comments.

  7. It was called Google's most complex doodle

    Engadget wondered on launch day whether this was the most complicated doodle Google had made. A year later the Christian Science Monitor still listed it among the five best doodle games.

More doodles to think over

If you liked programming the machine, Doodle Kids Coding is the gentle version: you snap command blocks together to guide a rabbit to its carrots. For a different kind of logic, try John Venn’s 180th Birthday or the Doodle Crossword Puzzle.

Sources (11)
  1. Google Doodles — Alan Turing's 100th Birthday
  2. Google Europe Blog — A tribute to Turing
  3. Google Open Source Blog — A Turing complete puzzle game
  4. GitHub — google/turing-doodle
  5. Robert Munafo — the Google Turing doodle program
  6. John Graham-Cumming — What the final Turing machine in the Google doodle does
  7. TechCrunch — Today's Google Doodle is an actual Turing machine
  8. Wired — Google open-sources the Turing doodle
  9. Engadget — Google's Turing doodle celebrates his genius
  10. Christian Science Monitor — The 5 best Google Doodle games ever
  11. ITA2 code table

Comments

No comments yet — be the first!

More Puzzle Games

View All Puzzle Games