Langton's ant with MatrixCanvas
A universal Turing machine with only two rules:
- At a white square, turn 90° clockwise, flip the color of the square, move forward one unit
- 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