Does anyone know any good book describing how to write own Artificial Intelligence for simulating a crowds?
book about A.I.
crowd simulation and/or behavioral simulation at large are really broad subjects and enclose lots of things.
what are you trying to do exactly? writing a crowd simulator completely from scratch? writing actors or modules for behavior or for massive? plugins for some 3D app?
there’s tons of backend you need to take care of before you even only remotely bother with complex AI, and when you get to that point before worrying about algorithms and optimization you’d better be more then up to speed with maths, fuzzy logic, algorithm design…
some additional details about what you are trying to do would help.
Im going to make a custom advanced particle system for Maya with ability each particle to “think”. For the first time, for example, to make a crowd of horses, that see each other and do what neighboor or leader do, do not collide each other, choose animation cycle needed basing on some rules given. The goal is to give user ability to control that crowd based on rules for each person in that crowd.
But i plan this system to be extendable to something even more complicated in the future.
The result should be similar to A.I. Implant for Maya, but i need it more customizable and tuned to our internal studio needs.
That because i want to learn some already known things by other instead of contriving a bicycle =)
the first thing you’ll have to do then is build your own libraries (and make them as good as possible) for raytracing (in the purest sense of the word, not in any rendering terms), collision detection and then build the whole superset of terrain analisys, projection and so on that you’ll build the AI on top of.
do you have a development plan laid down already?
AI comes into play only after an actor has received enough info to process and start the behavioral chain.
the very first thing you need is a raytracer to manage collision prospects, line of sight, split on obstacle+find neighboorhood etc.
are those milestones you already hammered down?
Hmm. Best to go for a plugin approach as you have, as the backend work really does put you off before you get to the interesting stuff (as ThE_JacO said). Take it from me, it takes a while to get your system up to scratch before you even put the AI in!!
In terms of reading, I’d recommend the AI Wisdom 1 & 2 books and the Game Prog Gems books. I’m not sure about the classic AI books, as they’re mostly theory. Also, there’s a newish book about creating believable characters (http://www.charlesriver.com/titles/believablecharacters.html) which might be useful. Also, it might be an idea to look at ‘Steering Behaviors’ and Carsten Kolve’s implementation of those techniques (see links below)
http://www.red3d.com/cwr/steer/
http://www.kolve.com/mp_brainbugz/brainbugz.htm
Hope that helps!! ![]()
Thanks alot guys, that really helps.
No, i didn’t yet started to write anything, just preparing for that and trying to get the most information i need to plan the work and then start it.
If i understood correctly, that raytraicing, collison detection and other stuff should be already written in tons of game programming books, right? Game Programming Gems have it inside or i need something else for such things?
for crowd simulation the collision and line of sight systems need to be as optimized as possible, because they are applied to hundreds of actors (if not more), that means that the same modules thought for games, that focus on speed, are very often close to the mark.
I believe for the first time it would be enough to get system work, even if it too slow, and then optimize it. But i will pay a special attention to that, thanks.
If all you want is to have the horses avoid running into each other and so on, you can use a pretty forward group behavior algorithm. Its called ‘the boids algorithm’ and it is especially suitable for ‘flocks, hers, schools, and generally speaking, any creature that acts as part of a group with hardly any room for individuality,’ according to Daniel Sánchez-Crespo Dalmau in ‘Core Techniques and Algortihms in Game Programming.’ This seems to be pretty much what you want as you write that the horses should act like the neighbour or the leader while avoiding running into each other.
The behavior is broken down into three basic rules which each ‘boid’ follows. Separation means the group members want to avoid getting closer than a certain threshold, which avoids collision. Alignment is that all group members tend to head the same way. Horses don’t generally decide to run in completely different directions, that would be a very silly way to try to keep together. The final part is cohesion which also helps with the keeping together part; all members gravitate towards the center of the group or the leader if the separation rule allows it.
These simple rules supposedly actually result in some very complex looking behavior for the whole group, and yet they’re simple to program. Check out the book I mentioned if you want to try that. I also think ‘AI Grame Programming Wisdom’ 1 or 2 mentions boids.
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.