Reweighted range voting: Difference between revisions

Saving off the explanation of User:Fsargent's example so far. I need to get to other things right now.
(Some light copyediting of User:Fsargent's work (and earlier work), and noting that the example User:Fsargent isn't (yet) clear to me, but I haven't tried too hard to interpret it.)
(Saving off the explanation of User:Fsargent's example so far. I need to get to other things right now.)
Line 36:
 
==Example code==
Below is some example code, written in [[W:Python (programming language)|Python]] and posted by [[User:Fsargent]]:
 
<syntaxhighlight lang="python" line="">
Line 76:
</syntaxhighlight>
 
Here is the output of the script when executed:
Additionally, here's some sample data posted by [[User:Fsargent]]:
<syntaxhighlight lang="python" line="">
Red 18.0
Line 102:
dtype: float64
['Red', 'Yellow', 'Blue', 'Green']
</syntaxhighlight>The example illustrates the order in which the four candidates are seated (<code>'Red'</code>, then <code>'Yellow'</code>, then <code>'Blue'</code>, then <code>'Green'</code>). After reordering to cluster similar voters, the ballots may be expressed as [[ABIF]] as follows:
</syntaxhighlight>It is unclear to [[User:RobLa]] what this example is supposed to show, but he may look more carefully at the example later.
 
<syntaxhighlight>
1: [Red]/5 = [Blue]/5 > [Yellow]/3 > [Green]/0
2: [Red]/5 = [Blue]/4 > [Yellow]/0 = [Green]/0
1: [Yellow]/5 > [Green]/0 = [Blue]/0 = [Red]/0
1: [Yellow]/4 > [Blue]/3 > [Green]/2 > [Red]/1
1: [Yellow]/2 > [Red]/1 > [Green]/0 = [Blue]/0
1: [Green]/5 > [Blue]/1 > [Red]/0 = [Yellow]/0
1: [Green]/3 > [Red]/1 = [Blue]/1 > [Yellow]/0
 
</syntaxhighlight><code>'Red'</code> and <code>'Blue'</code>are tied in the first round, with scores of "<code>18.0</code>". Because of the tie, the software arbitrarily chooses <code>'Red'</code>(though <code>'Blue'</code> may be arbitrarily chosen with the method in a different software implementation). After that, [[User:RobLa]] gets lost (as of April 2022), so someone else is going to have to explain how <code>'Blue'</code> falls behind <code>'Yellow'</code> in reweighted ballots of the second round.
 
==Related systems ==