Simulation model of pedestrian flow based on multi-agent system and Bayesian Nash equilibrium

Computer-based simulation is a means of exploring complex systems and has become the mainstream method of pedestrian research. In this research, a multi-agent simulation model of pedestrian flow will be established using a multi-agent system (MAS) and Bayesian Nash equilibrium. MAS is used to simulate the crowd movement and the interaction between pedestrians, and Bayesian Nash equilibrium is adopted to analyze the decision-making process of pedestrians. In contrast to previous pedestrian flow simulation modeling methods, this study adopts multiagent modeling to realize the complete heterogeneity of pedestrians, so as to achieve more accurate simulation and make the research conclusions closer to reality. To be specific, we attempt to determine the cell side length and simulation time step of an initial model parameterized using a dataset of actual pedestrian movements. It allows more than one pedestrian to be in the same cell and stipulates that the utility of pedestrians decreases with the growing number of pedestrians in the cell. The Bayesian Nash equilibrium is applied to analyze the decision-making process of pedestrians and collision avoidance rules and interaction rules of agents are also formulated. A number of areas of further research are discussed.


Introduction
In recent years, how to manage crowded pedestrians scientifically and effectively has attracted extensive attention from emergency management departments and researchers. Due to the differences in the characteristics of different pedestrian related disasters (for example, in response times), it is difficult to obtain comprehensive data for comprehensive, in-depth pedestrian analysis and research. Additionally, the behavior of pedestrians is complex and nonlinear, and the factors affecting pedestrian flow are dynamic and changeable. On this basis, a large number of field observations and theoretical analysis have been carried out in recent years, trying to analyze and determine rules of pedestrian flow states.
Research on pedestrian flow with the individual behavior as the object has attracted much attention from scholars. However, there are few systematic studies that focus on the behavioral characteristics of pedestrians (Vermuyten et al., 2016). In addition, because of the irreproducibility and difficulty in observation of individual pedestrian behavior, there is a shortage of experimental and investigation data. The result is a lack of effective guidance for emergency management and disaster emergency evacuation planning (Kok et al., 2016). Therefore, establishing an effective simulation model for pedestrian flow can inform large-scale emergency evacuation simulation and planning.
Current simulation studies on pedestrian flow mainly concentrate on the optimization of evacuation process after disasters. Few studies pay attention to the effective pedestrian flow control measures to avoid the occurrence of dangers in advance of incidents related to overcrowding, stampedes, etc. (Wolshon and McArdle, 2009;Muaafa et al., 2014). For example, most current research takes evacuation time or path as the optimization goal, but ignores the capacity changes of the road network in different periods and regions. That is, few papers take into account the real-time impacts of emergency on evacuation. The impacts of disaster chains or secondary disasters on evacuation are also generally ignored. Thus, in models optimizing evacuation path, it is necessary to evaluate the disaster itself and the impact range of secondary disasters, and then take the robustness of the scheme as a constraint condition to modify when seeking the optimal scheme (Chen et al., 2012;Gai et al., 2018). Furthermore, owing to environmental differences, the characteristics of pedestrian behavior in different areas are totally different and require separate study. This indicates the need to analyze the characteristics of pedestrian movement under different scenes/emergencies. Therefore, this study attempts to establish a simulation model for pedestrian flow based on multiagent simulation (MAS) and Bayesian Nash equilibrium. Specifically, MAS is used to simulate the movements and interactions of pedestrians, and Bayesian Nash equilibrium is used to analyze the decision-making process of pedestrians.

Software and Data Availability
The model was developed using Netlogo and takes the Evacuation Decision-Making Crowd Model (Van der Wal et al., 2017) as a reference to observe and simulate the pedestrian behaviors under emergency. The Evacuation Videos Database 1 (Van der Wal et al., 2020) has been used to observe the behaviors of crowd evacuation more accurately. As this study is still at an initial stage with the model at a development stage requiring more pedestrian data (such as data for underground stations/tunnels) for verification. Later, larger scale of pedestrian data will be used to analyze the effects of pedestrian behaviors on emergency evacuation.

