Skip to content

VictorLi5611/Political-Evolution-Simulator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

Contributors

Political Evolution Simulator

Modeling Selectorate Theory with Evolving Candidate Strategies

Table of Contents

  1. About the Project
  2. Features
  3. Technical Overview
  4. Getting Started
  5. File Organization
  6. Author

About The Project

This Python-based simulator extends Selectorate Theory by integrating evolutionary game theory, risk-sensitive voting behavior, and ideologically biased voter modeling. It explores how political leaders maintain power by dynamically adapting their strategies for public/private goods allocation, under constraints of partial voter observability and coalition beliefs.

The simulator models iterative election cycles where candidate strategies evolve based on electoral fitness, voter expectations, and ideological alignment. It is designed for academic experimentation, political modeling, and reinforcement learning extensions.


Features

  • Ideological voter modeling with risk profiles (safe-seeking, risk-seeking)
  • Dynamic allocation of public and private goods by candidates
  • Evolutionary update rules with Gaussian mutation
  • Support for fixed or mutating ideological platforms
  • Coalition formation and strategic voting under uncertainty

Technical Overview

Voter Model

  • Each voter has:
    • Ideological position p_i ∈ [0,100]
    • Risk profile: risk-seeking or safe-seeking
  • Voters cast ballots based on:
    • Policy proximity: -|p_i - p(c)|^2
    • Public goods: α_c × (R / |V|)
    • Private goods: (1 - α_c) × (R / |W_c|) if included in candidate’s coalition

Candidate Strategy

  • Each candidate has:
    • Ideological position p(c)
    • Resource strategy π_c = (α_c, 1 - α_c)
  • Resources R are divided:
    • α_c fraction to all voters (public goods)
    • 1 - α_c to expected supporters (private goods)
  • Winning coalition W_c ⊆ S_c is formed from supporters

Evolutionary Dynamics

  • After each round:
    • The candidate with the largest viable coalition is elected
    • Losers are replaced by mutated copies of the winner
  • Mutation rules:
    • α_c' = α_c + ε, ε ∼ N(0, σ²)
    • p(c)' = p(c) + η, η ∼ N(0, τ²) (optional)
  • Fitness Function:
    • f(c) = |W_c| if elected, 0 otherwise

Getting Started

Prerequisites

  • Python 3.7+
  • numpy

Install dependencies using:

pip install numpy

Installation

  1. Clone the repository by running this command in the course VM terminal:
    git clone https://github.com/VictorLi5611/political-evolution-sim.git
    cd political-evolution-sim
  2. Run the simulation:
    python3 simulation.py
  3. Adjust parameters inside simulation.py to configure:
  • Number of voters and candidates
  • Mutation standard deviations
  • Policy mode (fixed vs. evolving)
  • Coalition thresholding and risk models

File Organization

political-evolution-sim/
├── simulation.py         # Main simulation script
├── README.md             # Project README

Author

Victor Li
GitHub: VictorLi5611
MSc Computer Science (Data Science)
Carleton University
Research interests: Multi-agent systems, political modeling, reinforcement learning

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages