Langtons maur¶
Oppgave¶
Langton’s ant is a two-dimensional universal Turing machine with a very simple set of rules but complex emergent behavior. It was invented by Chris Langton in 1986 and runs on a square lattice of black and white cells.[1] The universality of Langton’s ant was proven in 2000.[2] The idea has been generalized in several different ways, such as turmites which add more colors and more states. (Fra Wikipedia)
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° 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
Oppgave: Lag Game of Langtons maur!
Denne oppgaven kan være godt egnet for å løses sammen med andre.¶
Denne oppgaven er laget av fuzzbin og bitjungle. Oppgaven er lisensiert under en Creative Commons Navngivelse-DelPåSammeVilkår 4.0 Internasjonal lisens.