Smart Voting Simulator

Check out this simulator I’ve been working on.

Let me know if I’m missing anything or could make a point more clear. I’d like to make it better before sharing it more broadly. It has some way still to go.

The audience for this site is people who might want to become involved in making a change in the election system. They need to see how things play out in different election scenarios so they can explain to more people what election reform can do. So I try to explain all the points I make with examples.

I also have links at the bottom of each page to the source for that page on github. Github gives you the ability to create a fork and then edit the site and submit a pull request. Or just comment here. Or send an email. I set up a gmail for this project at smartvotingsimulator1.

1 Like

I find it interesting that you list quota approval voting as a proportional method while also listing sequential proportional approval voting (as you call in the simulation, RAV), as semi-proportional. What definition of proportional are you using? Is there a proportionality criteria that you are using that quota approval passes but SPAV doesn’t?

Also, you’re only using one metric to indicate proportionality, the Elbert metric. Based off of your use of this metric, I’m guessing you’re a huge proponent of Phragmén based methods. Though it might be interesting to compare this metric with the more utilitarian log metric where (assuming that no utility can be exactly 0) you take the log of each voter’s utility and average that. You could show that metric under the power one in the sandbox.

This is very cool. I’m a bit confused as to which part is Nicky Case’s and which is yours though.

It appears that most of the code is JavaScript, right? Have you considered ways to make it user-hackable that don’t involve downloading everything and installing Ruby and Jekyll etc? The other downside to that is that for anyone who goes to the effort, how do they share it so others can use it?

BTW, Codepins will be embeddable in posts in our new forum which should be launching soon… something to think about. I can’t overstate the value of things that allow you to just edit code right on a web page, when it comes to the sort of community collaboration that would make sense in this community. I am also working on libraries intended to be shared, for parsing and outputting ballots, etc.

There are more methods that only provide proportionality to distinct groups, and don’t provide the kind of distribution matching that STV does to cover an area of voters with evenly spaced candidates. They are mechanically different. They apply a method of counting votes that is used for apportionment. Apportionment means you have separate groups like different states, and you want to find out how many representatives to give to each state. Two examples are given below: re-weighted range voting and reweighted approval voting.

Yup, this is definitely a very opinionated take on these methods. You’re right that STV and re-weighted methods are based around fundamentally different principles. But they are also trying to achieve different things. SPAV, RRV and SPSV (SPAV + KP) are sequential approximations of optimal methods like proportional approval voting, PSI voting and harmonic voting. Proportional approval voting and least squares are two methods that try to achieve fundamentally different things. PAV (and it’s more proportional but also less free riding resistant variant that uses 1, 1/3, 1/5 instead of 1, 1/2, 1/3) tries to keep any individual vote’s impact on the election independent from any other vote’s impact. The problem with using quotas or the power index you are using is that they are relative to other votes. This creates a paradox where adding votes that approve of every candidate can make the Elbert method flip from preferring outcome A to B to preferring outcome B to A. Because Thiele based optimal methods keep this independence, they can pass criteria that no other types of methods can pass, like Warren’s multi-winner extension of the single winner participation criteria. I have talked more about the differences between these two types of methods here: Thiele vs. Phragmen/Monroe: Two very different interpretations of proportionality

Hi Rob, I would like to add codepens. They are a great way to share ideas.

All I really know how to do at the moment is to add a text box to input code. I could save the code as a string in the URL. I’m not sure if it’ll be too long a URL. Also, I’m not sure if I will break compatibility if I change something. I think both things would be okay for the people that are interested in adding their own code.

Also, I did add a way to run the code without needing ruby and jekyll. I put it in a separate repository at the link below. And I added instructions at the next link.

1 Like

I have have been doing in-browser coding environments since before JSFiddle and Codepen existed, so it is an area I can help with if you are interested. You don’t want people giving out urls that include code that will run on your site, at least not if you store any cookies or anything, since that a way people could steal your identity at the site. (codepen avoids this by using iframes that are on a different domain than the main site)

This is a video on my in-browser coding environment: https://youtu.be/I4mQDaA4gJo , also covering a simple to use templating library that works really well in such environments.(the video is long but feel free to skip around) The environment only saves your code locally (in the browser’s localstorage). The other alternative is to set the stuff up for use with Codepins by making the code served and usable that way.

I do plan on doing as much along these lines as I can with the new forum, but ideas are currently taking shape. (don’t expect much other than Codepen embedibility with the first launch)

Hi Parker, I think I’m describing a principle of representation: to move candidates closer to voters. A voter should feel there is at least one representative close to them. So that sets up the math problem of minimizing that distance. When the principle is followed, then it does produce proportional representation.

Also, I could add a utility metric chart… though I’m not sure of the scale since utilities are relative values… so I’m thinking about it.

1 Like

I agree with this, and there is nothing wrong with this analogy. In my earlier post, I meant to talk about your elaborate geographical least squares sim (not on this page, but I remember seeing it somewhere in the past and the format looked similar (and the same map image was used) to your site so I thought it existed somewhere on it) as an indicator of your leanings towards Phagman, not that there was anything wrong with that interactive. Sorry if my brain is a bit fried today, I’m trying to fix my messed up sleep schedule by pulling an all nighter.

I’m glad to hear that one mentioned.

I’m hoping to try to re-code that to run on the client-side rather than on a server. I was able to find a javascript-based solver to try to replace it, but it isn’t as good as the python-based one, and I had an academic license for that python-based one at the time, but it has expired. So here’s a link to that site, but it’s not fully functional today.

http://search.howtofixtheelection.com/

1 Like

If you want these utilities to represent not simply the satisfaction of each voter but how much each voter’s satisfaction matters in the context of proportional representation, then I’d suggest making this utility equal to PSI (natural log is simpler and scale invariant but then you have to deal with infinities when such values can be 0) of the unrounded version of the values you are using to determine what ratings voters give to each candidate.

I’m curious about how you feel about the paradoxes that arise from least squares and related optimal methods that result from each vote’s impact on the election being relative to each other vote. These methods all fail the independence of irrelevant ballots (giving every candidate the same rating shouldn’t effect the election result), consistency, and a version of the participation criterion limited to election outcomes that only differ by one candidate. Do you see these violations as paradoxes or do you see them as the correct behavior and if so why?

I’m not sure.

I think these criteria are methods of analysis can give some insight into how voting methods work.

I’m not sure if I can use them to support the motivating ideas of representation, or candidate behavior, or voter behavior.

For the sandbox, aside from adding the proportional utility indicator as an alternative to the vote power one, I have two other suggestions:

  1. For multi-winner elections could you add a setting that makes it so that each possible election outcome gets it’s own color (perhaps the average of the colors of the candidates?) The stripes make it hard to differentiate the boundaries of the different election results.

  2. Could you add at-least one of these three: proportional approval voting, harmonic voting, and/or PSI voting?

I think I can just set a reference utility, kind of like setting a frame of reference in physics.

Also, I came up with an idea of proportionality that seems good. If you cut the voters into groups, then the number of winners from each group should be in proportion to the size of the groups.

1 Like

Yeah, I think I could do that.

1 Like

You mean something like this?