Bottom Two Runoff (Condorcet IRV hybrid)
-
@andy-dienes They are certainly pretty simple in Javascript, but I did spend some time trying to make clean classes that would be flexible for a lot of things, not just tabulation itself. I like things that run in a browser, especially if it can be done in a coding playground like Codepen. It makes it so much easier to share.
Perfect example is the giant clusterf**k that was the vote for the domain of this forum. It was only like 12 people voting and we had to wait weeks for someone to deliver us the STAR voting results, which were completely wrong and started a big ugly situation. Sad that a group like this has so much trouble with a simple vote.
The harder part is integrating them into things that can visualize results and whatnot. (the graphical and interactive stuff being more my wheelhouse) I mean that isn't really hard hard, but no one has really done it well in my opinion. Or if they've done something, they do it in something that requires a ton of setup and downloading repos and such and they you can't even make it work in a web page.
My nephew (name Julian, coincidentally) is hardcore into Julia and sings its praises a lot.
-
@rb-j said in Bottom Two Runoff (Condorcet IRV hybrid):
I can send you files, but I think you can get if from wayback:
Got it, perfect.... thanks!
For others interested, it is about 9000 lines that look like this (there's some extra fluff I removed):
C01,C03,C02
C01,C04
C01,C02,C04,C05,C03
C01,C02
C01,C02,C05,C04,C03
C01,C02
C01,C02
C01,C02,C04
C01,C02,C04,C05,C03
C01,C05,C04,C02
C01,C04,C02,C05
C01,C02,C04
C01,C02,C03,C04,C05
C01,C02,C04,C05,C03and where the candidates are defined as:
C01, "Bob Kiss"
C02, "Andy Montroll"
C03, "James Simpson"
C04, "Dan Smith"
C05, "Kurt Wright"
C06, "Write-in"I'll clean it up and have it in a codepen that others can play with. I think I can trim it down to about a tenth the size or less by combining duplicates, something like this:
bk: Bob Kiss
am: Andy Montroll
js: James Simpson
ds: Dan Smith
kw: Kurt Wright
x: (write in)345: bk>am>ds>kw
280: kw>bk>ds
120: ds>bketc
-
it is about 9000 lines that look like this (there's some extra fluff I removed):
If you want results to be consistent with the City Clerk's report, you need to use the Kiss pile, the Wright pile, and the Exhausted ballot pile but remove the first four ballots from the Exhausted ballot pile. Those were never counted. You want exactly the same 8976 ballots that the City Clerk counted to at least one of those six candidates (counting Combined Write-In as one of the six).
-
@andy-dienes said in Bottom Two Runoff (Condorcet IRV hybrid):
in Julia
Interesting, I hadn't made Julia's acquaintance. Once I finish my current project, I should probably be able to translate any working Julia code by hand into equivalent JS. It will help if it isn't using higher precision integers or floats than what can be represented in IEEE floating point. One of the readers of this forum said he is using the browser Waterfox Classic, which does not support JS' new long integers.
-
@rb-j said in Bottom Two Runoff (Condorcet IRV hybrid):
If you want results to be consistent with the City Clerk's report,
Cool thanks I'll do that.
@jack-waugh said in Bottom Two Runoff (Condorcet IRV hybrid):
It will help if it isn't using higher precision integers or floats than what can be represented in IEEE floating point
I can't imagine floating point precision making a difference unless you are doing something really weird. I prefer avoid all floating point math in tabulation methods, or at the least define them in ways that floating point math isn't necessary. (javascript uses floating point even for operations that could be pure integer, such as counting, but I can't remember where it has ever been a problem in anything I've done except when converting a number to a human readable string)
-
I have to say I am intrigued with the idea of marketing IRV Bottom-two Runoff. If it weren't for marketing concerns, I would want to perturb it further to make it balanced and pairwise additive, but that would throw away the possibility of getting IRV-Hare enthusiasts to accept it.
-
@jack-waugh said in Bottom Two Runoff (Condorcet IRV hybrid):
I have to say I am intrigued with the idea of marketing IRV Bottom-two Runoff.
Awesome. Maybe all the time I've spent on this forum in the past week hasn't been entirely wasted.
-
-
@rob, you said you think that whether equal ranking is permitted is an "implementation detail". But I wouldn't be surprised if RCV IRV Hare enthusiasts were to refuse to allow equal ranking. Anyway, they are refusing bottom-two runoff even without equal ranking, as the tweet I cite above argues against it and comes from whoever controls the Twitter account "fairvote".
-
@jack-waugh I'm saying that, if equal ranking is allowed, it doesn't make it a different method. It is just one variation of the same method. Note that the Electowiki page for IRV mentions the possibility of equal ranking, and here is a (very short) discussion of equal rank IRV: https://www.reddit.com/r/EndFPTP/comments/dgzf5k/what_are_the_shortcomings_of_equalrank_irv/
I'm not speaking of the practical issue of whether Fairvote or RCV IRV Hare enthusiasts will allow it, whether voting machines can deal with it, whether it is allowed under some specific legislation, etc. That's a different issue.
I imagine the best way to handle equal rankings would be to count fractional votes. (I will need to implement it so I can process cardinal ballots as IRV-Hare and IRV-BTR)
-
Untested, draft code for tallying RCV-IRV-B2R: tally.mjs
-
@rob said in Bottom Two Runoff (Condorcet IRV hybrid):
I will need to implement it so I can process cardinal ballots as IRV-Hare and IRV-BTR
naive_strict_ranking.mjs is an untested draft for converting affinities (same form as so-called "cardinal" ballots) into ranking ballots. The assumption underlying my design of the code is that equal-ranking is forbidden except for the sludge at the bottom.
-
This post is deleted! -
This post is deleted! -
For simulations and small elections in particular, it's in my opinion important to understand the corner cases that can arise in Bottom-Two Runoff, and decide how the outcome should be determined. One reason to think this way is to make sure that the tallying algorithm is deterministic. A deterministic algorithm will make all experiments repeatable, that are based on applying the algorithm to a given set of example data.
I posted an algorithm or two in here, but it or they were wrong.
-
This post is deleted! -
This post is deleted! -
This post is deleted! -
I have advanced the code from where it was crashing every time to where it gives wrong answers, so that's progress.