History
There has always been a deep-seated interest in the understanding and gaining control of motional and behavior of crowds of people. Many major advancements have taken place since the beginnings of research within the realm of crowd simulation. Evidently many new findings are continually made and published following these which enhance the scalability, flexibility, applicability, and realism of simulations: In 1987, behavioral animation was introduced and developed by Craig Reynolds. He had simulated flocks of birds alongside schools of fish for the purpose of studying group intuition and movement. All agents within these simulations were given direct access to the respective positions and velocities of their surrounding agents. The theorization and study set forth by Reynolds was improved and built upon in 1994 by Xiaoyuan Tu, Demetri Terzopoulos and Radek Grzeszczuk. The realistic quality of simulation was engaged with as the individual agents were equipped with synthetic vision and a general view of the environment within which they resided, allowing for a perceptual awareness within their dynamic habitats. Initial research in the field of crowd simulation began in 1997 with Daniel Thalmann's supervision of Soraia Raupp Musse's PhD thesis. These two present a new model of crowd behavior in order to create a simulation of generic populations. Here a relation is drawn between the autonomous behavior of the individual within the crowd and the emergent behavior originating from this. In 1999, individualistic navigation began its course within the realm of crowd simulation via continued research of Craig Reynolds. Steering behaviors are proven to play a large role in the process of automating agents within a simulation. Reynolds states the processes of low-level locomotion to be dependent and reliant on mid-level steering behaviors and higher-level goal states and path finding strategies. Building off of the advanced work of Reynolds, Musse and Thalmann began to study the modeling of real time simulations of these crowds, and their applications to human behavior. The control of human crowds was designated as a hierarchical organization with levels of autonomy amongst agents. This marks the beginnings of modeling individual behavior in its most elementary form on humanoid agents or virtual humans. Coinciding with publications regarding human behavior models and simulations of group behaviors, Matt Anderson, Eric McDaniel, and Stephen Chenney's proposal of constraints on behavior gained popularity. The positioning of constraints on group animations was presented to be able to be done at any time within the simulation. This process of applying constraints to the behavioral model is undergone in a two-fold manner, by first determining the initial set of goal trajectories coinciding with the constraints, and then applying behavioral rules to these paths to select those which do not violate them. Correlating and building off of the findings proposed in his work with Musse, Thalmann, working alongside Bratislava Ulicny and Pablo de Heras Ciechomski, proposed a new model which allowed for interactive authoring of agents at the level of an individual, a group of agents and the entirety of a crowd. A brush metaphor is introduced to distribute, model and control crowd members in real-time with immediate feedback.Crowd dynamics
One of the major goals in crowd simulation is to steer crowds realistically and recreate human dynamic behaviors. There exists several overarching approaches to crowd simulation and AI, each one providing advantages and disadvantages based on crowd size and time scale. Time scale refers to how the objective of the simulation also affects the length of the simulation. For example, researching social questions such as how ideologies are spread amongst a population will result in a much longer running simulation since such an event can span up to months or years. Using those two characteristics, researchers have attempted to apply classifications to better evaluate and organize existing crowd simulators. ;Flow-based Approach: Flow based crowd simulations focus on the crowd as a whole rather than its components. As such individuals do not have any distinctive behaviors that occur due to input from their surroundings and behavioral factors are largely reduced. This model is mainly used to estimate the flow of movement of a large and dense crowd in a given environment. Best used in studying large crowd, short time objectives. ;Entity-based Approach: Models that implement a set of physical, predefined, and global laws meant to simulate social/psychological factors that occur in individuals that are a part of a crowd fall under this category. Entities in this case do not have the capacity to, in a sense, think for themselves. All movements are determined by the global laws being enforced on them. Simulations that use this model often do so to research crowd dynamics such as jamming and flocking. Small to medium-sized crowds with short term objectives fit this approach best. ;Agent-based Approach: Characterized by autonomous, interacting individuals. Each agent of a crowd in this approach, is given a degree of intelligence; they can react to each situation on their own based on a set of decision rules. Information used to decide on an action is obtained locally from the agent's' surroundings. Most often, this approach is used for simulating realistic crowd behavior as the researcher is given complete freedom to implement any behaviors.Particle systems
One way to simulate virtual crowds is to use a particle system. Particle systems were first introduced in computer graphics by W. T. Reeves in 1983. A particle system is a collection of a number of individual elements or ''particles''. Each particle is able to act autonomously and is assigned a set of physical attributes (such as color, size and velocity). A particle system is dynamic, in that the movements of the particles change over time. A particle system's movement is what makes it so desirable and easy to implement. Calculating the movements of these particles takes very little time. It simply involves physics: the sum of all the forces acting on a particle determines its motion. Forces such as gravity, friction and force from a collision, and social forces like the attractive force of a goal. Usually each particle has a velocity vector and aAlgorithm by Patil and Van Den Berg
This algorithm was designed for relatively simplistic crowds, where each agent in the crowd only desires to get to its own goal destination while also avoiding obstacles. This algorithm could be used for simulating a crowd in Times Square. Patils algorithm's most important and distinctive feature is that it utilizes the concept of ''navigation fields'' for directing agents. This is different from a guidance field; a guidance field is an area around the agent in which the agent is capable of "seeing"/detecting information. Guidance fields are typically used for avoiding obstacles, dynamic obstacles (obstacles that move) in particular. Every agent possesses its own guidance field. A navigation field, on the other hand, is a vector field which calculates the minimum cost path for every agent so that every agent arrives at its own goal position. The navigation field can only be used properly when a path exists from every free (non-obstacle) position in the environment to one of the goal positions. The navigation field is computed using coordinates of the static objects in the environment, goal positions for each agent, and the guidance field for each agent. In order to guarantee that every agent reaches its own goal the navigation field must be free of local minima, except for the presence of sinks at the specified goals. The running time of computing the navigation field is , where m × n is the grid dimension (similar toIndividual behavior modelling
One set of techniques for AI-based crowd simulation is to model crowd behavior by advanced simulation of individual agent motivations and decision-making. Generally, this means each agent is assigned some set of variables that measure various traits or statuses such as stress, personality, or different goals. This results in more realistic crowd behavior though may be more computationally intensive than simpler techniques.Personality-based models
One method of creating individualistic behavior for crowd agents is through the use of personality traits. Each agent may have certain aspects of their personality tuned based on a formula that associates aspects such as aggressiveness or impulsiveness with variables that govern the agents' behavior. One way this association can be found is through a subjective study in which agents are randomly assigned values for these variables and participants are asked to describe each agent in terms of these personality traits. A regression may then be done to determine a correlation between these traits and the agent variables. The personality traits can then be tuned and have an appropriate effect on agent behavior. The OCEAN personality model has been used to define a mapping between personality traits and crowd simulation parameters. Automating crowd parameter tuning with personality traits provides easy authoring of scenarios with heterogeneous crowds.Stress-based model
The behavior of crowds in high-stress situations can be modeled using General Adaptation Syndrome theory.l Agent behavior is affected by various stressors from their environment categorized into four prototypes: time pressure, area pressure, positional stressors, and interpersonal stressors, each with associated mathematical models. ''Time pressure'' refers to stressors related to a time limit in reaching a particular goal. An example would be a street crossing with a timed walk signal or boarding a train before the doors are closed. This prototype is modeled by the following formula: where is the intensity of the time pressure as a function of the estimated time to reach the goal and a time constraint . ''Area pressure'' refers to stressors as a result of an environmental condition. Examples would be noise or heat in an area. The intensity of this stressor is constant over a particular area and is modeled by the following formula: where is the intensity of the area pressure, is the position of the agent in an area , and is a constant. ''Positional stressors'' refer to stressors associated with a local source of stress. The intensity of this stressor increases as an agent approaches the source of the stress. An example would be a fire or a dynamic object such as an assailant. It can be modeled by the following formula: where is the intensity of the positional stressor, is the position of the agent and is the position of the stressor. Alternatively, stressors that generate high stress over a large area (such as a fire) can be modeled using a Gaussian distribution with standard deviation : ''Interpersonal stressors'' are stressors as a result of crowding by nearby agents. It can be modeled by the following formula: where is the intensity of the interpersonal stressor, is the current number of neighbors within a unit space and is the preferred number of neighbors within a unit space for that particular agent. The ''perceived stress'' follows Steven's Law and is modeled by the formula: where is the perceived stress for a stress level , is a scale factor, and is an exponent depending on the stressor type. An agent's ''stress response'' can be found with the following formula: where is the stress response capped at a maximum value of and is the maximum rate at which an agent's stress response can change. Examples of notable crowd AI simulation can be seen inSociology
''Crowd simulation'' can also refer to simulations based onModeling individual behaviors
Hacohen, Shoval and Shvalb formulated the drivers-pedestrians dynamics at congested conflict spots. In such scenarios, the drivers and/or pedestrians do not closely follow the traffic laws. The model is based on the ProbabilisticLeader behavior during evacuation simulations
As described earlier, the Helbing Model is used as the basics for crowd behavior. This same type of behavior model is used for evacuation simulations. In general, the first thing that has to be assumed is that not everyone has knowledge about the environment or where there are and aren't hazards. From this assumption we can create three types of agents. The first type is a trained leader, this agent knows about the environment and is able to spread knowledge to other agents so they know how to exit from an environment. The next type of agent is an untrained leader, this agent does not know about the environment, however, as the agent explores the environment and gets information from other types of leaders, the agent is able to spread the knowledge about the environment. The last type of agent is a follower, this type of agent can only take information from other leaders and not be able to share the information with other agents. The implementation of these types of agents is fairly straightforward. The leaders in the environment have a map of the environment saved as one of their attributes. An untrained leader and followers will start out with an empty map as their attribute. Untrained leaders and followers will start exploring an environment by themselves and create a map of walkable and unwalkable locations. Leaders and untrained leaders (once they have the knowledge), will share information with other agents depending on their proximity. They will share information about which points on the grid are blocked, the local sub-graphs and the dangers in the area. There were two types of searching algorithms tried out for this implementation. There was the random search and the depth first search. A random search is where each of the agents go in any direction through the environment and try to find a pathway out. The depth first search is where agents follow one path as far as it can go then return and try another path if the path they traversed does not contain an exit. If was found that depth first search gave a speed up of 15 times versus a random search.Scalable simulations
There are many different case situations that come into play in crowd simulations. Recently, crowd simulation has been essential for the many virtual environment applications such as education, training, and entertainment. Many situations are based on the environment of the simulation or the behavior of the group of local agents. In virtual reality applications, every agent interacts with many other agents in the environment, calling for complex real-time interactions. Agents must have continuous changes in the environment since agent behaviors allow complex interactions. Scalable architecture can manage large crowds through the behavior and interactive rates. These situations will indicate how the crowds will act in multiple complex scenarios while several different situations are being applied. A situation can be any circumstance that has typical local behaviors. We can categorize all situations into two different kinds. ''Spatial situation'' is a situation that has a region where the environment affects the local agents. For instance, a crowd waiting in line for a ticket booth would be displaying a spatial situation. Other examples may be a bus stop or an ATM where characters act upon their environment. Therefore, we would consider 'bus stop' as the situation if the behavior of the agents are to be getting on or off a bus. ''Non-Spatial situation'' has no region in the environment because this only involves the behavior of the crowd. The relationship of the local agents is an important factor to consider when determining behavior. An example would be a group of friends walking together. Typical behavior of characters that are friends would all move along with each other. This means that 'friendship' would be the situation among the typical behavior of walking together. The structure of any situation is built upon four components, Behavior functions, Sensors, States, and Event Rules. Behavior functions represent what the characters behaviors are specific to the situation. Sensors are the sensing capability for agents to see and respond to events. States are the different motions and state transitions used only for the local behaviors. Event rule is the way to connect different events to their specific behaviors. While a character is being put into a situation, these four components are considered at the same time. For spatial situations, the components are added when the individual initially enters the environment that influences the character. For non-spatial situations, the character is affected only once the user assigns the situation to the character. The four components are removed when the agent is taken away from its situations region or the situation itself is removed. The dynamic adding and removing of the situations lets us achieve scalable agents.Human-like behaviors and crowd AI
Rule-based AI
Learning AI
In learning AI, virtual characters behave in ways that have been tested to help them achieve their goals. Agents experiment with their environment or a sample environment which is similar to their real one. Agents perform a variety of actions and learn from their mistakes. Each agent alters its behavior in response to rewards and punishments it receives from the environment. Over time, each agent would develop behaviors that are consistently more likely to earn high rewards. If this approach is used, along with a large number of possible behaviors and a complex environment agents will act in a realistic and unpredictable fashion.Algorithms
There are a wide variety of machine learning algorithms that can be applied to crowd simulations. Q-Learning is an algorithm residing under machine learning's sub field known as reinforcement learning. A basic overview of the algorithm is that each action is assigned a Q value and each agent is given the directive to always perform the action with the highest Q value. In this case learning applies to the way in which Q values are assigned, which is entirely reward based. When an agent comes in contact with a state, s, and action, a, the algorithm then estimates the total reward value that an agent would receive for performing that state action pair. After calculating this data, it is then stored in the agent's knowledge and the agent proceeds to act from there. The agent will constantly alter its behavior depending on the best Q value available to it. And as it explores more and more of the environment, it will eventually learn the most optimal state action pairs to perform in almost every situation. The following function outlines the bulk of the algorithm: :''Q(s, a) ←− r + maxaQ(s', a')'' Given a state s and action a, r and s are the reward and state after performing (s,a), and a' is the range over all the actions.Crowd rendering and animation
Rendering and animating a large number of agents realistically, especially in real time, is challenging. To reduce the complexity of 3D rendering of large-scale crowds, techniques like culling (discarding unimportant objects), impostors (image-based rendering) and decreasing levels of detail have been used. Variations in appearance, body shape and size, accessories and behavior (social or cultural) exist in real crowds, and lack of variety affects the realism of visual simulations. Existing systems can create virtual crowds with varying texture, color, size, shape and animation.Real world applications
Virtual cinematography
Crowd simulations have been used widely across films as a cost-effective and realistic alternative from hiring actors and capturing shots that would otherwise be unrealistic. A significant example of its use lies inUrban planning
The development of crowd simulation software has become a modern and useful tool in designing urban environments. Whereas the traditional method of urban planning relies on maps and abstract sketches, a digital simulation is more capable of conveying both form and intent of design from architect to pedestrian. For example, street signs and traffic lights are localized visual cues that influence pedestrians to move and behave accordingly. Following this logic, a person is able to move from point A to point B in a way that is efficient and that a collective group of people can operate more effectively as a result. In a broader sense, bus systems and roadside restaurants serve a spatial purpose in their locations through an understanding of human movement patterns. TheEvacuation and riot handling
Simulated realistic crowds can be used in training for riots handling, architecture, safety science (evacuation planning).Military
Being that crowd simulations are so prevalent in use for public planning and general order with regards to chaotic situations, many applications can be drawn for governmental and military simulations. Crowd modeling is essential in police and military simulation in order to train officers and soldiers to deal with mass gatherings of people. Not only do offensive combatants prove to be difficult for these individuals to handle, but noncombatant crowds play significant roles in making these aggressive situations more out of control. Game technology is used in order to simulate these situations for soldiers and technicians to practice their skills.Sociology
The behavior of a modeled crowd plays a prominent role in analytical matters. These dynamics rely on the physical behaviors of individual agents within a crowd rather than the visual reality of the model itself. The social behaviors of people within these constructs have been of interest for many years, and the sociological concepts which underpin these interactions are constantly studied. The simulation of crowds in different situations allows for sociological study of real life gatherings in a variety of arrangements and locations. The variations in human behavior in situations varying in stress-levels allows for the further development and creation of crowd control strategies which can be more specifically applied to situations rather than generalized.See also
*Crowd simulation software
* STEPS by Mott MacDonald * Alice Software by the Moving Picture Company *References
External links