Equal-Vote / starpy

Python implementation of the STAR Voting system
https://www.starvoting.org/
BSD 3-Clause "New" or "Revised" License
8 stars 4 forks source link

re-fresh our solution using Larry's code as foundation / starting point #26

Open masiarek opened 1 year ago

masiarek commented 1 year ago

Larry's solution is so much superior to our current solution (not only resolving fractions - see https://github.com/Equal-Vote/starpy/issues/23 - but multiple other improvements - e.g. well organized test cases in separate files with relevant parameters / settings / configurations ).

Therefore, I propose to request Larry's permission to refresh our STARPY solution using Larry's code as a foundation.

Obviously we would have to:

Larry's code: https://github.com/larryhastings/starvote.

licensed using the MIT license https://github.com/larryhastings/starvote/blob/master/LICENSE

mikefranze commented 1 year ago

His code is good and has a lot that I'd like to implement like removing dependencies and using fractions, but I think one major goal of this library is to be as readable as possible(not saying ours is but that's the goal) in order to be a good algorithm reference for developing other libraries and for others to read and understand how tabulation works. While I'm not a python dev I felt like I had to dig through a lot of decorators and functions just to get to the algorithm. It also uses the full ballot data throughout the tabulation where we calculate the sums/matrices first and use that for tabulation.

I think we'll get closer to where we want to end up by keeping our current code base and updating it.