Langton's ant with MatrixCanvas

A universal Turing machine with only two rules:

  1. At a white square, turn 90° clockwise, flip the color of the square, move forward one unit
  2. At a black square, turn 90° counter-clockwise, flip the color of the square, move forward one unit

An ant starting on a blank canvas would move on infinitely. (It does stop at the edges of the canvas in this implementation.)

See Wikipedia: Langton's ant

Langton's ant

You can flip the color of each square by clicking on it. When done click below.

Options
 
Presets

Choose a preset, i.e. some squares are already black.

Debug