prefvote

SYNOPSIS

use PrefVote::RankedPairs;

# count votes from a properly-formatted YAML file
my $vote_obj = PrefVote::RankedPairs::file2vote($progname);
$vote_obj->count();

# get results in YAML
print YAML::XS::Dump($vote_obj->result_yaml());

# get results for your own handling
my $results = $vote_obj->results();
... process $results contents ...

DESCRIPTION

PrefVote::RankedPairs implements the Ranked Pairs preference voting algorithm for the PrefVote system. The Ranked Pairs method was created in 1987 by Nicolaus Tideman. Eash voter’s ballot ranks available candidates in order of the voter’s preference. This method compares each pair of candidates by the numbers ofvoter preference, and ranks the candidate pairs in order of strongest wins. The algorithm builds a graph structure of the wins starting with the strongest, locking in each win that does not create a cycle in the graph.

The effect of Ranked Pairs is a Condorcet-compliant voting result in which any candidate who beats all other candidates in pairwise comparisons will be the winner. The graph algorithm also has limited tie-breaking capability beyond the pure Condorcet definition.

All of the PrefVote algorithms have an additional layer of tie-breaking from the Average Choice Rank (ACR) data. Though an average ballot position is a rating which would not alone be approprtiate for elections, when a tie occurs, all other things are equal and so the ACR becomes a useful indicator of the intent of the voters in that scenario.

ATTRIBUTES

These attributes are in addition to those inherited from PrefVote::Core.

METHODS

These methods are in addition to those inherited from PrefVote::Core.

FUNCTIONS

SEE ALSO

PrefVote::Core

Ranked Pairs voting method on Wikipedia https://en.wikipedia.org/wiki/Ranked_pairs

PrefVote on GitHub https://github.com/ikluft/prefvote

BUGS AND LIMITATIONS

Please report bugs via GitHub at https://github.com/ikluft/prefvote/issues

Patches and enhancements may be submitted via a pull request at https://github.com/ikluft/prefvote/pulls