# Polarization in Political Rallies: A Markovian Agent-Based Model for Opinion Dynamics
## 3 The Markovian Agent Modelling Paradigm  
Markovian agent models (MAMs) represent systems as a collection of agents distributed across a geographical area and are characterized by continuous-time Markov chains.In these models, there are two primary types of transitions: _local transitions_ and _induced transitions_. Local transitions capture the internal dynamics of a Markovian agent (MA), while induced transitions model interactions between MAs based on their states. The original MAM framework introduced by [25] focused on agent interactions through message exchange. However, this approach was later expanded in [20] to incorporate a variety of interaction mechanisms among the entities involved. In this paper, we exploit the message-passing interaction paradigm because it is particularly suited to the type of interactions we are examining. Thus, we will briefly outline the MAM analytical framework with a focus on this interaction mode. An MA can send messages to other MAs either upon the occurrence of a local transition or while remaining in a specific state. The propagation of these messages is governed by the _perception function_\(u(\cdot)\). This function enables the receiving MA to be aware of the state from which the message originated, based on the agent's position in the space, the message routing policy, and the transmission characteristics of the medium. This awareness helps the receiving MA decide on the appropriate response. Agents can be distributed across a geographical space \(\mathcal{V}\). They may belong to different classes and exchange various types of messages. We represent a Markovian agent (MA) using the graphical notation illustrated in Figure 2. For an MA of class \(c\), a local transition from state \(i\) to state \(j\) is depicted with a solid arc, annotated with the transition rate \(q_{ij}^{c}\). When a transition occurs, a message \(m\) might be sent with probability \(g_{ij}^{c}(m)\); this is represented graphically by a dotted line originating from the transition that sends the message, labeled with \(S(m)\) to indicate which message is sent. Additionally, an MA can send a message during its stay in a particular state. This is represented by self-loops, where a self-loop in state \(i\) signifies the emission of message \(m\) at rate \(\lambda_{i}^{c}\), similar to how messages are sent during state transitions. It is important to note that self-loops do not affect the local behavior of MAs due to the memoryless property of the exponential distribution, unlike in the traditional theory of continuous-time Markov chains.Instead, self-loops influence the behavior of a remote MA that receives the corresponding message. For example, in Figure 2, message \(m_{1}\) is sent when transitioning from state \(i\) to state \(j\), and a self-loop is associated with state \(i\) to emit message \(m_{2}\) at rate \(\lambda_{i}^{c}\). Induced transitions due to the reception of a message are graphically represented by dashed arcs between the involved states, labeled with \(R(m)\). In Figure 2, for instance, a transition from state \(i\) to state \(k\) is induced by the reception of message \(m_{3}\). Formally, a _Multiple Agent Class, Multiple Message Type_\(MAM\) is defined by the tuple:  
\[MAM=\{\mathcal{C},\mathcal{M},\mathcal{V},\mathcal{U},\mathcal{R}\}, \tag{1}\]  
where \(\mathcal{C}=\{1\ldots C\}\) is the set of agent classes, and \(\mathcal{M}=\{1\ldots M\}\) is the set of message types. \(\mathcal{V}\) is a finite space over which MAs are distributed, and \(\mathcal{U}=\{u_{1}(\cdot)\ldots u_{M}(\cdot)\}\) is a set of \(M\) perception functions (one for each message type). The density of the agents is regulated by functions \(\mathcal{R}=\{\xi^{1}(\cdot)\ldots\xi^{C}(\cdot)\}\), where each component \(\xi^{c}(\mathbf{v})\), with \(c\in\mathcal{C}\), counts the number of class \(c\) agents placed in position \(\mathbf{v}\in\mathcal{V}\).