nathanllww / slivka-irv

MIT License
1 stars 0 forks source link

Failing Uncontested Election #15

Closed abugler closed 2 years ago

abugler commented 2 years ago

IRV fails when the election is uncontested. See branch https://github.com/nathanllww/slivka-irv/tree/test_case for the new test case.

nathanllww commented 2 years ago

This issue was actually much broader and problematic, so I'll include here what it was. Essentially, if only one candidate remained, IRV did not recompute tallies. This lead to systems like "a; b,a" being marked as no confidence even when a should win. The fix is thus somewhat straightforward: when we've eliminated all but one candidate, compute tallies one final time before declaring a winner.

Thanks for catching this, seems it could have affected a wide number of elections.