Basic movement rules
According to previous studies and pedestrian movement data in real scenes, the average step length of pedestrians is about 0.7m and their speed is about 1.4m/s (Chang et al., 2021). On this basis, the pedestrian evacuation space was divided into a square cell with a side length of 0.7m, and the simulation time step was set to 0.5s, with pedestrians moving at most one cell per time step. The pedestrians in this model were also considered to walk in only one direction and have a certain probability of moving to adjacent cells within a time step. In reality, the probability of pedestrians to move back (i.e. selecting the cell in the opposite direction of movement) is extremely low. Consequently, the agents in this model were able to change their walking direction but only to certain cells, relative to the movement direction: to one of 6 candidate cells, in place, left, left front, front, right front and right.
Generally, pedestrians are more likely to stop in a crowded scene and more likely to move in relatively loose crowds. The agents in this model were able to choose between the probability of walking or stopping, to adjust their walking speed in different scenes in order to adapt to the environment. A number of selfprocessing rules for micro-pedestrians in different environment were defined in advance to support observation and analysis of the macro-phenomenon of pedestrian flow in different scenes, and to allow the movement rules of pedestrian flow to be summarized and further investigated.

Collision avoidance rules
In some previous related micro model, since each cell can only contain one pedestrian at most, conflict will occur when two or more agents take the same cell as the target cell (Chen et al., 2018;Tian et al., 2018). The above problem can be solved in this research because each cell in this model can accommodate several agents. However, on this basis, it is difficult to avoid the collision problem caused by the intersection of routes. Considering that in practice, pedestrians can quickly adjust the target cell to the adjacent cell before the collision occurs, collisions rarely occur even in a crowded scene. Therefore, the collision processing rule in this model is, when the agent predicts the possibility of collision, it moves to the candidate cell adjacent to the target cell with a certain probability "#$%& .
Since the collision only occurs between pedestrians in opposite directions, taking the pedestrian walking to the right in cell (r, c) as an example, the collision can only occur when the agent chooses cell (r-1, c+1) or cell (r+1, c+1) and there is a pedestrian in the opposite direction in cell (r, c+1). Among them, the probability of a pedestrian staying in place is ' , and the probabilities of the pedestrian choosing other candidate cells (starting from the cell to the left of the pedestrian) in a clockwise direction is as follows: ( , ) , * , + , , . Besides, the probability of pedestrian changing target cell is similar to the probability of pedestrian collision, so "#$%& in the model is defined as Eq. (1):

Pedestrian speed-density relation
Crowd density refers to the number of people distributed on a unit area and reflects the density of people in a space, such as people per square meter or per capita occupied area. And pedestrian speed-density relation is considered as the foundation of pedestrian evacuation simulation research. According to relevant studies (Mesmer and Bloebaum, 2016;Kaji and Inohara, 2017;Luo et al., 2018;Zhou et al., 2019), several pedestrian speed-crowd density models have been proposed and widely utilized in real world. Among them, the Spatial-Grid Evacuation Model (SGEM) established by Wuhan University and City University of Hong Kong takes the pedestrian area as the core and considers the effects of contacts and interactions between other pedestrians within a certain range on the evacuation speed of the pedestrian, which is regarded as the most suitable model for this paper.
According to relevant research, it can be illustrated that although the speed-density models are different, the overall law of the relationship between pedestrian speed and crowd density is consistent. To be specific, when the crowd density is lower than 4 person/m 2 , the migration of pedestrians presents a free-moving status and the corresponding velocity is about 1.4m/s; When the density is over 8 person/m 2 , the pedestrian movement is almost at a standstill; When the density is between 4 and 8 person/m 2 , the movement of pedestrians is restricted and starts coming to a standstill, and the pedestrian speed is between 0.3m/s and 1.4m/s.

