Coding Dojo

Edit on Gitlab

Langton Ant

About this Kata

The purpose is to build a cellular automaton : Langton Ant

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:

Langton’s ant can also be described as a cellular automaton, where the grid is colored black or white and 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.

One new color

Add red color. now flip color rule is a circular update.

New rules are :