cjerdonek / formal-rcv

Formal specifications of ranked choice voting and related developments
BSD 3-Clause "New" or "Revised" License
2 stars 0 forks source link

Write implementation that explores all possible election paths, depending on tie breaker results #16

Open jldodds opened 8 years ago

jldodds commented 8 years ago

This will allow us to take note of elections where tiebreaks were inconsequential

cjerdonek commented 8 years ago

By the way, how are you currently resolving tie-breaks? I think one simple API / approach to use for now would be to accept as input an ordered list of the candidates that would be used to break ties. For example, it would eliminate indeterminism in testing and the need to stop tests for user input, etc.

jldodds commented 8 years ago

Currently the spec is completely non-deterministic about this. That is, it specifies who might be a winner of an election, saying nothing about probabilities. We could do the latter, but it would be significantly more work.

The implementation is parametric over a tie breaking function, a function from a list of candidates to a single candidate. For the sake of testing, the tie-break function could certainly be of the sort you mentioned. I believe you have something along these lines specified in your JSON tests

cjerdonek commented 8 years ago

Thanks. How does the SF implementation currently operate (i.e. what tie-breaking function are you currently using)?

jldodds commented 8 years ago

The only place this is currently meaningful is in the test harness that @robdockins wrote for the actual election data. You can see his tie break function in this file where the tie break function uses a random trie. This functionality is not exercised in any of our current tests though.

cjerdonek commented 8 years ago

Great, thanks for the info and pointer.