Bayesian Nash Equilibrium
Bayesian Nash equilibrium is an extension of Nash equilibrium in static games with incomplete information. To be specific, each player chooses the strategy combination that can maximize the expected utility in order to achieve an equilibrium. And under this equilibrium, no one is willing to choose other strategies (Ui, 2016).
This research is based on non-cooperative game theory. And in its simulation model, pedestrians select target cells before each movement. In the decisionmaking process, pedestrians cannot know the choices of the surrounding pedestrians in advance, but only the probability that they choose each cell, and the choices of the surrounding pedestrians will have an impact on the utility of the row. In addition, all pedestrians in the model make decisions almost at the same time, that is to say, there is no sequence of decisions that pedestrians make every time they play the game with other participants, and they cannot make decisions after observing the actions of other pedestrians. Therefore, the game of all pedestrians in the model is a static game with incomplete information, and the equilibrium reached is Bayesian Nash equilibrium.

Definition of utility function
According to related studies, the total utility function of pedestrians during walking can be divided into two parts: move utility Q and comfort utility R . The total utility function means as Eq. (3): Specifically, Q represents the utility obtained by the pedestrian during walking. The closer the pedestrian's next target cell is to the exit, the greater the move utility it obtains. In this paper, this utility is defined as a function of the pedestrian moving distance and direction .

Q , = × cos
Where, refers to the distance of the pedestrian moving towards the exit direction, and represents the angle between the moving and exit direction.
The comfort utility R in this model is defined as a function of the number of pedestrians in the cell. As mentioned above, pedestrian speed is related to the density of the crowd around. Thus, considering the walking habits of pedestrians, the comfort utility of free-moving pedestrians is defined as 1, and when pedestrian movement comes to a standstill, this utility is defined as the ratio of restricted speed to free-moving speed, which shown as Eq. (5). R = 1.00, ≤ 2 0.51, = 3 0.07, ≥ 4 (5)

Pedestrian decision-making process
In this paper, Agent Based Modeling and Simulation (ABMS) is used to study the pedestrian flow. To be specific, before the simulation experiment, the length and width of the evacuation space and the pedestrian flow rate are used to define the simulation environment. During the operation process, according to the decisionmaking process, the agents can collect environment information before each decision, and then select the target cell to move in after considering their own attributes, current positions and walking directions; After the simulation, the real-time position and speed of pedestrians in the model can be further studied by analyzing the experimental data. (See Fig. 1).

Figure 1: The simulation framework of pedestrian flow in ABMS
The process of each pedestrian decision is in detail shown in Fig. 2. In each simulation time step, pedestrians firstly calculate the expected utility of all candidate cells according to their own positions and the distribution of pedestrians in the surrounding cells, and then find the cell with the largest expected utility as the target cell. Next, when the pedestrian predicts the possibility of collision, it moves in the candidate cell adjacent to the target cell with a certain probability. Pedestrians enter the new cell and then make the next decision until they leave the evacuation space.

Expected Outcomes and Discussion
This research attempts to establish a simulation model of pedestrian flow based on multi-agent system and Bayesian Nash equilibrium. At present, this model is still at the primary stage and further work is required. For the model validation, we attempt to consider some self-organization phenomena such as the segregation of the crowd into lanes of pedestrians moving towards opposite direction (Goldsztein, 2017), and then set a corridor (like 100m long and 10m wide) in the model to simulate the self-organization of pedestrians. The model allows multiple agents in the same cell, and the robustness and sensitivity of the model can be analyzed using the amount of agent in each cell. In future research, the effects of information spreading on the behaviors of crowd evacuation will be considered to enhance the initial model.
This study still has some limitations, which are described in the following three subsections.

The credibility of the simulation model
From the perspective of the safety of the experimenter and the reproducibility of the experiment, it is not realistic to conduct the intensive pedestrian flow experiment or emergency evacuation experiment based on real people. Besides, the research on pedestrian flow is an interdisciplinary subject involving fluid mechanics, sociology, game theory, computer science, psychology and other fields. In addition, due to the incompleteness of relevant data of the pedestrian flow, it is difficult to verify the model in various dimensions which is adversely affected the persuasion of the model.

