Langton's Ant - Rules

Rules

Squares on a plane are colored variously either black or white. We arbitrarily identify one square as the "ant". The ant can travel in any of the four cardinal directions at each step it takes. The ant moves according to the rules below:

  • At a white square, turn 90° right, flip the color of the square, move forward one unit
  • At a black square, turn 90° left, flip the color of the square, move forward one unit

Langton's ant can also be described as a cellular automaton, where the grid is colored black or white, the "ant" square has one of eight different colors assigned to encode the combination of black/white state and the current direction of motion of the ant.

Read more about this topic:  Langton's Ant

Famous quotes containing the word rules:

    This was Pharaoh, direct descendent of our deity Amon, god of the sun, who rules the heavens as Pharaoh rules the earth. Again, he brought treasure, gold, and precious jewels taken from our enemies. For to Pharaoh riches were power and power was to be desired. And also again he brought many captives. For is it not by slaves that one becomes even richer and then has even more power?
    William Faulkner (1897–1962)

    The early Christian rules of life were not made to last, because the early Christians did not believe that the world itself was going to last.
    George Bernard Shaw (1856–1950)

    Alas! when Virtue sits high aloft on a frigate’s poop, when Virtue is crowned in the cabin of a Commodore, when Virtue rules by compulsion, and domineers over Vice as a slave, then Virtue, though her mandates be outwardly observed, bears little interior sway.
    Herman Melville (1819–1891)