DemocracySim is a Mesa-based research platform for studying how voting rules shape participation, inequality, and collective outcomes in a dynamic multi-agent environment.
The project started as a master's thesis and is kept and maintained for
further experiments and development. The thesis freeze is kept separately on
branch thesis.
The associated thesis asks:
How do different voting rules influence the temporal evolution of participation rates and inequality in a simple multi-agent system with adaptive agents?
This project was supported by OpenPetition, and developed in the Swarm Intelligence and Complex Systems group at Leipzig University.
Documentation:
Create a local environment:
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txtRun the interactive Mesa server:
python -m scripts.runRun a headless batch from the default config:
python -m scripts.run_headlessFind and replay existing runs:
python -m scripts.run_replayGenerate a tiny deterministic demo run:
python -m scripts.run_headless --config configs/demo.yaml --out-root tmp/demo_gif_runReplay it locally:
python -m scripts.run_replay tmp/demo_gif_run/run_0Or run a live demo without seed:
python -m scripts.run --config configs/demo.yamlFor a more general walkthrough and UI explanation, see the demo guide.
- interactive simulation via Mesa
- headless and batch execution pipelines
- replay tooling for stored run artifacts
- configurable voting rules and adaptive participation behavior
- structured outputs for summaries, diagnostics, and further analysis
Agents live in a grid-based environment that evolves over time. Areas hold repeated elections, and agents decide whether to participate or abstain before their preferences are aggregated under a voting rule.
Election outcomes affect both rewards and the subsequent state of the environment, creating feedback between collective decisions and later conditions. The framework is designed to make these dynamics inspectable rather than hiding them behind a single end metric.
Core ingredients:
- heterogeneous agent preferences
- adaptive participation behavior
- multiple voting rules
- path-dependent environmental change
- structured logging for replay and downstream analysis
The thesis focuses on a controlled subset of this broader framework. It compares how different voting rules affect turnout and inequality under fixed model assumptions. Details can be found in the thesis branch and the associated documentation.