The characterization of pedestrian movement
There are 3 issues. Firstly, the model adopts Bayesian Nash equilibrium to analyze the process of pedestrians searching target cells. However, in real life, many pedestrians do not satisfy the premise of rational man hypothesis, and even make irrational decisions in very special scenarios. Secondly, pedestrian movement behavior has many characteristics such as autonomy and randomness. In other words, further studies need to be conducted in the pedestrian movement psychology, movement behaviors and environmental factors in order to improve the accuracy of the experimental results. Finally, pedestrians in this model always look for the cell with the largest expected utility, without considering the overall utility of pedestrians in continuous multi-steps. In other words, optimal path selection has been ignored.

The impact of emergencies on pedestrian decision-making
The dynamic change of evacuation environment, the degree of subjective psychological panic and the familiarity of the objective environment of the evacuee can significantly affect the individual decision-making of pedestrians. The evacuation in this scenario has its particularity in terms of the main body, purpose, principle and method of evacuation. Besides, compared with the rules of daily pedestrian flow, the rules under emergencies are different, and may even be completely opposite.
These issues can affect the accuracy of the simulation model, and will be explored in future research by introducing both subjective and objective factors into the model to improve its accuracy and efficiency.

Conclusion and Further Work
In much previous pedestrian flow models, the pedestrian movement space is divided into a square (or diamond or regular hexagon) with a side length of 0.4m according to the pedestrian projection area. In this situation, when the pedestrian moves one cell at a time, it is inconsistent with the actual step length of the pedestrian. As a result, when the agent moves more than 1 cell at a time, the complexity of decision-making can be increased.
This research establishes a simulation model of pedestrian flow based on multi-agents. Based on the step size of pedestrians in normal conditions, this model divided the active pedestrian area into a grid cells of 0.7m, and pedestrians move one cell per time step. The model allows multiple pedestrians to be in the same cell, thus the conflict problem caused by simultaneous decisions of pedestrians in previous models can be well solved. On this basis, the model firstly divides the utility obtained by pedestrians in the process of moving into move utility and comfort utility. Move utility is related to the distance that pedestrians travel towards the exit, while the comfort utility is related to the total number of pedestrians in the cell. In the simulation experiment, pedestrian agents can calculate the expected utility of each candidate cell according to Bayesian Nash equilibrium, and select the cell with the largest expected utility as the target cell. The collision problem of agents when moving at the same time is also considered in the model, and a collision avoidance strategy is formulated. In future research, the self-organization phenomena will be observed in the simulation experiment, the pedestrian velocity and pedestrian distribution will be analyzed, and the robustness and sensitivity of the model will be determined verify the effectiveness of the model for pedestrian flow simulation.
In the previous macroscopic pedestrian flow models, pedestrians are completely homogeneous, that is, different pedestrians make exactly the same decision in the same scene. In the micro pedestrian flow models based on cellular automata, lattice gas and social force theories, pedestrians are partially heterogeneous, that is, different pedestrians in the same scene make different decisions according to the actual situation, but these decisions obey a certain probability distribution on the macro level. The agent-based simulation model in this research realizes the heterogeneity of pedestrians: they can independently interact with the surrounding environment, with other pedestrians according to their different attributes and certain rules and they can make decisions, with the result that the simulation model and its outputs are closer to reality. In future research, the model will be refined based on real, in-scene data. Multi-scene simulation will be undertaken to study and analyze the movement rules of pedestrian flows, to support decision making.
This model can be improved by adopting different types of data, related to pedestrian decision-making preferences and the impact of emergencies on this. Real, actual scenes such as pedestrian tunnel/subway station (small scale) can be used as the background to the study of pedestrian flow characteristics under emergencies, for example. Pedestrian behaviors can be refined, such as their following and conformity behaviors in emergency evacuations. This will support decision making around pedestrian flow management, and provide a theoretical basis for the further research.