RationalWiki:OpenSTV

From RationalWiki
Jump to navigation Jump to search
I thought this
was supposed to be

RationalWiki
Wigorw.svg
About
Help
RationalMedia Foundation (RMF)
Moderation
Future.gif

RationalWiki uses the open source OpenSTV software for moderator and foundation elections. This guide provides a technical overview of the election process and assists ballot readers in preparing the election results.

Prerequisites[edit]

Install Python 2.7 from python.org.[note 1]

Install OpenSTV 1.7 from github.

Setup OpenSTV locally as follows:

cd openstv-master
python setup.py build
python setup.py install
cd openstv

Open the election booth[edit]

Contact a RationalWiki system administrator, send them the list of candidates, and nicely ask them to open the election booth.[note 2]

Files[edit]

After the system administrator closes the election booth, they transmit a file to the ballot readers that includes the election candidate array and the raw results data. It will look like this:

#$wgElectionCandidates = array("Ace McWicked", "Ariel31459", "Avida
Dollars", "Bongolian", "GrammarCommie", "LeftyGreenMario", "Oxyaena",
"RWRW", "Rationalzombie94", "RightyBlueLuigi", "RipCityLiberal",
"Scream!!", "Spud");

13013 1 12 1 3 6 4 9 2 5 8 13 10 11 7 0
66677 1 13 6 3 0
54654 1 7 8 11 3 6 5 13 10 12 4 9 0
12346 1 8 13 4 6 5 3 12 11 10 9 0
77664 1 13 6 4 5 1 12 3 2 9 11 7 10 8 0
80809 1 12 13 6 4 5 0
[...]

The number at the start of each ballot line identifies the identifier of the voting RationalWiki member (in our example above, this data has been randomized for illustrative purposes).

Preparing the data for OpenSTV[edit]

Create a text file to be used as the input for OpenSTV.[note 3] In this example, we will call this file rw2019mod.blt.

The first line says we have 13 candidates and are electing 8.

The next lines are copied from the raw file above with the first number (the RW user identifier) removed.

Following the last ballot entry, add a line with just "0".

The next lines list the candidates in order as specified from $wgElectionCandidates above.

The last line is a name for the election, in this example, "2019 moderator election".

Running the ballots[edit]

Method:

python runElection.py MeekSTV rw2019mod.blt

Results[edit]

If all goes well, the results should be displayed as follows.

Notes[edit]

  1. Python 2.7.18 (20 April 2020) is the last release of Python 2. OpenSTV does not appear to run on Python 3 without modification, so we're stuck with slowly aging software. If you have a newer Macintosh running on Apple hardware, you're hosed. This setup runs on Intel Macs and Windows machines. Other platforms should be fine as long as you can get Python 2.7 to run.
  2. Only the trusted few with console access to the RW server can do this; moderators and techs cannot.
  3. See stackoverflow for a detailed description of the OpenSTV ballot format.