Browse Search Popular Register Upload Rules User list Login:
Search:
Lantons ant

Image:
screenshot of the scene

Author: FRA32

Group: Technical

Filesize: 44.36 kB

Date added: 2016-09-17

Rating: 6

Downloads: 1530

Views: 487

Comments: 9

Ratings: 3

Times favored: 0

Made with: Algodoo v2.1.0

Tags:

Scene tag

Yet another cellular automata(or something similar to that), this time the so called Langtons Ant. It is a simulation where an entity, the "ant", moves depending on the pixels. If it hits a black pixel, it turns 90° to the right and goes forward, else it turns left and goes forward. In both cases, the color of the pixel is inverted. Try fast-forwarding and leaving the scene running a while, and you will see that after a while, the ant starts building a "road" that goes on to infinity. I may extend this scene to enable customizing the ant, allowing the general langtons ant to run. When extended, there exist more than 2 states for the pixels, and everytime the ant hits the pixel, it first does a specific task you decide, and then cycles the color of the pixel 1 step further. this way you can make different shapes, most of them resulting in chaos, some in a "road", and some in some regular pattern. I will first think about this extension, since it requires some way of programming the cycle, and I only want to do that if people want to see such a thing(ain't got much time, so I want it to be worth it).

Nontheless, enjoy the scene, and remember to leave it running a while to see what the ant builds after a while.
Last edited at 2016/09/17 11:40:53 by FRA32
Please log in to rate this scene
edit
Responses to this scene
show list
Title: Fix for FRA32's ants
Rating: 5.625
Filesize: 4.26 kB
Downloads: 1069
Comments: 1
Ratings: 2
Date added: 2016/09/18 22:48:41
Made with: Algodoo v2.1.0
Rating: rated 5.6
download
It made a road and then stopped after 9 pixels. How is that possible?
Wierd. If it stopped then there must have been something that interferred. Maybe your system ran out of memory, since the increasing amount of white pixels can take a small toll on algodoo. I haven't witnessed this error before. I will look if this has a specific source and fix it if that's the case.
Okay so I noticed that the blocks are slightly leaking in position after a while, propably due to algodoo rounding errors. I am not sure why they are not always equally severe, but it could happen if you run algodoo in the background, that the rounding is stronger, and thus a larger error exists.
This is really cool! I like cellular automata's because of the interesting patterns that many of them produce. I did a Google search on Langton's Ant and learned more about it. I am also playing around with changing the rules a bit to see what kind of other patterns I could make. I'll post my version of the scene if I come up with anything that's really interesting.

Keep 'em coming! :tup:
Once this scene surpasses 50 or 70 downloads, I will update it with a generalized version where you can enter a sequence of left, right, backwards and forward commands in an array and then let the calculator cycle through them. However I am curious about your version, so do your thing first:D
Well, I don't have anything yet, so please don't wait on me! :zzz:
I will just play around with it as time permits, and so I might come up with something interesting, or I might end up with nothing at all! :bonk:

My all-time favorite scenes are the A.I. (or simulated A.I.) scenes like kilinich's Basketball Robot 2 . It seems to have a mind of its own, and that's what impresses me about that type of scene!.
Your code gives unstable result. I'll correct it and upload as reply.
Last edited at 2016/09/18 21:40:02 by Kilinich
I manage to pass 11000 steps in 25 sec with new optimised code. Check it out :tup:
Last edited at 2016/09/19 11:01:29 by Kilinich
It's better to fix "ant" to backgrond so in that case no need to round position.