Skip to content

Comment on Langton's ant

Comments

Where can one find chaotic toy algorithms that don't involve Turing machines or cellular automata? (I need one for a project, and I keep running into image processing and biology applications. I actually need a toy one.)

EDIT: Found it: (pseudocode, not Python)

    while x > 1
         case ((x mod 2) == 0):
             x = x / 2
         case ((x mod 3) == 0):
             x = x + 1
         default:
             x = x * 3
The number of iterations it takes to leave the loop is chaotic.
AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.