Langton's Ant in 512b.
Langton's Ant in 512b.
My small implementation of a very simple two-dimensional Turing machine, name Langton's Ant. Done in 512b, one hour of life wasted. Maybe there are people that have own interesting programs in 128b/512b/1kb/8kb?
- Attachments
-
- main.love
- (455 Bytes) Downloaded 198 times
Re: Langton's Ant in 512b.
Same, but colorful, with 19 more ants and in 1Kb. Controls: Right - 20x speed, Left - normal speed.
- Attachments
-
- main.love
- (643 Bytes) Downloaded 139 times
Re: Langton's Ant in 512b.
I messed around with something like this a few days ago actually. My goal wasn't a low file size though. And it's not necessarily langon's ant, It was initially but i expanded on it.
My implementation is something like what's described in the "Extension to multiple colors" section on the wikipedia page, Except you can have cells that don't change the ants direction.
You can add as many ants and cell types as you want too. This stuff is pretty fun to mess around with. If an ant hits the edge the screen weird things happen though, Don't feel like fixing that. lol
Requires 0.9.0 (Is it safe to stop mentioning that yet?)
It's set up as a standard langtons ant at the moment, There's a table called pat near the top of map.lua that you can add cell types or whatever to to modify it ({"r", "l", "l", "r"} is pretty neat). Space toggles the simulation EDIT: So i've expanded this a bit further, Added another cell type thing that sends the ant in a random direction. And also made it be able to run multiple simulations simultaneously to see how different the patterns it creates are. (i'm bored)
this runs 6 simulations with the pattern left, right, random. This can easily be customized with the variables in love.load.
My implementation is something like what's described in the "Extension to multiple colors" section on the wikipedia page, Except you can have cells that don't change the ants direction.
You can add as many ants and cell types as you want too. This stuff is pretty fun to mess around with. If an ant hits the edge the screen weird things happen though, Don't feel like fixing that. lol
Requires 0.9.0 (Is it safe to stop mentioning that yet?)
It's set up as a standard langtons ant at the moment, There's a table called pat near the top of map.lua that you can add cell types or whatever to to modify it ({"r", "l", "l", "r"} is pretty neat). Space toggles the simulation EDIT: So i've expanded this a bit further, Added another cell type thing that sends the ant in a random direction. And also made it be able to run multiple simulations simultaneously to see how different the patterns it creates are. (i'm bored)
this runs 6 simulations with the pattern left, right, random. This can easily be customized with the variables in love.load.
Re: Langton's Ant in 512b.
Thanks for posting your implementation, veethree. Pretty nice.
UPD: Demo is updated for LOVE 0.9. Developers, thanks for speed improvement.
UPD: Demo is updated for LOVE 0.9. Developers, thanks for speed improvement.
- Attachments
-
- main.love
- (648 Bytes) Downloaded 133 times
Who is online
Users browsing this forum: No registered users and 2 guests