TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Langton's ant

176 pointsby guyrover 14 years ago

9 comments

daekenover 14 years ago
I've been interested in Langton ants for a good 8 years now, and have been playing with variants on them for a long time. Here's one of my favorites: <a href="http://pyvascript.appspot.com/Langton45" rel="nofollow">http://pyvascript.appspot.com/Langton45</a><p>Rather than working on 90 degree turns, this does 45 degree angles, and it has a bit more complexity in the command set.<p>The rules are: + and - turn right and left 45 degrees, * and / turn right and left 90 degrees, ! reverses direction, . does nothing.<p>You can come up with some really interesting patterns, e.g. <a href="http://pyvascript.appspot.com/Langton45?command=*.%2B" rel="nofollow">http://pyvascript.appspot.com/Langton45?command=*.%2B</a><p>Edit: Huh, I guess I never released any of that. I should port it to a modern Pyvascript and throw it up somewhere, as the version this is built against is probably going on 3 years old.
评论 #2231009 未加载
评论 #2231707 未加载
slapshotover 14 years ago
Also see Conway's Game of Life for an interactive system of complex emergent behaviors from very simple rules:<p><a href="http://en.wikipedia.org/wiki/Conway%27s_Game_of_Life" rel="nofollow">http://en.wikipedia.org/wiki/Conway%27s_Game_of_Life</a><p><a href="http://www.bitstorm.org/gameoflife/" rel="nofollow">http://www.bitstorm.org/gameoflife/</a>
JonnieCacheover 14 years ago
For more fun along these lines, wolfram provides as always:<p><a href="http://demonstrations.wolfram.com/CellularAutomatonExplorer/" rel="nofollow">http://demonstrations.wolfram.com/CellularAutomatonExplorer/</a><p>(Cellular Automata is the name for these constructs, langon's ant, the game of life, and so on.)
评论 #2233300 未加载
greymanover 14 years ago
It is interesting, but, pardon my ignorance, is it appropriate to call this "a behaviour" (in the traditional meaning of this word)? It looks to me like "just" playing with numbers, i.e. normal phenomenon ultimately describable with some math theory. It looks far-fetched to me to describe it with the terms like "simple rules can result to complex emergent behaviour," etc...<p>I remember there are some number sequences generated by some rules, which seems random at first and then some sub-sequence repeates. Now this looks similar to me, except it seems to more mysterious because someone described it as "ant doing something". ;-)
评论 #2230985 未加载
评论 #2232081 未加载
评论 #2230762 未加载
评论 #2232798 未加载
stcredzeroover 14 years ago
Where can one find chaotic toy algorithms that don't involve Turing machines or cellular automata? (I need one for a project, and I keep running into image processing and biology applications. I actually need a toy one.)<p>EDIT: Found it: (pseudocode, not Python)<p><pre><code> while x &#62; 1 case ((x mod 2) == 0): x = x / 2 case ((x mod 3) == 0): x = x + 1 default: x = x * 3 </code></pre> The number of iterations it takes to leave the loop is chaotic.
评论 #2232288 未加载
sharmajaiover 14 years ago
I have a free android live wallpaper, based on them: <a href="https://market.android.com/details?id=info.jaisharma.antslive.free" rel="nofollow">https://market.android.com/details?id=info.jaisharma.antsliv...</a> . You can create/delete ants, the patterns they draw is always interesting specially since multiple ants affect each other's state and since a human draws ants at random location and time.
guyrover 14 years ago
See also:<p><a href="http://en.wikipedia.org/wiki/Langtons_loops" rel="nofollow">http://en.wikipedia.org/wiki/Langtons_loops</a><p><a href="http://en.wikipedia.org/wiki/Wireworld" rel="nofollow">http://en.wikipedia.org/wiki/Wireworld</a>
RomPover 14 years ago
Complex patterns produced by simple set of rules? DNA-&#62;proteins-&#62;cells-&#62;organisms-&#62;societies? The only difference in my view is that DNA happens in 3-dimensional space and uses 4 "colors" instead of 2.
daviover 14 years ago
Interned with Langton at SFI in summer of 1997. Great experience.