Jump to content

Anti-Harassment Tools/SecurePoll Improvements/Test Results/20 9 5000 1730013084

From mediawiki.org


There is a discrepancy in candidates elected by SecurePoll and OpenSTV due to the way SecurePoll eliminates candidates.

SecurePoll elects candidates 1, 2, 3, 4, 5, 6, 7 and 8, leaving the final seat unfilled.

OpenSTV elects candidates 1, 2, 3, 4, 5, 6, 7, 8 and 19. Candidate 19 was elected at random.

Notice that in the tally page/cli output, candidate 9 is not shown as having any votes transferred to them. But, according to the resultsLog they do (for example). This is due to a) different levels of precision when calculating the amount of votes "earned" vs. "total and b) rounding to 6 decimal places when displaying results.

For example, in round 136 candidate 9 has "earned" 1.2905624009558917E-15 votes but their total is still 82.0. This means they are eliminated at the same time as candidates 10, 11 and 12.

See https://phabricator.wikimedia.org/T289347#7301407 for more details.

This election was created for the purposes of testing precision.

Election setup[edit]

  • Candidates: 20
  • Seats: 9
  • Votes: 5000

Actual results latest[edit]

Output from SecurePoll tally.php: actual

Output from SecurePoll var_export( $this->tallier->resultsLog );: https://github.com/dominic998/SecurePoll-Test-Data/blob/main/test_data/20_9_5000_1730013084.blt.php

SecurePoll tally page: https://vote.wikimedia.beta.wmflabs.org/wiki/Special:SecurePoll/tally/1427 (currently, there is a bug stopping this from being tallied from the UI.)

Actual results archive[edit]



Output from OpenSTV: expected



  • Where you tested: beta and local docker
  • Latest version of SecurePoll tested: 3.0.0 (624ef32) 00:10, 28 September 2021.