Alert icon
We're changing our privacy policy. This stuff matters.  Learn more  Dismiss

Langton's Ant

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
194 views
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Feb 20, 2011

This is a small program I wrote to demonstrate Langton's Ant. The concept is pretty simple.

Basically, the Ant (The green pixel) operates on two rules:

1. If the Ant is on a black pixel, it will change the black pixel to red, turn 90 degrees to the right, and then walk forward one pixel.
2. If the And is on a red pixel, it will change the red pixel to black, turn 90 degrees to the left, and then walk forward one pixel.

So, this process is repeated over and over and over again, producing the crazy pictures you see here.

An amazing feature of Langton's Ant is the fact that it produces a "highway" of sorts after about 10,000 or so steps. It just starts cruising along in a straight line, but with a shape similar to that of a human spine.

I wrote this program in C++ using Allegro.

If you have any questions about Langton's Ant, you look it up on Wikipedia here:
http://en.wikipedia.org/wiki/Langton's_ant

If you have questions about my program, I'd be more than happy to answer them.

You can download the program here: https://sites.google.com/site/ats3117/apps/LangtonsAnt.zip

Have fun!

Category:

Science & Technology

Tags:

License:

Standard YouTube License

  • likes, 0 dislikes

Link to this comment:

Share to:
see all

All Comments (1)

Sign In or Sign Up now to post a comment!
  • That is amazing

    

Loading...
Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more