# Fast Flocking of Protesters on Street Networks

Guillaume Moinard, Matthieu Latapy

► To cite this version:

Guillaume Moinard, Matthieu Latapy. Fast Flocking of Protesters on Street Networks. Social Networks Analysis and Mining, Sep 2024, Rende (CS), Calabria, Italy. pp.194-203, 10.1007/978-3-031-78538-2_17. hal-04914858

HAL Id: hal-04914858

https://hal.science/hal-04914858v1

Submitted on 27 Jan 2025

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
# Fast Flocking of Protesters on Street Networks

Guillaume Moinard, Matthieu Latapy

Sorbonne Université, CNRS, LIP6, F-75005 Paris, France

## Abstract

We propose a simple model of protesters scattered throughout a city who want to gather into large and mobile groups. This model relies on random walkers on a street network that follow tactics built from a set of basic rules. Our goal is to identify the most important rules for fast flocking of walkers. We explore a wide set of tactics and show the central importance of a specific rule based on alignment. Other rules alone perform poorly, but our experiments show that combining alignment with them enhances flocking.

*Keywords*: street networks, gathering, flocking, tactic design, protests

## 1 Introduction

Consider the following scenario. Protesters are scattered throughout a city and want to gather into groups large enough to perform significant actions. They face forces that may break up groups, block some places or streets and seize any communication devices protesters may be carrying. As a consequence, protesters only have access to local information on people and streets around them. Furthermore, formed protester groups must keep moving to avoid containment by adversary forces.

In this scenario, protesters need a distributed and as simple as possible protocol, that utilises local information exclusively and ensures the rapid formation of significantly large, mobile, and robust groups. We illustrate these objectives in Figure 1. Our goal in this paper is to identify the key building blocks for such protocols.

To do so, we model the city as a network of streets and intersections in Section 2. We then assume that protesters are biased random walkers on such a network. In Section 3, we present the set of basic rules that compose *tactics* walkers can use to move. We define, in Section 4, what flocking features groups must achieve and run extensive experiments to measure how effective each tactic is regarding those.

<figure><img src="image_2.png" /><figcaption>Figure 1: Walkers scattered on a street network (left) must rapidly gather (center) and subsequently flock (right).</figcaption></figure>

## 2 Framework

We need a framework to simulate displacements of protesters in a city. We model cities as undirected graphs we call street networks. Protesters are then biased random walkers on this network. They can move from node to node with simple rules we introduce in next Section.

### 2.1 Street networks

In order to model real-world cities, we leverage OpenStreetMap [1] data and the OSMnx library [2]. For a given city, we use this library with its default settings to extract the graph $G = (V, E)$ defined as follows: the nodes in $V$ represent street intersections in this city and the links in $E \subseteq V \times V$ represent pieces of streets between them. We take
the undirected graph $G$, meaning there is no distinction between $(u, v)$ and $(v, u)$ in $E$. In addition, we denote by $N(v) = \{u, (u, v) \in E\}$ the set of neighbors of any node $v$ in $V$.

We performed experiments on a wide ranges of large worldwide cities of diverse sizes and structures. This led to no significant difference on obtained results. We therefore use a typical instance, namely Paris, to present our work in this paper. This street network has 9602 nodes, 14974 links, leading to average degree 3.1. Its diameter is 83 hops and its average distance is 39.4 hops. The average street length is 99 meters, and the average distance is 5552 meters.

The links of a street network generally represent street segments of very heterogeneous lengths [3]. Then, moves from a node to another one may have very different duration. In order to model this, we use a classical discretization procedure [4] that consists in splitting each link of the street network into pieces connected by evenly spaced nodes. In the obtained graph, each link represents a street slice of length close to a step $\delta$. Then, the walkers defined in previous section consistently make a move of length approximately $\delta$ at each time step.

In this paper, we use $\delta$ equal to 10 meters, leading to a network of $N = 145000$ nodes and $M = 300736$ links. It gives a sufficient precision in our context, and experiments with other reasonable values of $\delta$ displayed no significant difference.

## 2.2 Walkers

Given a network $G = (V, E)$, we consider a set $W$ of walkers numbered from 1 to $|W|$. We denote the location of walker $i$ at time $t$ by $x_i(t) = v$, with $v \in V$. At each time step $t$, walker $i$ moves to node $x_i(t+1) \in N(v)$.

