CASA workshop 3AMIGAS (supported by FOCUS K3D and GATE)
Technical program presentation no. 4:
presenter Rosario De Chiara, ISISLab,
Università degli Studi di Salerno
http://www.cs.uu.nl/events/3amigas/
http://www.focusk3d.eu/
http://gate.gameresearch.nl
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Massive Battle: Coordinated Movement of Autonomous Agents
1. Alberto Boccardo, Rosario De Chiara, Vittorio Scarano
ISISLab
Dipartimento di Informatica ed Applicazioni “R.M. Capocelli”
Università degli Studi di Salerno
2. Agenda
• Introduction
• Boid Model
• Coordinated movement
• Conclusion
3. Introduction
• The simulation of groups of characters moving
in a virtual world is a topic that has been
investigated since the 1980s.
– Early works take inspiration from particles system
[3, 4]
4. Introduction
Gravity
Initial Aging
velocity
Emitter Death
5. Introduction
• The particle system model can be expanded
with the purpose of simulating a group of
more complex entities, dubbed autonomous
agents:
– Movements are related to social interactions
among group members:
• Example: the simulation a flock (e.g. birds, fishes,
aliens, people…) in the most natural possible way.
6. Introduction
Gravity
Social
interactions
Initial Aging
velocity
Emitter Death
Fly Aging
around
Birth Death
7. Introduction
We implemented a system capable of animating
autonomous agents with the purpose of
reconstructing interactive scenes from a
battlefield showing a number platoons
11. The Idea
• We expanded the boid model in order to reach an
higher degree of complexity of the behaviors:
– The initial idea of simulating a flock of boids will
be expanded to simulate platoons of soldiers
obeying to commands imparted by a leader.
12. Boid model
• The boid model simulates the coordinated
animal motion such as bird flocks and fish
schools
– The basic flocking model consists of three
simple steering behaviors which describe how an
individual boid maneuvers based on the positions
and velocities its nearby flockmates:
Separation Alignment Cohesion
13. Boid model
• The boid model can be expanded by
assembling basic behaviors to obtain more
complex behaviors:
– Seek and Flee
– Pursuit and Evade
– Obstacle Avoidance
Seek and Flee Pursuit and Evade Obstacle avoidance
14. Boid model
Enemy pursuit, shooting, Combat
evasion commands
L/R flank, L/R Face, March Directional
forward, at ease commands
Flee, Pursuit, Offset Flee, Pursuit, Offset Basic
Pursuit, Seek, Evade Pursuit, Seek, Evade behaviors
Alignment, Separation, Alignment, Separation, Alignment, Separation, Boid model
Cohesion Cohesion Cohesion behaviors
Reynolds 1987 [3] Reynolds 1988 This paper
Reynolds 1999 [4]
15. Coordinated movement
Our system handles 4 elements that made up a
simulation:
– The map: an heightmap
– Obstacles: solid 3d objects
– The Leader: one unit per platoon in charge of the
decisions on directions and battle
– Units: soldier divided in one or more platoons
16. Coordinated movement
The leader
• The leader knows the path the platoon has to
follow and will impart suitable commands to
units
– The path is just a sequence of checkpoints
17. Coordinated movement
The leader
To choose the correct directional command the
leader compares platoon current direction
and the position of next checkpoint on path
Forward
Next march
checkpoint Right
direction flank
Platoon front
Right
face
Rear
march
18. Coordinated movement
Assembling Behaviors
Each directional command
is translated to a series
SCRIPT
SCRIPT
of basic behaviors
LEADER
Fall in
Forward march
Right flank
Left flank
UNITS
AVOIDANCE
AVOIDANCE
ROTATION
OBSTACLE
PURSUIT
OFFSET
OFFSET
SEEK
SEEK
FLEE
BASIC BEHAVIORS LIBRARY
19. Coordinated movement
Combat Mode
• The system simulates scenarios in which two
or more adversary platoons are present
– Each platoon belongs to an army; this is used to
discriminate among friend and foe platoons
– Soldiers deploy one out of three available models
of weapons: melee weapon model, mortar
weapon model and rifle weapon model;
20. Coordinated movement
Combat Mode
• Once an enemy platoon is visible by the leader
tells the platoon to switch to combat mode
– Each soldiers will decide on its own when to shoot
and who to aim to, depending on its position and
the model of weapon it is deploying
21. Conclusion
• Massive Battle is a framework
– Written in C++
– Scenarios are described by a script file
• The script file contains a full description of the initial
setting of the parameters for each platoon
• Once a file is parsed the simulation starts
– Every behavior is controlled by
configuration/script files
22. Conclusion
• Massive Battle is a framework
– Does not depends on how the scene is rendered
• Current demo uses Ogre3D
– It uses a library of basic behaviors
• Took from [11]
• It is compatible with OpenSteer
23. Conclusion
Performances
• On a off-the-shelf PC:
– AMD Athlon 64 x2 4200+
– 2GB of RAM
– ATI X1900 with 512MB
The system animates a scene containing 3000
units on an interactive framerate of 25 fps
24. Conclusion
Future Work
• We are currently working at a GPU
accellerated version of the system
– You may want to check :
“A GPU-based Method for Massive Simulation of
Distributed Behavioral Models with CUDA”
Ugo Erra, Bernardino Frola, Vittorio Scarano
CASA09 short paper !! ☺
26. References [1]
[1] Couzin ID, Krause J, Franks NR, Levin SA. Nature. 2005 Feb 3;433(7025):513-6.
Effective leadership and decision-making in animal groups on the move.
[2] USA Marine Corps Drill and Ceremonies Manual MCO P5060.20
[3] Reeves, W., T., “Particle Systems-A Technique for Modeling a Class of Fuzzy
Objects”, ACM Transactions on Graphics, V2–2, April 1983. and reprinted in
Computer Graphics. V17–3, July 1983, (ACM SIGGRAPH ’83 Proceedings), pp. 359-
376.
[4] Reynolds C. Flocks, herds and schools: a distributed behavioral model. In
SIGGRAPH’87: Proceedings of the 14th Annual Conference on Computer Graphics
and Interactive Techniques, ACM, New York, NY, USA, 1987.
[5] Reynolds C. Steering behaviors for autonomous characters. In Game Developers
Conference, Miller Freeman Game Group, San Francisco, CA, USA, 1999.
[6] Reynolds C. Big fast crowds on PS3. In Sandbox’06: Proceedings of the 2006 ACM
SIGGRAPH Symposium on Videogames, ACM, New York, NY, USA, 2006.
[7] http://opensteer.sourceforge.net/
27. References [2]
[8] Balch T, Hybinette M. Social potentials for scalable multirobot formations. In IEEE
International Conference on Robotics and Automation (ICRA 2000), San Francisco,
2000.
[9] Kamphuis A., Overmars M. H. Motion planning for coherent groups of entities. In
IEEE Int. Conf. on Robotics and Automation. IEEE Press, San Diego, CA, 2004.
[10] Silveira, R., Prestes, E., and Nedel, L. P. 2008. Managing coherent groups. Comput.
Animat. Virtual Worlds 19, 3-4 (Sep. 2008), 295-305.
[11] Buckland M. Programming Game AI by Example. Wordware Publishing, 2005.
[12] Massive software http://www.massivesoftware.com. Accessed on May 2009.
[13] Pro OGRE 3D Programming, (Gregory Junker).
[14] R. De Chiara, U. Erra, M. Tatafiore and V. Scarano. Massive simulation using GPU
of a distributed behavioral model of a flock with obstacle avoidance. Proceedings
of Vision, Modeling, and Visualization 2004 (VMV 2004) (Stanford - California, USA,
Nov 16 - 18, 2004). pp. 233-240.