3 ms·
Flocking is one of my favorite algorithms. I used it as the AI in a game once where fish play capture the flag. I gave each player a "personality" by weighting
by mysterydip 8y ago
Flocking is one of my favorite algorithms. I used it as the AI in a game once where fish play capture the flag. I gave each player a "personality" by weighting separation/cohesion/alignment slightly different.
I also added in cohesion towards enemies (for attacking) or the flag (for capturing), and separation of obstacles. If one had the flag, they changed to separation of enemies and cohesion towards their own flag. With a few simple additions, watching the results was very satisfying.