For any link $(u, v)$ in $E$, we also define the flux of walkers from $u$ to $v$ as $J_{u \to v}(t) = |\{i, x_i(t-1) = u, x_i(t) = v\}|$. We call group the set of walkers at a given node $v$ at a given time $t$: $g_v(t) = \{i, x_i(t) = v\}$. We denote by $n_v(t) = |g_v(t)|$ the number of walkers located at node $v$ at time $t$ and by $g(t) = |\{g_v(t), v \in V, g_v(t) \neq \emptyset\}|$ the number of non-empty groups at step $t$.

# 3 Walker model

At each time step $t$, each walker $i$ moves from location $x_i(t)$ to location $x_i(t+1)$ in $N(x_i(t))$. This section presents how we choose the new location $x_i(t+1)$.

## 3.1 Available information

We assume that walkers have very limited capabilities: they have no access to the actual location of other walkers, even on neighbor nodes, and they have no long-term memory and no communication protocol. Instead, we assume they only have access to estimates of aggregated observables, such as the number of walkers on neighbor nodes and the flow intensity on surrounding links.

More formally, walker $i$ may use the following information:

* its previous location $x_i(t-1)$,

* the number $n_v(t)$ of walkers on node $v$ for all $v$ in $N(x_i(t)) \cup \{x_i(t)\}$,

* the flux of walkers arriving and leaving its current location $v = x_i(t)$, i.e. $J_{u \to v}(t)$ and $J_{v \to u}(t)$ for all $u$ in $N(v)$.

Thanks to the information above, each walker $i$ knows its previous location $u = x_i(t-1)$, its current location $v = x_i(t)$, and it has access to various criteria to decide its next location $w = x_i(t+1)$. Then, it needs a way to derive walking rules from criteria, and a way to combine these walking rules into a tactic.

## 3.2 Criteria

A criterion is a parameter from which we construct walking rules. We consider the following set of criteria $C$.

* *Random.* The walker makes no difference between all possible neighbors: the criterion has value 1 for each of them.

* *Propulsion.* The walker never goes back to its previous location $u$: the criterion has value 0 for $u$ and value 1 for other neighbors of $v$.

* *Attraction.* The walker preferably moves to nodes where there are already many walkers: the criterion is equal to the number of walkers $n_v(t)$.

* *Follow.* The walker preferably follows the most popular moves of other walkers: the criterion
has value $J_{v \to w}(t)$.

* Alignment. The walker takes into account the net flux in both directions: the criterion is equal to $\Delta J_{v \to w}(t) = J_{v \to w}(t) - J_{w \to v}(t)$.

## 3.3 Walking rules

Let us consider a criterion $C_{u,v,w}(t)$. We define the corresponding walking rule using the classical *logit rule*. It gives the probability $\omega_{u,v,w}^C(t)$ that walker $i$ moves from $v$ to $w$, given the fact that it arrived at $v$ from $u$:

$$ \omega_{u,v,w}^C(t) = \frac{e^{\beta \cdot C_{u,v,w}(t)}}{\sum_{z \in N(v)} e^{\beta \cdot C_{u,v,z}(t)}} \quad (1) $$

Parameter $\beta \ge 0$ is the intensity of choice: it quantifies the influence of the criterion on walker choices. If $\beta = 0$, the criterion has no influence and walkers make purely random choices. If $\beta \to \infty$ walkers necessarily choose a neighbor among the ones that maximize the criterion.

## 3.4 Tactics

A *tactic* is a linear combination of walking rules that defines the probability $\pi_{u,v,w}(t)$ to move from $v$ to one of its neighbors $w$ when coming from $u$:

$$ \pi_{u,v,w}(t) = \sum_{C \in \mathcal{C}} \alpha_C \cdot \omega_{u,v,w}^C(t) \quad (2) $$

where $\alpha_C$ is the coefficient of criterion $C$, with $\sum_{C \in \mathcal{C}} \alpha_C = 1$. Therefore, a tactic is defined by a set of criteria and their coefficients. We call *strict tactic* one that has all its coefficients, except one, set to zero and then always follows the same criterion.

In practice, at each time step, each walker selects a criterion $C$ with probability $\alpha_C$. Then, it computes its probability $\omega_{u,v,w}^C$ to go to each neighbor node $w$ and selects its new location accordingly.

As transition probabilities at time $t$ depend on previous non-deterministic moves, formal analysis of such processes is generally out of reach [5]. We will therefore explore possible tactics using simulations.

## 3.5 Baseline

In addition to the tactics above, we consider a reference baseline that easily achieves flocking thanks to

collective decisions. This means that, at each time step, all walkers at a given node make the same choice. We then obtain reference results that we expect our walker models to reach or outperform, even though they are unable to make collective decisions.

