Skip to main content

Overview

In Emergent, agents live on the nodes of a graph. Edges define which agents can interact. The topology you choose has a major impact on how information, behavior, or state propagates through your simulation. Emergent ships with three built-in topologies and supports any custom NetworkX graph.

Built-in topologies

Set graph_type in your parameters before calling initialize_graph().

Complete graph

Every node is connected to every other node. Information spreads in a single hop; convergence tends to be fast. Good baseline for testing your simulation logic before adding realistic network constraints.

Cycle graph

Nodes are arranged in a ring — each connected only to its two neighbors. Information diffuses slowly from one end to the other. Useful for modeling locally-coupled systems or studying how long it takes for consensus to propagate.

Wheel graph

One central hub node is connected to all other nodes, which also form a cycle among themselves. The hub node acts as a broadcast or aggregation point. Models systems with a central authority or information broker.

Custom graphs

For real-world or research-grade topologies, provide your own NetworkX graph:
Any nx.Graph (undirected) is accepted. Common choices for ABM research:
When modeling a real social or organizational network, you can load an edge list or adjacency matrix and construct the graph with nx.from_edgelist() or nx.from_numpy_array().

Accessing graph data

After initialization, retrieve the graph and inspect or manipulate node data directly:
Emergent does not copy the graph when you call get_graph(). Mutations you make to the returned graph object are reflected in the model’s internal state immediately.