3 ms·
Langton's ant is really cool, especially considering the extremely simple rules. - At a white square, turn 90 degrees clockwise, flip the color of the square,
by gkbrk 3y ago
Langton's ant is really cool, especially considering the extremely simple rules.
- At a white square, turn 90 degrees clockwise, flip the color of the square, move forward one unit.
- At a black square, turn 90 degrees counter-clockwise, flip the color of the square, move forward one unit.
If you look at the images and animations, you might think that it becomes repetitive quickly, and nothing interesting happens. But that is only if you have an infinite grid.
If you have a grid that wraps to the opposite side on the edges, it interacts with its own path a lot more. This produces very chaotic and "random" results. In fact, I've made a toy PRNG based on Langton's ant, and it does quite well on PractRand. It's not a performance king, far from it, but still really cool that two simple rules can do that.
It would be a fun project to make a (probably very slow) cipher based on Langton's ant.