@@ 0,0 1,19 @@
+Copyright (c) 2021 <firstname.lastname@example.org>
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
@@ 0,0 1,133 @@
+This is a simple implementation of a post on r/EndTPTP. The poposal suggested
+a modification of STAR to address some percieved deficiences.
+In this repository is an implementation of the proposal, plus two sets of
+input data to test it with.
+Using the example data in the repository:
+10235(hg:default)» go run main.go < input-1.csv ~/workspace/sbb
+Total votes in input: 15
+Summary of distributions
+# A B C
+7 5 4 0
+5 0 1 5
+2 4 1 5
+1 0 5 1
+# A B C
+ 43 40 36
+Winner by score: A with 43
+Summary of diffs
+# A B C
+7 0 -5 -5
+6 0 5 5
+2 0 -5 5
+# A B C
+ 0 -15 5
+# A B C
+ 43 25 41
+Highest combined total: A with 43
+As in the comments in the thread, if the voter who voted 0,5,1 changes their score to 0,5,4 then it tips the balance and the vote goes to candidate C:
+# A B C
+ 43 25 44
+Highest combined total: C with 44
+You need [go](https://golang.org) installed. You can either `go get` to build a binary or
+`go run` the project.
+go get hg.sr.ht/~ser/score-better-balance
+You'll get a program called `sbb` in your `$GOPATH/bin`, usually
+`~/go/bin`. Alternatively, check out the repository and run it on the
+hg clone https://hg.sr.ht/~ser/score-better-balance
+go run . < input-1.csv
+There are no arguments. It reads data from the command line, and the data
+it expects is CSV with one vote per line and no header. For example, two
+people voting between three candidates would have two lines:
+Voter 1 scores candidate A 5, candidate B 4, and candidate C 0. Voter 2
+scored A 4, B 1, and C 5.
+Two data files are included, both examples from the comments. `input-1.csv`
+is the base case; `input-2.csv` differs only in a single vote.
+The original post was made by [u/jan_kasimir on 2020-02-13](https://www.reddit.com/r/EndFPTP/comments/lil4zz/scorebetterbalance_a_proposal_to_fix_some/).
+> On top of score, STAR voting adds an incentive to differentiate between
+> candidates, so that it does not reduce to approval voting. However in
+> doing so it adds two problems.
+> 1. The runoff part is not clone proof. If the score winner runs a clone
+> candidate, then all of STARs incentive falls apart. It can also lead to
+> some strange cases where one could vote tactically to get your second
+> favorite into the runoff (instead of your favorite) because they are more
+> likely to beat the other candidate you like less.
+> 2. The runoff step is purely majoritarian. One great thing about score is
+> that it can find a candidate that most voters are okay with, outside of
+> two conflicting camps.
+> Still I think it's only slightly more complicated than STAR and still
+> with only one recount of the ballots. In a way, it does the runoff step
+> backwards. The working name is **score-better-balance**, after the three
+> steps it uses.
+> 1. Step one: **score** each candidate on a scale 0 to 5. Pick the candidate
+> with the highest score (in the following called "A").
+> 2. Recount the ballots. Give one point to each candidate that's rated
+> **better** than A. This gives a list of candidates that would beat A in
+> a head to head runoff ("B").
+> 3. To determine the winner use a combination of score and preference. For
+> each Bn calculate the difference in votes (V) of A and B and subtract the
+> difference in score > (S) to A, divided by maximum score (r). V(BA)-V(AB)
+> - (S(A)-S(B))/r. If any of B has a positive **balance**, the biggest
+> balance wins, otherwise A wins.
+u/Drachefly offered a [simplified description](https://www.reddit.com/r/EndFPTP/comments/lil4zz/scorebetterbalance_a_proposal_to_fix_some/gnbm240?utm_source=share&utm_medium=web2x&context=3).
+> I think the easier way to understand the formula is to multiply by r (the range). Then the method turns into:
+> 1. get the score leader
+> 2. alter every ballot to give everyone above the score leader +r points
+> and everyone below the score leader -r points (allowing going out of
+> normal range)
+> 3. new high score wins.