Coder Social home page Coder Social logo

coordination_model's Introduction

This project contains code for running a coordination game simulation based on David Siegel (2009)'s "Social Networks and Collective Action" in the American Journal of Political Science.

All relevant code is contained in coordination_model.py, and simulations are started using the run_coordination_simulation function.

Returns pandas Series where each entry is share of people coordinated on candidate 1 at end of each simulation run.

The one potential divergence from Siegel's model is that I do not update individual nodes simultaneously. Siegel's writing suggests that all nodes examine behavior in their neighborhood, then update simultaneously. This, I discovered, leads to what I feel is a pathological dynamic that is knife-edge dependent on this simultaneity. The simplest illustration of this is when a network has only two nodes, $i$, and $j$, where $i$ is in state 0 and $j$ is in state 1. If neither have strong dispositions towards one state, then what happens is each looks at their neighborhood, finds everyone is in the alternate state, then they \emph{simultaneously} flip states. This flipping back and forth can go on forever, and I've found it often happens in much larger groups than just two nodes. Since any deviation from simultaneity breaks this pattern, it seems unrealistic, and so instead I moved the model to randomly iterate through nodes, updating each node sequentially. This change was made with commit 6d2ef1bc19eb3, and interested parties can revert to an earlier commit if they wish to work with simultaneous updating.

coordination_model's People

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.