Coder Social home page Coder Social logo

brainbuz / vote-count Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 2.0 824 KB

A toolkit for alternative voting methods. Initially to support Rankled and Range Ballots for IRV, Boorda, and Pairwise/Condorcet. Future support planned Multi-member methods.

Perl 99.93% Raku 0.07%
condorcet irv rcv vote ballot boorda

vote-count's People

Contributors

brainbuz avatar manwar avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

manwar endolith

vote-count's Issues

Minor Enhancements

TopCount: precision rounding of totals on range ballots, add an attribute to override default of 3.
Approval: add support for Neutral Preference Indicators.

Install Issues on Strawberry Perl

cpanm fails on Strawberry 5.30, due to
Your vendor has not defined Fcntl macro O_SYNC, used at lib/Test2/Harness/Util/File/Stream.pm line 70
Test2::Harness can be force installed and Vote::Count will install.

Installing Vote::Count was also observed to pull in an older release for Vote::Count::Range.

Implement Tie Breaker by Precedence List

Many real world election rules call for Random as a Tie Breaker. Because this can cause the results to change between iterations Vote::Count will never support or implement Random as a Tie Breaker. To support rules that call for this method Vote::Count will allow them to pre-determine a tie-breaker precedence list. The highest choice on the list will win all ties, the bottom choice will lose all ties.

Implement SSD and Kemmeny Young

There are other libraries implementing these methods. They could be used as a working example of the logic or they could be wrapped up using FFI or XS. The downside is creating a dependency on an external language for non-C libraries. There are also a few libraries on CPAN that could be used as dependencies. VoteFair popularity ranking claims to be mathematically equivalent to Kemmeny Young, Voting::Condorcet::RankedPairs implements the Tiedemann Ranked Pairs Method, but this is less important as it hasn't been a popular method.

The volunteer working on this task will need to review the existing libraries, and either wrap/adapt them to work with Vote::Count or rewrite them as Methods in Vote::Count.

Rounding in Floor

Modify the Floor Role provide a choice of conventional decimal rounding, round up and round down.
Modify TCA to allow a different threshold than 1/2.

Spelling errors

The "About" section for brainbuz/Vote-Count says:

A toolkit for alternative voting methods. Initially to support Rankled and Range Ballots for IRV, Boorda, and Pairwise/Condorcet. Future support planned Multi-member methods.

Those are cute misspellings of "Borda" and "Ranked" if you're trying to make fun of those methods, but are bad for SEO. If you want people to find this library, you should probably spell the methods properly. There's also a spot where "Kemeny" is misspelled which should also be fixed.

some pod links are broken

some of the pod links on metacpan are broken. For example in the main module page the link to the Catalog is not found.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.