Flocking and equilibrium
Timkin
My Kung Fu is stronger.
neo88
Dave Mark - President and Lead Designer
Intrinsic Algorithm - "Reducing the world to mathematical equations!"
Dave Mark - President and Lead Designer of Intrinsic Algorithm LLC
Professional consultant on game AI, mathematical modeling, simulation modeling
Co-founder and 10 year advisor of the GDC AI Summit
Author of the book, Behavioral Mathematics for Game AI
Blogs I write:
IA News - What's happening at IA | IA on AI - AI news and notes | Post-Play'em - Observations on AI of games I play
"Reducing the world to mathematical equations!"
quote: Original post by neo88
yeah, you need a leader for this sort of thing. Otherwise it will come to a neutral point at some point in time.
My Kung Fu is stronger.
neo88
You can even have a set of rules to determine who is leader. Determine which bird has the most other birds "following" him, and every minute or so, update the leader.
Thanks!
Maybe have attractive points, or repellant points (food/predators) which appear and dissappear over time.
Selecting a leader gets you away from emergent behavior. The flock is no longer a collection of similar individuals behaving collectively. There is a special individual who''s behavior is determined by a radically different set of rules and to which all the others are slaved (though really the food is the same thing I guess ).
Im new to all this AI stuff but i am doing a project on boids. I have created an app in C++ (im a noob at that too) which anyone can have if they want me to post the link (source and exe).
I too came accross your problem (and others) referring to Reynolds and from what i have learnt the best solution is not to use leader following, i think that would be referred to as a planning stategy which just over complicates things (for a start anyhow), i built it up in stages and refined the 3 rules only, to get the desired behaviour. I also created locomotion (a vehicle class, the embodiment?) and derived from it my boids.
Anyhow i didnt use leader following and i dont get that problem anymore . What Reynolds does is get the boids to only flock towards the surrounding boids (a simple check of the distance between a boid and neighbouring boids, this also forms loads of funky seperate flocks). The boids try to match the velocity of the near by boids. Boids can only see view a certian about angle i think its 270 degrees? that gives them more direction. including seperation that covers the 3 rules.
This site was a massive help:
http://www.vergenet.net/~conrad/boids/
i am only noob but i hope this is helpful.
Seb
oh make sure they have a minimum velocity!
[edited by - sllabres on February 24, 2004 7:16:44 AM]
Min. Velocity
Max. Velocity
Turn rate
Acceleration rate
Desired sep. distance
Radius to check for other boids
What''s even more important and really accentuates the above is the vary these thresholds over time for the same boid. One time, the boid may adjust because the neighboring boid is within X distance. The next time, he may adjust because that same neighbor is within Y distance. Another way of accomplishing that is to space out the state checks. If you check every Z number of frames, the boid may catch the neighbor at X distance the first time and Y distance the next check.
The real world is comprised of gray areas. Use them.
Dave Mark - President and Lead Designer
Intrinsic Algorithm - "Reducing the world to mathematical equations!"
Dave Mark - President and Lead Designer of Intrinsic Algorithm LLC
Professional consultant on game AI, mathematical modeling, simulation modeling
Co-founder and 10 year advisor of the GDC AI Summit
Author of the book, Behavioral Mathematics for Game AI
Blogs I write:
IA News - What's happening at IA | IA on AI - AI news and notes | Post-Play'em - Observations on AI of games I play
"Reducing the world to mathematical equations!"