Agent-based modeling in JavaScript in the browser or on the server. [v0.5.19]

Iowa Caucuses

This is a model of the Iowa caucuses, a political event that combines voting and debate/discussion. In this model, voters and candidates are represented on a political compass, with each point in space representing a unique ideological viewpoint, all drawn from the same distribution function. Voters are also connected to each other, representing social relationships. They are connected to their closest neighbors ideologically, with random connections drawn to voters on other parts of the political spectrum.
The caucus proceeds like this: In the first round, each voter casts their vote for the candidate whose ideological location is ‘closest’ to theirs. Then, in following rounds, candidates receiving less than 15% of the total vote are marked not ‘viable,’ and voters who chose a nonviable candidate vote again by randomly picking one of the candidates chosen by their connections (including the same candidate). This continues until all candidates receiving votes have over 15% of the total.
By situating the landscape of voters on a social network, it is possible for candidates receiving less than 15% of the vote in the first round to become viable candidates through their voters influencing others in subsequent rounds.