Interfaces

interface ballotbox.iballot.IBallotBox
get_winner(self)

Determine the winner, if one exists.

This is a wrapper for the mehtod of the same name on the IVotingMethod implementation class.

add_vote(self, vote)

Add a single vote at a time.

The parameter ‘vote’ can be either a single string representing a candidate, or a dictionary representing a set of preferences cast by a single voter.

method

The voting methodology used (a *Voting instance)

add_votes(self, vote, count)

For a unique vote, add the number of times it was voted for.

get_total_votes(self)

Count all otes cast for all candidates.

batch_votes(self, votes)

This method differs from the add_votes method in that there is more than one vote being cast, each with potentially many vote counts.

The parameter ‘votes’ should be a list of tuples:
[(vote1, count1), (vote2, count2), ... (voten, countn)]
interface ballotbox.criteria.ICriterion

The base interface for all criteria.

interface ballotbox.criteria.IMajorityCriterion

Extends: ballotbox.criteria.ICriterion

The majority criterion is a single-winner voting system criterion, used to compare such systems. The criterion states that “if one candidate is preferred by a majority (more than 50%) of voters, then that candidate must win”.

Some methods that comply with this criterion include any Condorcet method, instant-runoff voting, and Bucklin voting.

Some methods which give weight to preference strength fail the majority criterion, while others pass it. Thus the Borda count and range voting fail the majority criterion, while the Majority judgment passes it. The application of the majority criterion to methods which cannot provide a full ranking, such as approval voting, is disputed.

These methods that fail the majority criterion may offer a strategic incentive to voters to bullet vote, i.e., vote for one candidate only, not providing any information about their possible support for other candidates, since, with such methods, these additional votes may aid their less-preferred.

interface ballotbox.criteria.IMajorityLoserCriterion

Extends: ballotbox.criteria.ICriterion

The majority loser criterion is a criterion to evaluate single-winner voting systems. The criterion states that if a majority of voters prefers every other candidate over a given candidate, then that candidate must not win.

Either of the Condorcet loser criterion or the mutual majority criterion imply the majority loser criterion. However, the Condorcet criterion does not imply the majority loser criterion. Neither does the majority criterion imply the majority loser criterion.

Methods that comply with this criterion include Schulze, Ranked Pairs, Kemeny-Young, Nanson, Baldwin, Coombs, Borda, Bucklin, instant-runoff voting, contingent voting, and anti-plurality voting.

Methods that do not comply with this criterion include plurality, MiniMax, Sri Lankan contingent voting, supplementary voting, approval voting, and range voting.

interface ballotbox.criteria.IMutualMajorityCriterion

Extends: ballotbox.criteria.IMajorityCriterion, ballotbox.criteria.IMajorityLoserCriterion

The mutual majority criterion is a criterion used to compare voting systems. It is also known as the majority criterion for solid coalitions and the generalized majority criterion. The criterion states: If there is a subset S of the candidates such that more than half of the voters strictly prefer every member of S to every candidate outside of S, and this majority votes sincerely, then the winner must come from S. This is similar to but more strict than the majority criterion, where the requirement applies only to the case that S contains a single candidate.

Methods that pass: The Schulze method, ranked pairs, instant-runoff voting, Nanson’s method, Bucklin voting.

Methods that fail: plurality, approval voting, range voting, the Borda count, minimax.

Previous topic

API Documentation

Next topic

Ballot

This Page