Tetrud's multiwinner voting method BR simulator

This page contains code (about 900 lines of javascript) for simulating multiwinner elections as described here using "multiwinner Bayesian Regret, 2-stage methodology." Only the simplest possible variant of everything is presently implemented – random numbers as utilities, all candidates and voters honest, and only one "chunk." Also, only comparatively simple voting methods have been implemented – ones that were too hard to code, debug, or too slow, being left for later. Also, it is not made obvious via some sort of documentation, exactly what each voting method really is. Be nice to have a user-input form so you can choose certain parameters to explore, e.g.

  1. Number of voters
  2. Number of candidates
  3. Number of winners (i.e. of seats)
  4. Number of societal-option "chunks"
  5. Number of societal-options
  6. Number of "districts" country is divided into
  7. Which single-winner voting method is used in "second stage"
  8. Which utility generator to use
  9. Which voter-behavior (or mixture of behaviors) to use
  10. Which candidate behavior to use
then it does it – but no such form at present. You have to click "view source" in your browser to see the underlying javascript code. Otherwise (if you have javascript enabled) your browser should now be running the code then printing out the results at the end of this page, which might take 100 seconds or whatever. The numbers it prints are the reciprocals of Bayesian Regrets, i.e, better voting methods have greater numbers. At present, the best method among those implemented seems to be reweighted range voting with 3-member parliament? (Well, not always, it varies from run to run?)

This code was written by Billy Tetrud, a programmer in the CA bay area. It has not been checked nor even fully understood by me (Warren D. Smith) as yet, but I am just reposting it here for storage purposes (version of 13 Nov 2016). It looks like a good start, I'll say that much.

Update: Tetrud has posted a more-recent and more-documented version of his javascript code on github: https://github.com/fresheneesz/elect

And if this work is continued then we will start to turn government design into more of a science and less of a black art. (For example: what is the optimum size for a parliament?) Tetrud has a blog at governology.wordpress.com.