More formally, for each node $v$ at time $t$, a unique random neighbor $u$ of $v$ is chosen and all walkers $i$, such that $x_i(t) = v$, move to $u = x_i(t+1)$. This is equivalent to purely random walks of groups until they meet another group.

Since we consider non-bipartite connected graphs, it is well known that all groups will eventually merge. The number of needed steps is called the coalescence time [6]. Even though this number may be prohibitive, this means that the baseline successfully produces large groups. In addition, groups are mobile since, once formed, they perform purely random walks. As a consequence, this baseline makes a relevant reference for the success of flocking walkers.

# 4 Experiments

We seek to design good tactics for our walkers. They must produce flocking faster than the baseline presented in Section 3.5. Moreover, we want to obtain short time convergence, as our walkers model the action of protesters that can not walk forever. In this Section we define metrics to evaluate how well walkers flock. We then run simulations for a reasonable duration and evaluate which tactics have performed the best in this time interval.

## 4.1 Flocking metrics

We characterize flocking as a gathering of walkers exploring the network. With notations of Section 2.2, this leads to the two following score definitions for a given run of a given tactic.

**Definition 1** (cluster, gathering score $\rho(t)$). A cluster is a maximal connected sub-graph with walkers on all its nodes. The gathering score $\rho(t)$ is the average number of walkers in clusters.

For example, when every agents are in the same cluster, $\rho(t) = |W|$. If instead all agents are in different ones, it equals 1.
**Definition 2** (mobility score $\mu(t)$). The mobility $\mu_i(t)$ of walker $i$ is the number of distinct nodes a walker has already visited at time $t$: $\mu_i(t) = |\{v, \exists t' \le t, x_i(t') = v\}|$. The mobility score $\mu(t)$ is the average walker mobility.

Notice that the mobility score is monotonically non-decreasing with time: $\mu(t+1) \ge \mu(t)$. In addition, if all walkers move to a node they already visited then $\mu(t+1) = \mu(t)$.

We are interested in tactics with high gathering and mobility scores. Indeed, the high gathering score ensures that walkers form significant groups. In addition, the high mobility score implies that walkers continue to move. However, the fact that the gathering score remains high shows that walkers stay grouped. This means that the tactic successfully achieves flocking.

In order to gain more insight on group structure and dynamics, we introduce an additional metric.

**Definition 3** (sprawling score $\sigma(t)$). The sprawling score $\sigma(t)$ is the average number of nodes in clusters.

If the sprawling score is 1, all groups are isolated from each other: whenever walkers are at a node, there is no walker on neighbor nodes. If instead the sprawling score is high, walkers form large clusters of neighbor groups. Its largest possible value is the total number of nodes in the network, meaning that there are walkers on each node.

We are interested in tactics with low sprawling score, meaning that they succeed in merging neighbor groups.

## 4.2 Extensive exploration of tactics

In this Section, we follow an extensive method to explore the wide set of possible tactics on an entire city network:

* we consider the Paris street network discretized with parameter $\delta = 10$ meters, leading to a network of $N = 145000$ nodes and $M = 300736$ links,

* we consider $N$ walkers initially distributed uniformly at random on nodes,

* we perform 1000 time steps, thus considering reasonably short walks of approximately 10 kilometers,

* we set $\beta$ large enough to ensure each walking rule strictly follows its criterion,

* we finally consider all tactics obtained as combinations of $\alpha_C$ parameter values from 0 to 1 by steps of 0.1 such that $\sum_{C \in C} \alpha_C = 1$.

<figure><img src="image_3.png" /><figcaption>Figure 2: Gathering and mobility of all tactics. Each dot corresponds to the average last step value from ten runs of a tactic. The horizontal axis gives the gathering score, the vertical one gives the mobility score. From left to right and from top to bottom: tactics based mostly on the Random, Alignment, Attraction, Propulsion and Follow rule, respectively. On each of these plots, we indicate the strict tactic, that exclusively uses the corresponding rule. The bottom-right plot corresponds to tactics with no prevailing rule.</figcaption></figure>

With this setup, we obtain 1001 different tactics. We run 10 simulations of each tactic and we plot the average mobility and gathering scores in Figure 2. In these plots, each dot corresponds to a tactic defined by a set of $\alpha_C$ parameter values. We
<figure><img src="image_4.png" /><figcaption>Figure 3: Plots showing the evolution of gathering, mobility and sprawling scores for the strict tactics and the best tactic. Gathering score is in log-log scale.</figcaption></figure>

split these tactics into six plots: we display a set of tactics on the same plot if they all have $\alpha_C > 0.5$ for the same criterion C, and we display on the last plot the set of all other tactics.

