TL;DR at the bottom:
OK, so I reviewed the clip. I think TTV’s script to check the ranked choice votes might be wrong. I think it is buggy because it is prematurely terminating in an if-statement loop, but I’d need to review the code to be sure. I think this is the case based on my logic below – someone please correct me if I’m wrong:
For the sake of simplicity, let’s reduce the complexity of the problem. Assume all voters of Entry 4 voted for Entry 2.
The votes go from:
- 30%
- 30%
- 24%
- 16%
to:
- 30%
- 46%
- 16%
For now, observe that none of them have reached the majority yet (50% threshold). Entry 2 only needs >4% of the counted proportioned votes to cinch the win.
What happened here? In eliminating 4, we moved all of its votes to the next best entry. The total number of votes in this pool has increased. This also means that if we need another round, then we can also discount all ranked choices in second and third preferences for Entry 4. This means we’d expect all remaining votes for second and third preferences to be split between 1,2,3.
However, observe that none of the votes in this simplified version have reached majority. An entirely new elimination round is needed.
Ok, now pause for a moment. We know that we need one more set of eliminations to determine the winning moc. So we repeat the above. In eliminating 3, then that means we should expect all remaining votes to be divided between 1 and 2. We can disregard all entry 3 votes in the second and third choice selections.
Observe again that this effectively reduces the problem to granting the same weight to each category of choices between entries 1 and 2 across all three preferences. Ergo, in summing the selections for preferences 1,2, and 3, only entries 1 and 2 matter.
Now back up to our non-simplified, real situation. Recall that the totals in this scenario were as follows:
Entry 1: 320
Entry 2: 317
Considering the fact that only the totals between entries 1 and 2 matter across all three preferences, in the final round of elininations, then we should have expected to see this result. But we didn’t, and I think I know why.
If the code re-counts a vote from an eliminated entry and checks the percentage within the same loop, then if it increments the total number of votes at the same time as it counts either Entry 1 or Entry 2, then we expect the following running proportions:
EITHER:
(Entry_1 + 1)/(total_vote + 1)
or
(Entry_2 + 1)/(total_vote + 1)
The pseudocode for this scenario would look something like:
for vote in reallocated_votes:
—> reallocate(vote)
—> for entry in entries:
—>—> if entry.get(“proportion”) > 50%:
—>—>—> return entry.get(“entry_number”)
BUT THIS IS WRONG!
The proper method to do this would be to assess all votes for the remaining 24% in entirety. Why? Because in close races, then the ordering of the counted reallocated votes can falsely determine the outcome if it’s based on a running proportion. Just think about how wildly percentage points change in actual elections, and how in close races every vote must be counted (and often triggering recounts).
To illustrate, say that we are stuck in the following scenario:
Owl: 4 votes (40%)
Lion: 4 votes (40%)
TO REALLOCATE >>> Turtle: 2 (20%)
Let’s assume that both voters for Turtle were evenly split between Owl and Lion. The possible sets of votes look like [O, L] or [L, O]
If we go by the pseudocode above, then the first set would yield a win for Owl. OWL → [4+1]/[8+1] vs LION → [4]/[8+1]
The second would yield a win for Lion. Same deal but reversed: OWL-> [4]/[8+1] vs LION-> [4+1]/[8+1]. But really the results should be indeterminate.
Why is this problematic? If the code uses the pseudocode I describe above, then it will always show the wrong answer if the sets are decided on arbitrary ordering (like… who voted first or whose username is first alphanumerically) if it does not complete the reallocation round first.
So again, the proper method to do this would be to assess all votes for the remaining reallocation round in entirety, and I don’t think that’s what happened.
TL;DR:
The script needs to be audited. If all votes were legitimate and there were no duplicates, then it is probably incorrectly comparing proportioned totals on a running basis (ie. not completed).