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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Neat Algorithms - Flocking

160 点作者 bochi超过 12 年前

13 条评论

hythloday超过 12 年前
The original paper[0], published in '86, in addition to being a huge step forward over contemporary graphics techniques, is extremely comprehensible and an excellent read. It also goes into some detail about collision avoidance, which is hard to see in the browser demo (boids will avoid the mouse but not in a very large area), and goal seeking, which isn't in it. It ends with a fairly eyebrow-raising testament to the increase in computer power over the last two and a half decades:<p>"This report would be incomplete without a rough estimate of the actual performance of the system. With a flock of 80 boids, using the naive O(N^2) algorithm (and so 6400 individual boid-to-boid comparisons), on a single Lisp Machine without any special hardware accelerators, the simulation ran for about 95 seconds per frame. A ten-second (300 frame) motion test took about eight hours of real time to produce."<p>[0] <a href="http://www.red3d.com/cwr/papers/1987/boids.html" rel="nofollow">http://www.red3d.com/cwr/papers/1987/boids.html</a>
评论 #4530318 未加载
评论 #4531521 未加载
mlu超过 12 年前
I once programmed a swarm simulation as a project for a course I attended. You can set various parameters of the swarm and introduce a predator which can try to eat inidividuals of the swarm. You then can set a bunch of escape strategies. This was pretty much fun when I wrote it.<p>Just uploaded it to my bitbucket repository in case anyone is interested.<p><a href="https://bitbucket.org/mlux/swarm-simulation" rel="nofollow">https://bitbucket.org/mlux/swarm-simulation</a>
评论 #4530388 未加载
pacaro超过 12 年前
This is covered very well (a long with many other <i>neat</i> algorithms) in The Computational Beauty of Nature[1], one of those books I keep coming back to<p>[1] <a href="http://mitpress.mit.edu/books/FLAOH/cbnhtml/" rel="nofollow">http://mitpress.mit.edu/books/FLAOH/cbnhtml/</a>
评论 #4529816 未加载
评论 #4530518 未加载
评论 #4530119 未加载
Bjartr超过 12 年前
I made a boids implementation in WebGL a while back<p><a href="http://www.cs.rit.edu/~bpd9116/WebGLU/examples/boids/boids.html" rel="nofollow">http://www.cs.rit.edu/~bpd9116/WebGLU/examples/boids/boids.h...</a>
tsahyt超过 12 年前
The visual demonstration is rather hypnotizing to watch. This algorithm is an example how seemingly intelligent behaviour roots in just a handful of simple rules. In this way it kind of reminds me of Conway's Game of Life: A few simple rules stimulating stunningly complex behaviour.
repocussion超过 12 年前
My friend actually recently released an Android game based on exactly this: <a href="https://play.google.com/store/apps/details?id=co.uk.iceroad.complexcity.floqua" rel="nofollow">https://play.google.com/store/apps/details?id=co.uk.iceroad....</a>
wsbail29超过 12 年前
Here's a CoffeeScript port of this algorithm I did awhile ago.<p><a href="https://gist.github.com/3733089" rel="nofollow">https://gist.github.com/3733089</a><p>and a demo:<p><a href="http://wsb.im/flocking/index.html" rel="nofollow">http://wsb.im/flocking/index.html</a><p>Definitely fun stuff to play around with.
评论 #4531456 未加载
runemadsen超过 12 年前
You should definitely check out Daniel Shiffmans "Nature of Code" book that is coming out soon. It's full of stuff like this.
评论 #4529703 未加载
评论 #4530190 未加载
bawllz超过 12 年前
Woah! Super cool idea. So many ways you can take this to a new level. Also, if anyone is looking to contribute to some open source, this would be a great opportunity as there is lots of epic optimization problems in this algorithm to work on.<p>For example, whats the fastest data structure/algorithm to make searching for neighbours?
评论 #4531266 未加载
haihaibye超过 12 年前
<a href="http://proceduralgraphics.blogspot.com.au/2010/06/flock-in-cloudy-blue-sky.html?m=1" rel="nofollow">http://proceduralgraphics.blogspot.com.au/2010/06/flock-in-c...</a><p>In straight js and canvas, with bird silhouettes and Perlin sky
Havoc超过 12 年前
Bat swarms and game AI aside, what are the real world applications of something like this? It strikes me as significantly less useful than say a neural net.
评论 #4530548 未加载
seivan超过 12 年前
Thank you so much! Great article, found some stuff I could definitely use for games I'm working on.
jeffehobbs超过 12 年前
oh, FLOCKing. Yes. That is neat too.
评论 #4529340 未加载