TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Langton's ant

176 点作者 guyr超过 14 年前

9 条评论

daeken超过 14 年前
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 未加载
slapshot超过 14 年前
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>
JonnieCache超过 14 年前
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 未加载
greyman超过 14 年前
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 未加载
stcredzero超过 14 年前
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 未加载
sharmajai超过 14 年前
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.
guyr超过 14 年前
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>
RomP超过 14 年前
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.
davi超过 14 年前
Interned with Langton at SFI in summer of 1997. Great experience.