I made a Monte Carlo voting simulation. No particular reason, I just think it’s neat.
Okay, so I was thinking about the Median Voter Theorem, which says that the winning position in an election is the position of the median voter. Of course, this conclusion only holds under certain assumptions, and none of those assumptions are actually true. And yet the conclusion is approximately correct in many situations. That’s why we care disproportionately about the median congress members (like Susan Collins), the median Supreme Court Justices (like Roberts), and the median “swing” states (like Pennsylvania).
But it should be obvious that the median voter fails in a lot of ways. In particular, it doesn’t predict the political polarization that occurs in US politics. And there are plenty of possible explanations: voter turnout, third parties, primary elections, politician’s charisma factors, multidimensional political spectra, and so on. But I’m not sure which among those explanations are most important.
The voting simulation won’t answer any of these questions, I’m just setting the context. One of the assumptions of the Median Voter Theorem is that political preferences exist along only one dimension. I thought I’d try running simulations with two dimensions to see what would happen, and to make some pretty graphs.
Here’s how the simulation works. I randomly generated a hundred voters, and randomly initialized two candidates. The candidates then take turns adjusting their position, trying to get more votes. During each candidate’s turn, they take a small step in a random direction, and if this caused them to lose votes, then they undo the step. Repeat a thousand times, and that gives you approximately the best strategies. As it happens, the best strategies are fairly close to the black square, which shows the median X and Y coordinates of the voters.
It may be helpful to show the paths taken by each candidate.
As you can see, the candidates bounce around randomly quite a lot, but they tend towards the median position, and then circle randomly around each other. So the median voter theorem approximately holds in this situation.
Of course, it depends on exactly how the voters are distributed. So let’s distribute voters in a ring. The ring distribution is interesting because the median X/Y coordinates are in the center of the ring, where there are literally no voters. Will candidates tend towards a median position held by none of the voters? Let’s find out!
Yes, candidates apparently move towards the center of the ring, away from any of the individual voters.
Finally, I thought I’d try a semi-circle distribution, or what you might call a “horseshoe” distribution. Please don’t take this as an endorsement of horseshoe theory, which in my view is basically a pure expression of outgroup homogeneity bias (“all people who aren’t like me are similar to one another”). The horseshoe distribution is just about the simplest distribution where the Median Voter Theorem very obviously fails. Take a look:
The candidates, rather than tending towards the median, tend towards the center of the arc. On the plus side, this means that the candidates’ positions actually reflect the positions of some of the voters. On the minus side, it sure seems like a lot of voters’ vertical positions don’t get represented.
So, that’s neat. Political speculation based on meager evidence accepted in the comments.