Page MenuHomePhabricator

Add Single Transferable Voting with Droop quota method to SecurePoll
Open, MediumPublic

Description

Motivation

To promote more diversity on the WMF Board, we want to use a voting method that allows for better representation of voices of minority groups. The Board Election Committee has decided to use Single Transferable Vote for the upcoming Board election cycle. The quota of choice is going to be Droop quota.

Formula

Step 1: Calculate the number of valid votes. This step will be done once the scrutineers have scratched out invalid votes.

Step 2. Calculate the Droop quota for the election. Given by: floor( valid votes / (number of seats being elected + 1 ) ) + 1
where floor refers to the integer portion of the number in the brackets. See https://en.wikipedia.org/wiki/Floor_and_ceiling_functions for more information.

Step 3. For each "rank" (1, 2, 3, 4 ....):

  • Elect candidates who score more than the Droop quota (hence referred to as Dq).
  • Surplus votes above the Dq are transferred on to the next candidate preferred by those voters.
  • If no candidates reach Dq, the candidate with the lowest votes is eliminated and their votes are transferred to the next candidate preferred by those voters.

Example 1
Example 2
Example 3 -- Good explainer video.

User stories & Requirements
1. As an election admin I should be able to create a poll that will use the Single Transferable vote methodology
  • Election admin should be able to select "Single transferable vote with Droop quota" as a choice of voting method while creating a new election
  • Election admin should be able to enter the number of seats to be elected while creating this type of election
  • Election admin should be able to input candidate names
2. As a voter, I should be able to rank candidates as per my choice in the voting UI for a Single Transferable vote
  • Different voters should be shown candidates in different, randomized orders. The order of candidates should be consistent throughout the voting form.
  • Default option is "Select a candidate". This string is translatable.
  • Voters should be able to sequentially rank the candidates in their order of preference. For example, a voter can select their first, second and third preference but cannot select their first and third preference only. This would result in an error with the message: Preferences must be selected in sequential order. Please pick an option for: 2nd preference, 3rd preference (replace these by the missing preferences).
  • No candidate can be selected twice. Once a candidate has been selected in a dropdown, subsequent dropdowns should show that candidate as disabled. If a candidate is selected twice in non-JS setups, this should result in an error and the form should not submit. The form data will not be lost. Error message: Options can't be selected multiple when ranking. Please change the option for: 2nd preference, 3rd preference (replace these by the duplicate preferences).
  • Voters do not need to mandatorily rank all candidates. They may rank as many candidates as they wish (minimum one).
  • Voters should be able to submit their ranked votes and receive the default confirmation message.
3. As an election admin, I should be able to produce a tallied list of results for an STV election
  • The election result should output the tally of the votes with candidates elected in ranked order.
Mockups
NormalMissing preferences error stateDuplicate preferences error state
image.png (773×450 px, 32 KB)
image.png (900×450 px, 42 KB)
image.png (924×450 px, 42 KB)
Nice-to-have (if time)
  • When a voter submits the vote there should be a confirmation message displaying the ranked list.
Links

Event Timeline

Niharika triaged this task as Medium priority.Apr 24 2021, 2:04 PM
Niharika created this task.
Niharika added a project: AHT-Roadmap.
Niharika moved this task from Product spec to Future on the AHT-Roadmap board.
Niharika moved this task from Future to Now on the AHT-Roadmap board.
Niharika updated the task description. (Show Details)
Niharika renamed this task from Add Single Transferable Voting with Droop quota method to SecurePoll [WIP] to Add Single Transferable Voting with Droop quota method to SecurePoll.May 26 2021, 4:09 PM

Pre-mortem
These are the risks and the mitigation strategies we identified (full notes on Etherpad):

  • Risk: We don’t make the deadline
    • The board uses a third-party provider (e.g. OpaVote)
    • We delay the elections again
  • Risk: The way we are developing the tallying algorithm has technical or performance issues when scaling to 5,000+ votes
    • Change the way we tally: batch the counting, use a database to record intermediate results
    • Run the tallying from a local machine
    • Note: We should have some idea if we can scale the tallying after Anaïs’ patch
  • Risk: The implementation is wrong and gives the wrong results
    • QA tests should mitigate this risk
    • Use a third-party to verify our tally
    • Publish the raw data (anonymised) so others can verify independently
  • Risk: The admins don’t understand the output of the tallying (e.g. resolving ties with a random element)
    • Provide extensive training
    • Walk through pretend elections with test data
  • Risk: Candidates drop out during the election (not currently implemented)
    • Decide if this is a case we want to cover
    • If we have to cover it, we can create a script to run directly against the database
    • We need to log the action for full transparency

In addition to the strategies listed above, we can also delay the tallying to extend our deadline. The voting part of SecurePoll is already working, so if the tallying doesn’t work by the time the board wants to run the election, we can just open the voting and do the tallying separately once we have finished the algorithm.