VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Langston's Ant

by Matrix Man (1 Submission)
Category: Miscellaneous
Compatability: Visual Basic 3.0
Difficulty: Intermediate
Date Added: Wed 3rd February 2021
Rating: (7 Votes)

Let me intoduce you to Langston's Ant.
its an interesting demonstation of somthing called 'emergent behaviour'.
Imagine a large surface made up of square, white tiles with an imaginary ant somewhere around the middle. The ant follows two very simple rules. The first rule states that if the ant is on a white tile, it turns black, and the ant then moves foward one square and turns left and continues. The other rule is, if the ant is on a black square, the ant turns it white, then moves foward and to the right and continues.
When the ant starts to move, the movement appears random. At around 10,000 moves it suddenly switches to a fixed and repeditave pattern of movement that it wont deviate. Even if the surface is seeded with black squares, the result is the same, but the number of moves will be more.
You will find that in all instences the same final fixed pattern is acheived.
So far, no one has come up with mathematical proof that this will always be so.
* for versions earler than VB6, delete the private from the sub to get it working.

Rate Langston's Ant

Download Langston's Ant

Download Langston's Ant (3 KB)

Langston's Ant Comments

No comments have been posted about Langston's Ant. Why not be the first to post a comment about Langston's Ant.

Post your comment

Subject:
Message:
0/1000 characters