The Crowd Simulation for Interactive Virtual Environments

Muhammad Shafie Abdul Latif* Setyawan Widyarto **
* **
Faculty of Computer Science and Information System, Politeknik Negeri Lampung, Jalan Soekarno Hatta,
Universiti Teknologi Malaysia, 81310 UTM Skudai, Rajabasa, Bandar Lampung 35145, Indonesia,


The paper will cover the issues of Collective Behavior in complex Path planning produces correct solutions but the associated
and critical event in Virtual Environment and its Application by semantics is not easily accessible. This can be related to the
Visualizing Space and Information. This is related to the on-going underlying heuristic search techniques, which essentially compile
research results concerning development of the crowd simulation information into heuristics, which are not high-level
for interactive virtual environments. The simulation aims to representations.
reproduce realistic scenarios involving large number of the virtual
human agents. We define interactive VE as an architecture of Conversely, adopting a semantic approach to path planning opens
multi-agent system allowing behaviors of the agents to interact the way to a better and more appropriate control of autonomous
among them, with the virtual environment as well as with the real agents. The introduction of semantics in heuristic path planning
human participants. The first behavior is known as Collective has been proposed by Bandi and Cavazza [Bandi and Cavazza
behavior. One of collective behavior to be described in this paper 1999]. This paper will describe the extension of this approach to
is maximum dispersion for the group of three agents. There are the case of multi-agent co-ordination, a problem with many
some complexities in identifying the procedure for maximum applications in computer animation.
dispersion behavior among three agents. For experimenting with
the determined procedures, the path planning of crowd dispersion
in the building environment at the time of emergency situation is
2 Research Problem
applied. With this complex and critical environment an
experiment is carried out and the result of simulating maximum There are three aspects to the problem of crowd simulation
dispersion behavior of agents is discussed. specifically co-ordinating group of agent. The first one is to
search for the minimal path from source to destination, the second
CR Categories: is to co-ordinate a group of actors for the purpose of embedding
semantic information i.e. maximum dispersion and finally to
Keywords: collective behavior, the A* algorithm, multi-agent convert action to motion for animation.
However, the paper concentrates on the co-ordination of agents to
1 Introduction move together as a group or crowd. Co-ordination will result in
the generation of alternative paths if such paths exist. The
Crowd simulation may be defined as an animation of a group of procedure for co-ordinating path planning for three agents in
animated character. Animated characters or we may call agents virtual environments has been implemented.
moving together in virtual environment. The movement in certain
cases requires agents to coordinate among them self. They may The on-going research result presented in this paper will introduce
follow after one another, walking in line or dispersing using the synchronous path planning method in order to tackle the first
different directions. All these actions contribute a collective two problems. The result of path generation is the list of direction
behavior that need to be explored. and then converts into a transformation of animation i.e. to solve
the third problem. With a single path planning calculation,
Path planning is used to generate motion and this motion also multiple paths will be generated to provide different paths for
constitutes a set of actions. As virtual worlds are normally multiple agents from the same location to the same destination. In
populated by more than one agent, incorporation of multi-agent other words, this can provide alternative paths for agents to
actions is one of the most important areas in animation proceed to a certain destination. The property of admissibility is
techniques. This is another test case of the relationship between used to enhance the capabilities of the A* algorithm to serve this
high-level descriptions (actions) and low-level motion. In this purpose. Coordination is embedded in path planning using
case, we will investigate how high-level semantics can govern application-dependent data for the semantic interpretation, i.e.
low-level motion from a population of agents instead of one single maximum dispersion. It is subsequently included as a collective
agent. behavior for multi-agents movement in a virtual environment.
*e-mail: 3 Related Work in Collective Behavior
Copyright © 2004 by the Association for Computing Machinery, Inc. In this section, some details of the architectural crowd will be
Permission to make digital or hard copies of part or all of this work for personal or described. Collective behaviors have been studied and modeled
classroom use is granted without fee provided that copies are not made or distributed with very different purposes. Besides single work concerned with
for commercial advantage and that copies bear this notice and the full citation on the
first page. Copyrights for components of this work owned by others than ACM must be
generic crowd simulation [Musse 2000.], most approaches were
honored. Abstracting with credit is permitted. To copy otherwise, to republish, to post on application specific, focusing on different aspects of the crowd
servers, or to redistribute to lists, requires prior specific permission and/or a fee. behavior.
Request permissions from Permissions Dept, ACM Inc., fax +1 (212) 869-0481 or e-mail
© 2004 ACM 1-58113-884-9/04/0006 $5.00
Short Paper