We also display in each plot of Figure 2 a vertical and an horizontal line that indicate baseline results. Then, the tactics achieving the best flocking performances are the ones in the upper right corner: they obtain groups bigger and are more mobile than the baseline.

We pay particular attention to strict tactics, which performances are spotted by red dots in Figure 2. We also highlight what we identify as the best tactic regarding our scores. It is the tactic with the highest gathering score among tactics that outperform our baseline. We display the evolution of mobility and gathering scores over time for these tactics in Figure 3.

Figure 2 clearly shows that Alignment-based tactics (top center plot) outperform others. All other sets of tactics perform poorly, except a few tactics for which no rule weights up more than 50% (bottom right plot). These tactics actually also use Alignment rule, to a lesser extent. This identifies the Alignment rule as a key building block for flocking tactics.

## 4.3 Best tactics

We now focus on the two main tactics that achieve flocking: the Alignment strict tactic and the best tactic (the one that corresponds to the rightmost dot on Figure 2). Figure 3 displays their scores over time in green and purple colors, respectively.

The plots show that the mobility score of both tactics first rapidly grow, and that this growth significantly decreases over time. Even if these tactics are not as good as the Propulsion strict tactic

regarding mobility, they have comparable performances for this metric.

Notice that the Propulsion strict tactic has very low gathering scores (Figure 3, left), which makes it an irrelevant tactic despite its mobility score. Instead, both the Alignment strict tactic and the best static quickly reach excellent gathering scores. The best tactic significantly outperforms the Alignment strict tactic and has a linear gathering score plot in log-log scale. This means that its evolution has a polynomial growth (of exponent below 1), indicating a fast growth, but also that the evolution of group size tends to flatten over time. This is due to groups reaching a state where all clusters of groups are in distant regions of the network. Then, it takes longer for groups to meet other groups, merge, and grow in size.

Finally, Figure 3 also displays the sprawling score for all considered tactics. We observe that the best tactic produces a greater sprawling score than Alignment. The sprawling, for those two tactics, is due to groups following each others when they detect another group on a neighbor node, without necessarily merging with it.

With the Alignment strict tactic, the sprawling of groups first very quickly increases, then decreases and stabilizes. This is because this tactic forms groups immediately at the beginning, mostly as lines of walkers following each others. The sprawling reduces as groups reach intersections and split, until the aggregation and splitting dynamics reach an equilibrium.

For the best tactic, groups aggregate into lines for a longer time period, resulting into a much higher sprawling score. It then slowly linearly decreases until the end of the run. This is because the Attraction rule, when chosen in the best tactic, will make the front group wait for the groups behind it, leading to less sprawled clusters.

As explained in Section 4.1, an efficient tactic should have a low sprawling score. The sprawling of the baseline is 1 (up to the third digit), thanks to the collective decision. This is the optimum value.

Our walkers do not have access to collective decision. When a cluster of groups arrives at an intersection, at the end of a street, it can split into multiple groups. In the case of a lone group (a cluster with no sprawling) it will split into multiple groups, with equal number of walkers on average. This reduces the gathering score.
<figure><img src="image_5.png" /><figcaption>Figure 4: Schematic configurations that walkers, groups and clusters of groups achieve with the best tactics.</figcaption></figure>

## 4.4 Interpretation

Recall that the best tactic corresponds to the right-most dot among those in the upper right corner of plots in Figure 2. It is defined by the following parameters: {$α_{follow} = 0.1, α_{align} = 0.8, α_{attr} = 0.1$} and a null weight for other rules. This tactic produces groups of 121 walkers on average, and walkers explore on average 540 distinct nodes during their 1000 steps. These scores are more than twice and five times more than what the baseline gets, respectively.

Figure 4 illustrates the behavior of this tactic. First, Alignment imposes walkers to move forward, may they be alone or part of a cluster, as shown in the first configuration of Figure 4. Indeed, a walker $i$ alone at location $x_i(t) = u$ and $x_i(t-1) = v$ will measure a negative flux $\Delta J_{u \to v}(t) = -1$ at time $t$, while it will be $\Delta J_{u \to w}(t) = 0$ for all $w \neq v$. This implies the walker never goes back. This effect is left unchanged with multiple walkers in a cluster.

