{'fraction_non_alphanumeric': 0.02577319587628866, 'fraction_numerical': 0.001718213058419244, 'mean_word_length': 4.892712550607287, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Metaheuristics Using Agent-Based Models for Swarms and Contagion

Many animals, including humans, congregate in large numbers. These swarms move in complex fashions and seem to behave as a cohesive unit controlled by a single brain, despite being made up of separate individuals. Given the large number of animals in some cases (starlings form flocks of up to 10 million birds), modeling these swarms poses a challenge. Previous researchers have extensively studied swarming behavior but relatively few included emotion in their models. In addition to looking at how swarms move, we seek to understand how information or emotion spreads among the individuals. The spread of information or emotion in turn may account for the movement patterns found in nature. In this paper, we examine the effects of fear on crowd movement. We used agent-based models to study swarms. An agent-based model sets up a large system of agents which follow certain rules individually. In our case, we have a system of ordinary differential equations where each differential equation describes an agent’s behavior. Using agent-based models is a well-established way to study swarming behavior. The models we used are the three-zone model and the particle swarm optimization (PSO). We derived our three-zone model based on previous work by Chuang et al. [3] and Cucker and Smale [4]. Then we implemented the three zone model in C++ using a linked-cell algorithm to increase efficiency. Normally, computing all the pair-wise interactions would take O(n) operations. The linked-cell method cuts down the number of comparisons needed by assuming that the effect of interactions are negligible outside of a certain distance. The linked-cell method partitions the space into cells whose width is determined by the cut-off distance, and only compare each particle to the particles in neighboring cells. Our experiments showed that the computational efficiency is better than O(log n) with the linked algorithm. Then we applied these models to two real-life problems, one biological and one social. Previous research by Olson et al. [7] used a genetic algorithm to show how flocking behavior could be naturally selected for. We modified the genetic algorithm and studied how swarming behavior and emotional contagion respond under the pressure of predator. Our results suggest that emotional contagion could evolve in gregarious animals. We also applied Particle Swarm Optimization (PSO) to model emergency evacuation of an airplane, inspired by the recent Asian plane crash. In the PSO algorithm, each particle’s position is compared to some fitness function. Each particle moves according to its knowledge of its own previous best position and the group’s current best position. We hope that this will lead to increased understanding of how panicked crowds behave in evacuation situations and that this will lead to better, safer designs.