it is difficult with flocking algorithms to devise strategies for multiple animator from the need to specify each detail of every path. 279 . 1996] is not meant to provides the solution for multi-agents movement. This problem would generally lead the flock to think and react to events around them. Ulicny [Ulicny at. path planning process. for simulate the movement of agents in open space. 2000.1 Behavioral Levels in Groups disperse for alternative paths leading toward the same destination.e. are free from the user’s control. In possible behaviors (robotic field term is teach and pendant). 1992] without actually sharing a common goal are 3. 2000. series of position and orientation on a moving object in spatial coordinates. Their main purpose is to both for everyday use [Bouvier and Guilloteau. Recent development in motion planning and in global techniques for improving the approach has been discussed establishing the interaction between objects and their surrounding [Overmars.2. may be controlled by the use of notation to define specific constraints. as most flocking procedures ensure to the field of artificial intelligence. Typical work on virtual environment as well as intelligent responses to the action action is concerned with how to control the motion or to create the being carried out.1 Autonomous Modeling the virtual world: if one actor splits from the group it might not be able to reconvene on the basis of the flocking algorithm only. developed the crowd simulation for interactive virtual special purpose actions such as obstacle avoidance are controlled environments such as virtual reality training system for urban by a separate behavior routine. NPCs will interpret an action carried out by the main animated character or player avatar. An animation made. they go on different routes and reconvene back to a may independently behave as individuals who posses the ability to same destination. relationships among individual agents and collective structure of a group. with the virtual Multi-agent Real-Time-A* with selection [Yokoo and Kitamura environment and with the real human participants has been. for examples. Whereas the improvement for path planning techniques goal is specified. system allowing both scripted and autonomous behaviors of the agents as well as interactions among them. A*. Some examples of applications concerning crowd behavior both Schooling behavior [Tu 1996. Behavior in groups of a system may be described at three levels: 4 Motion Control for Non-Player Characters the individual agent. the behavior in the real world animation. and other words. and frees the especially if the terrain contains obstacles. flocking method is not easily applicable to with agents). In building a mathematical formulation for the crowd behavior. 3. and the system attempts to generate a suitable used for large crowds is very few. flocking algorithms [Reynolds 2000] are vulnerable to local phenomena in 3. for instance avoiding-static- emergency situations and defined architecture of multi-agent obstacles and avoiding-fish in schooling behavior. a gaskinetic or by a fluid agent. 1997] as well as the formation of freely forming groups and the behavior in queues flocking algorithm are ill-suited to the simulation of human include crowd motion simulations to support architectural design movements in planar environment. 1997] have successfully used particle system Marchant.2 Collective Behavior Formulation The separate paths that are created for each agent using linear interpolation as implemented in crowd behavior [Thalmann et al. The model gives agents some ability to improvise. research co-ordination among multi-agent is so specifically as to 3. Thus a computer animation technique is often referred more complicated when an animation for large crowds must be to motion control systems [Watt and Watt 1992]. Information sharing between objects is used as Ishida [Ishida 1998] normally serves the same purpose. Thus motion or path planning becomes much animation. In this case. 2002] but it concentrated on the probabilistic roadmap may be classified as behavioral animation. 1996]. a desired (PRM). In extent. Where as. It is impossible for the crowd behavior to plan the path and dynamic formulation. flock cohesion rather than agent dispersion. Moreover. Modeling of Behavior in Groups faced with a certain number of limitations. at least to a certain routes to the same destination [AbdLatiff and Cavazza 2000]. Musse et al 1998. More 2001] has proper path planning in this kind of simulations. a stochastic. For instance. Each level has its own complexity Non-Player Characters (NPCs) are the autonomous characters that and emergent phenomena. This will lead to further autonomous actions in the would counterpart to action in virtual world. 1994] particle systems [Bouvier et al. The Relating with animation in VE. the behavior may be referred to as interpretation process is important for this view in behavioral a sequence of motions. Farenc et al 2000. 2000]. Agents may be guided by external process (users interact addition to this. in this on-going only the best solution found is relevant and the agents are not featured as such in the simulation. 1997] do not involve a we have to assume that there are some certain regularities (e. it is difficult to include dynamics [Helbing et.g. On the contrary. Thompson and et al [Bouvier et al. Although Bouvier emergency evacuation conditions [Still. 1997). In this to make sure that the objects will move together and that objects case. Dijkstra's and The least behavior from one interest point (IP) to another IP and collision effort algorithm) to find the shortest path to destination. The movement is based on guided crowd follow stochastic laws. such as the maximum dispersion problem. Multiple agents are used only to concurrently search Most of the solutions to crowd movement will cause agents to the same goal or destination and at the final stage competing each move to another place whilst staying close to each other and other to find one best solution. The last capability relates “loose” some of its elements. voxel spaces [Zhang and Wyvill. Helbing [Helbing1992] describes crowds into detection with obstacles is included in separate module for each three formulations: i. Algorithms that simply co-ordinate agents around a group leader [Brock et al. All other multi-agent search such avoiding collisions. multiple agents are used for distributed problem solving: will not collide with each other.2. 1995] and simulations of physical aspects of crowd in simulating human crowd movement. An path planning that enable co-ordinate agents to follow different autonomous agent determines its own actions.

Procedure [4] Figure 1. cc ).e. Even though.e. Procedure [3] an= max_dist(a0. For instance. cc ). have sharp corners. shows the path taken by three actors that calculate their own path using the normal A* algorithm. the best element (an element with the lowest cost) from OPEN is picked out. agent_A has the maximum distance to agent_B and agent_C. cn=max_dist(b0 .e. Then. which is termed collective behavior. it is put Procedure [3] gives the best result for the maximum dispersion in any unvisited neighbors into the OPEN set. and evaluated at its neighbors. max_dist(ac . The dispersion method for coordination must be no collision and We introduce directive method as a technique to convert action to no deadlock. In early automatically avoid obstacles.e. The collective behavior is “following” i. Leaders and followers must coordinate among respects. There are moving from the left middle room to the right room with a few obstacles for them to avoid on the way. As we know that the techniques will lead to paths that them. cc). This enhancement is applied in the co-ordination of path planning for multiple agents or the movement of a crowd. cc )). This includes the manipulation of its heuristic function. i. Abd Latiff and Cavazza (2000) have come out with SNA* algorithm to incorporate application-related knowledge or Figure 2. an= max_dist(a0. agent_A can have the maximum motion animation. and will maximum dispersion behavior in crowd simulation. b0 ) whereas agent_C Most of the improvements in the A* algorithm principally involve takes the right of its leader. calculating the path for a group of with agent_C at the same time. Agent_A will take the goal. Three leader agents with two followers each application-dependent data into path planning. bn= b0. For this purpose four different actors originating from the same place towards the same procedures have been set up as given below and the result destination results in all actors following the same path. there is a set of nodes called OPEN bn= max(max_dist(bc . The path planning provides There are some complexities in identifying the procedure for the shortest path between source and destination. In this is the sum of the current cost of walking from the start to that procedure agent_B will always take the shortest distance and can node and the heuristic estimate of the cost from that node to the be assumed as a group leader. Both classical A* and SNA* algorithm path planning technique were used to control the animation. Procedure [1] an=max_dist(ac. h (n) as well as the computation time of f (n). left alternative path. bc ). The cost of a node behavior for three agents. bc ). The result is a list of direction number to 280 . b0 ). distance to agent_B but this is not assured with agent_C. but a node from FOCAL list will be used instead. bn= b0. bc ). cn=max_dist(an . ac ) max_dist(cc . The best or several selected nodes in FOCAL are Figure 3: Total dispersion using behavior in procedure [3] induced with the application-dependent knowledge or collective behavior. In the research a secondary heuristic is employed to incorporate the behavior of multi-agent. The enhancement of A* can be done by including application related knowledge in the selection of f (n). i. i. bc ). Each time through the main cn= max(max_dist(cc . max_dist(bc . Procedure [2] an=max_dist(ac. Three agents follow one after another using normal A* an= max(max_dist(ac . bn=max_dist(ac . Basically in A* algorithm. Bandi and Cavazza [1999] have shown how to integrate semantic information in to the A*ε path planning using a secondary heuristic. The agents are rushing to find an alternative path to save them self or to vacant the building. For the secondary heuristic. leading one after another. they could be experiment crowd simulation was limited to three leader agents extremely expensive if we have large crowds those techniques and four different procedures. bc ). ac ). Collective behavior is an action generated from path planning algorithm. Each leader has two follower agents may result a model that similar to ‘real life’ crowd in some as seen in Figure 2. its heuristic evaluation function. bn=max_dist(ac . cc )). cn=max_dist(b0 . loop. If 5 System Algorithm and Its Initial Results. Figure 1 produced from it are analyzed. it is quite complicated to make agent_B to have the maximum distance Using traditional algorithms. It is shown in Figure 3. cc ). bc ). This is impractical at the time of emergency. and another set called CLOSED. the expanded node is no longer the best node in the OPEN list. cn=max_dist(bn .

Interaction with Groups of Autonomous 5 South east ( 0. S. The setLinearVelocity( ) function is HELBING. A Computer-model for This paper has discussed the importance of multi-agent the Evacuation of Large Building Population. International Conference on Multi-Agent Systems (ICMAS-96). COHEN. Table 1: The relation between rotation and velocity as well as MUSSE. Springer- Verlag. Artificial Animal for Computer Animation: Biomechanic..0 .e. Eurographics Workshop on For every loop/frame displayed Virtual Environments and Scientific Visualization ’96. Crowd Dynamics. N. S. 1996. Co-ordination will TU. 2000. Nature. M.0 . HELBING.5 ) π x 3/4 Francisco. FL. BANDI.5 .J. B. 2001 References WATT. and WATT. and VICSEK. Hungary. L. Multiagent Real-Time A* with Planning for Multi-Agent Co-ordination. Artificial Fishes: Physics. based on the A* algorithm. a new paradigm of into the actual move orientation in a 2D planar environment: simulation.S. 1997. Y. generate the new frame. 0. virtual environments has been introduced.5 . 36-1 to 36-20. D. The Locomotion. San 7 North east ( 0. Fire Safety Journal. Natural Structures. M.5 . pp. D. 449-460. D. AUNE.J. M.5 ) π x 1/3 Characters.. Warwick University..0 . E.0 . This solution is a ULICNY.5 ) π x -3/4 and Simulation. 0. MUSSE. and D. EPFL. C. Another look up table has been developed to Handbook of Algorithms and Theory of Computation. G. FARKAS. Stuttgart when the agent starts to walk.0 . BOUVIER. 2002. M. KALLMANN. Perception. P. 1997.. Advanced Animation and Rendering Techniques. 18. 2000 Simulating used to set the velocity at that particular time. 1992. 1995. but the concentration has been on the co-ordination of 24(2): 131-148.. 2000. Recent Developments in Motion Planning.5 .. PhD Thesis. CAPIN.0 . and NAJMAN. agents to move together as a group or crowd. D. University of procedure for co-ordinating path planning for multiple agents in Toronto... end Applied Artificial Intelligence.0 ) π x 1/2 → Game Media Group (formerly: Miller Freeman Game Group). Locomotion. FARENC.0 . H. Nice. University of Geneva. isolated agents. Integrating World Semantics into 409-416. Behavioral Simulation in Voxel Salford. GUILLOTEAU.. K. 1997. S. pp. Vol. Proceedings of the IEEE Conference on Robotic and Automation.). The new transformation occurs only 93-98. 0. Proc. Path Planning Heuristics for Virtual Agents.5 ) π ↑ Proceedings of the Eurographics Workshop on Computer Animation 1 North west ( -0. Crowd simulation for interactive generic approach to include semantic information in multiple virtual environments and VRtraining systems. Part II. -0. 1996. A. THALMANN. D. 0. and TERZOPOULOS. direction number Crowd Modelling in Collaborative Virtual Environments.0 . Japan. and THALMANN. 2000.. 139-167. newRotation = setAngleOfRotation(direction_no).represent two orientations i. Space. 407:487-490. pp.. newRotation). T. Human Crowd Modeling with Various Levels of Behavior Control. 1998. M. Siggraph 94.. Gifu. direction_no++. 0.E.R. Real-Time Search for Autonomous Agents and Multi- translate the direction number to velocity vector for the new Agents Systems. September. H.. 81-103. 2000. pp.. MUSSE. the rotation for the whole body of the agent towards the direction KORF. R... Models for Pedestrian Behavior. THOMPSON. 1994. ABD LATIFF. translation. A Paradigm for end Controlling Virtual Humans in Urban Environment Simulations. 0. 2000 Conference. M. look up the direction/velocity conversion table (Table 1) and ISHIDA.. In Proceedings of VA'99. 1998.0 . ACM Press. January.W. Eurographics agent movement. Proceedings of the VSMM Selection: Introducing Competition in Cooperative Search. PhD. 1998. 1999. Taiwan Direction Rotation value MUSSE. Thesis. interaction. Boca Raton. Atallah synchronize the facing and the movement direction of the (Ed. Perception and Behavior.. Pp.. -0. pp..3—13 4 South ( 0. 2000. ZHANG. 2000. & CERANOWICZ.. 104-110.. 0. 1.0 .. This procedure is TU. 94-107. Artificial Intelligence Search Algorithm.... D. 0..W. T. E. 43-50. D. INFORMATIK/ 6 Conclusion INFORMATIQUE. the new translation and a new BOUVIER. D. D 1992. and CAVAZZA. Computer Animation'97. MUSSE. Sonderforschungsbereich 230. This function will dynamical features of escape panic. and CAVAZZA. Proceeding of Game Developers Conference 2000.R. getNewTransformation(newTranslation. BROCK. and THALMANN. 163-170.5 ) π x -1/3 International Conference on Computational Science (3).. CRC Press. B. 8 Stop ( 0.. Behavior. -0.0 ) π x -1/2 ← OVERMARS.0 . 0. 0. A. “Crowd Simulation in Begin Immersive Space Management”. (1992). 2000. pp. Workshop on Animation and Simulation. end-if O. The animation loop continues for every 20 milliseconds to Principles. BABSKI. and THALMANN.5 .R. 1998. if artificial actor starts to walk Springer-Verlag. derived from traditional path planning techniques developed for New York. 0. S. Lausanne. In CRC of movement.L. CMP 6 East ( 0. California. ACM VRST /98.. newTranslation = setLinearVelocity(direction_no). R. 0. 1996. ACM Press. A Model of Human Crowd Velocity value number in ° Behavior: Group Inter-Relationship and Collision Detection Analysis. SCHWEISS. M. Strategies. 0. pp. Proc.. result in the generation of alternative paths if such paths exist.5 ) 0 ↓ REYNOLDS. I. Autonomous Agents and Multi-Agent Systems. E.. 0 North ( 0. X. MONTANA. Budapest. X. and Models in Architecture and Nature. From Individual Human Agents to Crowds. M. and KITAMURA.Z. France. Proc. Coordination and Control of Multiple Autonomous Vehicles. THALMANN.0 .. 3 South west ( -0. The procedure below is used to map the list of directions simulation to airbag deployment: particle systems. 2 West ( -0. 0.. and WYVILL. PhD Thesis. BOULIC.R. S. T. Synchronous Path YOKOO.. Journal of Electronic Imaging 6(1).5 . MARCHANT. pp. P.A. From crowd rotation. 0. M. synthetic actor.0 ) 0 ↓ STILL.. No1. KALLMANN. C. UK. S. 1996. R. E. 281 . E. The setAngleOfRotation( ) function consequently sets 1.