Second, this same rule guarantees that, if two groups cross path, they then merge in a single cluster in which all walkers will follow the same path. Indeed when a group $u$ cross path with a smaller group $v$, we have $x_i(t+1) = x_j(t)$ and $x_j(t+1) = x_i(t)$ for all $i \in g_u(t)$ and all $j \in g_v(t)$. The net flux is then $\Delta J_{u \to v}(t) = n_u(t) - n_v(t) > 0$ for all walkers, which drive them all in the same direction: the smaller group goes back towards $v$ (where it came from) while the trajectory of the largest group is left unchanged.

However, this rule alone is not perfectly effective at avoiding splitting. The walkers in the first group in a cluster will not always choose the same node at an intersection, as illustrated in the two bottom pictures of Figure 4, as the different possible nodes all have a flux equal to 0. In this context, the Attraction rule allows walkers that split in the least chosen direction at an intersection to go backward and avoid losing sight of the cluster.

Finally, the Follow rule improves the gathering. Indeed, clusters of groups tend to sprawl when walkers use the Alignment rule. In such chain of groups following each others, the Follow rule allows walkers in the front group to move backwards, merging with the group behind them, while it forces walkers in other groups to move forward to catch up the leading group.

This equilibrium between those three rules gives an outcome where groups flock very efficiently.

## 5 Related work

Our approach is different from usual protest studies based on thresholds [7] or agent-based [8, 9, 10] model. Indeed, these works focus on how people decide to participate to a protest; they do not deal with protester mobility.

In distributed systems, computer scientists proposed solutions to gathering problems where walkers follow a common distributed algorithm to meet on any connected graph [11, 12].

Flocking is a collective dynamic where groups of walkers move spontaneously in the same direction [13, 14, 15]. It has been largely studied in free space. Few articles explore flocking when trajectories of walkers are network constrained. For example, in [16] the authors implement rules similar to ours to study the possible outcomes of their combinations on a line. They get results very similar to ours in a single street.

Still, to our knowledge, we are the first to experiment rules for flocking that we can apply on any network.

## References

[1] Steve Coast. Openstreetmap, 2004.
[2] Geoff Boeing. OSMnx: New methods for acquiring, constructing, analyzing, and visualizing complex street networks. 65:126-139.

[3] Adolfo Paolo Masucci, Duncan Smith, Andrew Crooks, and Michael Batty. Random planar graphs and the london street network. *The European Physical Journal B*, 71:259-271, 2009.

[4] Izaak Neri, Norbert Kern, and Andrea Parmeggiani. Totally asymmetric simple exclusion process on networks. *Physical review letters*, 107(6):068702, 2011.

[5] Pierre Brémaud. *Markov chains: Gibbs fields, Monte Carlo simulation, and queues*, volume 31. Springer Science & Business Media, 2001.

[6] Colin Cooper, Robert Elsässer, Hirotaka Ono, and Tomasz Radzik. Coalescing random walks and voting on connected graphs. *SIAM Journal on Discrete Mathematics*, 27(4):1748-1758, January 2013.

[7] Mark Granovetter. Threshold models of collective behavior. *American journal of sociology*, 83(6):1420-1443, 1978.

[8] Joshua M Epstein. Modeling civil violence: An agent-based computational approach. *Proceedings of the National Academy of Sciences*, 99:7243-7250, 2002.

[9] Carlos Lemos, Helder Coelho, Rui J Lopes, et al. Agent-based modeling of social conflict, civil violence and revolution: State-of-the-art-review and further prospects. *EUMAS*, pages 124-138, 2013.

[10] Michele Agamennone. *Riots and Uprisings: Modelling Conflict between Centralised and Decentralised Systems*. PhD thesis, King's College London, 2021.

[11] Andrzej Pelc. Deterministic rendezvous in networks: A comprehensive survey. *Networks*, 59(3):331-347, 2012.

[12] Subhash Bhagat and Andrzej Pelc. How to meet at a node of any connected graph. In *36th International Symposium on Distributed Computing (DISC 2022)*. Schloss Dagstuhl-Leibniz-Zentrum für Informatik, 2022.

[13] Felipe Cucker and Steve Smale. Emergent behavior in flocks. *IEEE Transactions on Automatic Control*, 52(5):852-862, May 2007.

[14] Craig W Reynolds. Flocks, herds and schools: A distributed behavioral model. In *Proceedings of the 14th annual conference on Computer graphics and interactive techniques*, pages 25-34, 1987.

[15] Tamás Vicsek, András Czirók, Eshel Ben-Jacob, Inon Cohen, and Ofer Shochet. Novel type of phase transition in a system of self-driven particles. *Physical review letters*, 75(6):1226, 1995.

[16] JR Raymond and MR Evans. Flocking regimes in a simple lattice model. *Physical Review E*, 73(3):036112, 2006.