Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Consensus Emergence

Minimal agent-based models of consensus formation and collective dynamics.


Overview

This repository investigates how global consensus can emerge from simple local interactions between agents.

The model explores a minimal mechanism:

local interaction → domain formation → global consensus

Agents interact on a two-dimensional lattice and iteratively update their opinions according to local neighborhood dynamics.

The project is part of the broader Meccanismo Complesso research initiative on:

  • complex systems
  • emergence
  • collective behavior
  • agent-based modeling
  • networked dynamics

Motivation

Many collective systems exhibit spontaneous organization despite the absence of centralized coordination.

Examples include:

  • opinion formation
  • cultural diffusion
  • social coordination
  • collective decision-making
  • biological self-organization

This repository studies whether large-scale consensus can emerge from:

  • purely local interactions
  • stochastic dynamics
  • minimal behavioral assumptions

without requiring optimization, planning, or intelligent coordination.


Model

Agents occupy a two-dimensional periodic lattice.

Each agent holds a binary opinion:

  • +1
  • -1

At each time step:

  1. Agents observe neighboring opinions
  2. A local majority is computed
  3. Agents adopt the local majority with probability conformity
  4. With small probability noise, opinions randomly flip

The system therefore combines:

  • local conformity
  • stochastic perturbations
  • emergent collective organization

Repository Structure

consensus-emergence/
│
├── README.md
├── requirements.txt
├── .gitignore
│
├── src/
│   ├── agents.py
│   ├── network.py
│   ├── simulation.py
│   └── metrics.py
│
├── scripts/
│   ├── run_simulation.py
│   ├── analyze.py
│   └── visualize.py
│
└── figures/

Metrics

The repository computes several observables:

Order Parameter

Measures global consensus:

M = |<s_i>|

  • M = 0 → disordered state
  • M = 1 → full consensus

Polarization

Measures coexistence of opposing opinions.

High polarization indicates persistent disagreement.

Time to Consensus

Measures how rapidly the system converges toward consensus.


Installation

Install dependencies:

pip install -r requirements.txt

Run the Simulation

Generate simulation data:

python scripts/run_simulation.py

Analyze metrics:

python scripts/analyze.py

Generate visualizations:

python scripts/visualize.py

Example Results

Consensus Dynamics

The order parameter rapidly increases while polarization collapses, indicating spontaneous consensus formation.

Consensus Dynamics


Spatial Consensus Formation

Snapshots of the spatial opinion configuration over time.

The system evolves from random initial conditions toward near-complete consensus.

Consensus Snapshots


Interpretation

The results demonstrate that:

  • large-scale consensus can emerge from local interactions
  • centralized coordination is not required
  • stochastic systems can self-organize into ordered states
  • minimal behavioral assumptions are sufficient to generate collective structure

The model therefore provides a simple example of emergent organization in complex adaptive systems.


References

  1. Castellano, C., Fortunato, S., & Loreto, V. (2009).
    Statistical physics of social dynamics.
    Reviews of Modern Physics, 81(2), 591–646.

  2. Vicsek, T., & Zafeiris, A. (2012).
    Collective motion.
    Physics Reports, 517(3–4), 71–140.

  3. Holland, J. H. (1998).
    Emergence: From Chaos to Order.
    Oxford University Press.

  4. Mitchell, M. (2009).
    Complexity: A Guided Tour.
    Oxford University Press.

  5. Bonabeau, E. (2002).
    Agent-Based Modeling: Methods and Techniques for Simulating Human Systems.
    Proceedings of the National Academy of Sciences, 99, 7280–7287.

  6. Axelrod, R. (1997).
    The dissemination of culture: A model with local convergence and global polarization.
    Journal of Conflict Resolution, 41(2), 203–226.


Topics

  • Complex Systems
  • Agent-Based Modeling
  • Consensus Formation
  • Collective Dynamics
  • Emergence
  • Statistical Physics
  • Opinion Dynamics
  • Self-Organization

Author

Meccanismo Complesso
Independent research initiative on complex systems, emergence, and agent-based dynamics.

About

Minimal agent-based models of consensus formation and collective dynamics.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages