Steps

Network

Choose network topology:

Random
Small-world
Scale-free
Custom

Simulation

Output

Infected
Recovered
Susceptible
Infected
Recovered

Arc color = layer  |  Arc opacity = connection weight
Infections per layer
Spread per agent
Click an agent or bar to view spread history
Connections per layer

The "One True Self" Assumption in ABMs

In purely mathematical models, researchers often duplicate nodes across different network layers to solve equations. However, because this is an Agent-Based Model (ABM), we take a more grounded approach: there is only one true self.

A person does not physically duplicate when they travel from the office to their home. Their biological state (e.g., infected or susceptible) remains unified. Therefore, we transform the multilayer network into a flattened multiplex model by taking the union of all agents. There is a single set of core nodes.

To simulate environmental complexity, "layers" are treated strictly as distinct sets of edges connecting these core nodes. If an agent does not participate in a particular context (like a specific social media app), they simply have an edge degree of zero for that specific layer.

Step 1 / 6

By transforming the network this way, each circle represents an agent's unified biological state globally. The distinct colored arcs represent the specific environmental contexts (layers) they participate in. If an agent isn't part of a layer, they simply have no arcs of that color.

Controls

Agents: sets how many individuals are included in the simulation.

Spread Rate: the baseline chance that an infected agent transmits in a single step (scaled by edge weight).

Recovery Rate: the chance that an infected agent recovers during each step.

Connectivity (per layer): controls edge density. Higher values create more connections in that layer.

Frequency (per layer): controls how often a layer becomes active (every N steps). Interactions are not equally frequent—for example, most people see coworkers more often than extended family.

Repurpose This?

This playground is open-source. It builds on the TensorFlow Playground (Apache 2.0) and demonstrates flattened multilayer simulation strategies inspired by the MultiRepast4py framework.