Select one of four directions in the Direction slider (1 = North, 2 = East, 3 = South, and 4 = West). (1) Click on the green flag and then click on the head of the ant and it will shrink to a 2x2 ant. Verify that the ant, after wandering around the plane in what appears to be a random, patternless way, does, after 10,000 plus steps, starts to build a diagonal pattern called a 'highway'. (2) The circle, triangle, square, and line segment are sprites. Click on the green flag and drag either the circle, triangle, square, or line segment so that it traps the red dot in the center of the ant. Click on the head of the ant to start the ant moving. Be patient. Determine what path the ant creates. Experiment with different headings and placements for each of the closed shapes. (3) If correctly placed, the ant will follow a line. If the line is infinite in length, the ant will follow the line without building a highway. But it is believed, but unproven, that for any line segment, the ant eventually builds a highway. Click on the green flag and move the line close to ant. Experiment with different headings and line positions. Caution: For reasons unknown to me, the ant does not like to work at Turbo speed or in Presentation mode and will not correctly draw the pattern determined by its rules.
The Two Rules that Govern the Movement of the Ant The ant starts out at (0, 0) with a heading of one of the four cardinal directions. It looks at the color of the square (2x2 sprite) it is sitting on. If the square is white it paints it black, turns 90º to the left, and moves 2 steps to a new square. If the square is black, it paints it white, turns 90º to the right, and moves 2 steps to a new square. It keeps on following those same simple rules forever. Although the rules are simple, the behavior has much to teach us about our understanding of what the term 'theory' means. For a deeper discussion of Langton's Ant, download and read Ian Stewart's Mathemaical Recreations column from the July 1994 issue of Scientific American. http://dev.whydomath.org/Reading_Room_Material/ian_stewart/AntyParticles.pdf In his article Ian Stuart tells us that even though we know all there is to know about the ant (it's rules), we can not explain or predict the behavior of the ant. In order to be 'known',it's path has to be computed, step by step. For another ant project see my Dewdney's Tur-mite project at http://scratch.mit.edu/projects/40908674/