Neat Algorithms - Flocking
harry.me
Neat Algorithms - Flocking
1–10 of 26 posts
Re: Neat Algorithms - Flocking
#2oh, FLOCKing. Yes. That is neat too.
Re: Neat Algorithms - Flocking
#3Thank you so much! Great article, found some stuff I could definitely use for games I'm working on.
Re: Neat Algorithms - Flocking
#4The 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:
"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."
Re: Neat Algorithms - Flocking
#5oh, FLOCKing. Yes. That is neat too.
Delete your comment immediately.
Re: Neat Algorithms - Flocking
#6My friend actually recently released an Android game based on exactly this: https://play.google.com/store/apps/details?id=co.uk.iceroad....
Re: Neat Algorithms - Flocking
#7I 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.
Just uploaded it to my bitbucket repository in case anyone is interested.
Re: Neat Algorithms - Flocking
#8You should definitely check out Daniel Shiffmans "Nature of Code" book that is coming out soon. It's full of stuff like this.
Re: Neat Algorithms - Flocking
#9Woah! 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.
For example, whats the fastest data structure/algorithm to make searching for neighbours?
Re: Neat Algorithms - Flocking
#10Here's a CoffeeScript port of this algorithm I did awhile ago.
https://gist.github.com/3733089
and a demo:
http://wsb.im/flocking/index.html
Definitely fun stuff to play around with.