Multi-Agent Based Crowd Evacuation Simulation

external-link

Jan 2026

Finished

Multi-agent crowd evacuation simulation built on Mesa (Python agent-based modeling framework). Defines 3 agent types with distinct behaviors: polite (yield, crowd-sensitive), aggressive (push, low deadlock sensitivity), and slow (reduced speed, high density sensitivity). The environment uses a discrete grid (OrthogonalMooreGrid) with 6 scenarios: OPEN, MALL, CORRIDOR, SEATS (theater seats), SNAKE (winding path), and RANDOM. Agents use configurable pathfinding (Manhattan, BFS, A*) to navigate toward exits. Detailed metrics are collected: evacuation rate, macro/micro speed, local density, deadlock factor — both per agent type and globally. Massive batch experiments (1000 runs per config, 16 parallel processes) analyze 7 dimensions: agent density, aggressive impact, slow agent impact, pathfinding algorithms, exit preference, number of exits, and exit width. Includes interactive Jupyter widget visualization and a LaTeX paper.

Technologies
ai

AI

jupyter

Jupyter

latex

LaTeX

matplot

Matplot

numpy

NumPy

pandas

Pandas

plotly

Plotly

python

Python

https://raw.githubusercontent.com/MiquelGomezCorral/SMA-MultiAgent-Based-Crowd-Simulation/main/readme-images/agent_shape_color_169.png
https://raw.githubusercontent.com/MiquelGomezCorral/SMA-MultiAgent-Based-Crowd-Simulation/main/readme-images/deadlock_169.png
https://raw.githubusercontent.com/MiquelGomezCorral/SMA-MultiAgent-Based-Crowd-Simulation/main/readme-images/graph_ui_169.png
https://raw.githubusercontent.com/MiquelGomezCorral/SMA-MultiAgent-Based-Crowd-Simulation/main/readme-images/heatmap_random_169.png
https://raw.githubusercontent.com/MiquelGomezCorral/SMA-MultiAgent-Based-Crowd-Simulation/main/readme-images/heatmap_seats_169.png
https://raw.githubusercontent.com/MiquelGomezCorral/SMA-MultiAgent-Based-Crowd-Simulation/main/readme-images/scenario_corridor_169.png
https://raw.githubusercontent.com/MiquelGomezCorral/SMA-MultiAgent-Based-Crowd-Simulation/main/readme-images/scenario_mall_169.png
https://raw.githubusercontent.com/MiquelGomezCorral/SMA-MultiAgent-Based-Crowd-Simulation/main/readme-images/scenario_open_169.png
https://raw.githubusercontent.com/MiquelGomezCorral/SMA-MultiAgent-Based-Crowd-Simulation/main/readme-images/scenario_random_169.png
https://raw.githubusercontent.com/MiquelGomezCorral/SMA-MultiAgent-Based-Crowd-Simulation/main/readme-images/scenario_seats_169.png
https://raw.githubusercontent.com/MiquelGomezCorral/SMA-MultiAgent-Based-Crowd-Simulation/main/readme-images/scenario_snake_169.png
https://raw.githubusercontent.com/MiquelGomezCorral/SMA-MultiAgent-Based-Crowd-Simulation/main/readme-images/screenshoot_simulation_169.png
https://raw.githubusercontent.com/MiquelGomezCorral/SMA-MultiAgent-Based-Crowd-Simulation/main/readme-images/thumbnail_169.webp
https://raw.githubusercontent.com/MiquelGomezCorral/SMA-MultiAgent-Based-Crowd-Simulation/main/readme-images/agent_shape_color_169.png
https://raw.githubusercontent.com/MiquelGomezCorral/SMA-MultiAgent-Based-Crowd-Simulation/main/readme-images/deadlock_169.png
https://raw.githubusercontent.com/MiquelGomezCorral/SMA-MultiAgent-Based-Crowd-Simulation/main/readme-images/graph_ui_169.png
https://raw.githubusercontent.com/MiquelGomezCorral/SMA-MultiAgent-Based-Crowd-Simulation/main/readme-images/heatmap_random_169.png
https://raw.githubusercontent.com/MiquelGomezCorral/SMA-MultiAgent-Based-Crowd-Simulation/main/readme-images/heatmap_seats_169.png
https://raw.githubusercontent.com/MiquelGomezCorral/SMA-MultiAgent-Based-Crowd-Simulation/main/readme-images/scenario_corridor_169.png
https://raw.githubusercontent.com/MiquelGomezCorral/SMA-MultiAgent-Based-Crowd-Simulation/main/readme-images/scenario_mall_169.png
https://raw.githubusercontent.com/MiquelGomezCorral/SMA-MultiAgent-Based-Crowd-Simulation/main/readme-images/scenario_open_169.png
https://raw.githubusercontent.com/MiquelGomezCorral/SMA-MultiAgent-Based-Crowd-Simulation/main/readme-images/scenario_random_169.png
https://raw.githubusercontent.com/MiquelGomezCorral/SMA-MultiAgent-Based-Crowd-Simulation/main/readme-images/scenario_seats_169.png
https://raw.githubusercontent.com/MiquelGomezCorral/SMA-MultiAgent-Based-Crowd-Simulation/main/readme-images/scenario_snake_169.png
https://raw.githubusercontent.com/MiquelGomezCorral/SMA-MultiAgent-Based-Crowd-Simulation/main/readme-images/screenshoot_simulation_169.png
https://raw.githubusercontent.com/MiquelGomezCorral/SMA-MultiAgent-Based-Crowd-Simulation/main/readme-images/thumbnail_169.webp
https://raw.githubusercontent.com/MiquelGomezCorral/SMA-MultiAgent-Based-Crowd-Simulation/main/readme-images/agent_shape_color_169.png
https://raw.githubusercontent.com/MiquelGomezCorral/SMA-MultiAgent-Based-Crowd-Simulation/main/readme-images/deadlock_169.png
https://raw.githubusercontent.com/MiquelGomezCorral/SMA-MultiAgent-Based-Crowd-Simulation/main/readme-images/graph_ui_169.png
https://raw.githubusercontent.com/MiquelGomezCorral/SMA-MultiAgent-Based-Crowd-Simulation/main/readme-images/heatmap_random_169.png
https://raw.githubusercontent.com/MiquelGomezCorral/SMA-MultiAgent-Based-Crowd-Simulation/main/readme-images/heatmap_seats_169.png
https://raw.githubusercontent.com/MiquelGomezCorral/SMA-MultiAgent-Based-Crowd-Simulation/main/readme-images/scenario_corridor_169.png
https://raw.githubusercontent.com/MiquelGomezCorral/SMA-MultiAgent-Based-Crowd-Simulation/main/readme-images/scenario_mall_169.png
https://raw.githubusercontent.com/MiquelGomezCorral/SMA-MultiAgent-Based-Crowd-Simulation/main/readme-images/scenario_open_169.png
https://raw.githubusercontent.com/MiquelGomezCorral/SMA-MultiAgent-Based-Crowd-Simulation/main/readme-images/scenario_random_169.png
https://raw.githubusercontent.com/MiquelGomezCorral/SMA-MultiAgent-Based-Crowd-Simulation/main/readme-images/scenario_seats_169.png
https://raw.githubusercontent.com/MiquelGomezCorral/SMA-MultiAgent-Based-Crowd-Simulation/main/readme-images/scenario_snake_169.png
https://raw.githubusercontent.com/MiquelGomezCorral/SMA-MultiAgent-Based-Crowd-Simulation/main/readme-images/screenshoot_simulation_169.png
https://raw.githubusercontent.com/MiquelGomezCorral/SMA-MultiAgent-Based-Crowd-Simulation/main/readme-images/thumbnail_169.webp
https://raw.githubusercontent.com/MiquelGomezCorral/SMA-MultiAgent-Based-Crowd-Simulation/main/readme-images/agent_shape_color_169.png
https://raw.githubusercontent.com/MiquelGomezCorral/SMA-MultiAgent-Based-Crowd-Simulation/main/readme-images/deadlock_169.png
https://raw.githubusercontent.com/MiquelGomezCorral/SMA-MultiAgent-Based-Crowd-Simulation/main/readme-images/graph_ui_169.png
https://raw.githubusercontent.com/MiquelGomezCorral/SMA-MultiAgent-Based-Crowd-Simulation/main/readme-images/heatmap_random_169.png
https://raw.githubusercontent.com/MiquelGomezCorral/SMA-MultiAgent-Based-Crowd-Simulation/main/readme-images/heatmap_seats_169.png
https://raw.githubusercontent.com/MiquelGomezCorral/SMA-MultiAgent-Based-Crowd-Simulation/main/readme-images/scenario_corridor_169.png
https://raw.githubusercontent.com/MiquelGomezCorral/SMA-MultiAgent-Based-Crowd-Simulation/main/readme-images/scenario_mall_169.png
https://raw.githubusercontent.com/MiquelGomezCorral/SMA-MultiAgent-Based-Crowd-Simulation/main/readme-images/scenario_open_169.png
https://raw.githubusercontent.com/MiquelGomezCorral/SMA-MultiAgent-Based-Crowd-Simulation/main/readme-images/scenario_random_169.png
https://raw.githubusercontent.com/MiquelGomezCorral/SMA-MultiAgent-Based-Crowd-Simulation/main/readme-images/scenario_seats_169.png
https://raw.githubusercontent.com/MiquelGomezCorral/SMA-MultiAgent-Based-Crowd-Simulation/main/readme-images/scenario_snake_169.png
https://raw.githubusercontent.com/MiquelGomezCorral/SMA-MultiAgent-Based-Crowd-Simulation/main/readme-images/screenshoot_simulation_169.png
https://raw.githubusercontent.com/MiquelGomezCorral/SMA-MultiAgent-Based-Crowd-Simulation/main/readme-images/thumbnail_169.webp