Condorcet PHP: Difference between revisions

From electowiki
Content added Content deleted
m (Fix <br>)
m (Adds internal links)
Line 5: Line 5:


== Voting methods included natively ==
== Voting methods included natively ==
As of July 2022, the application is provided natively with 22 different voting methods (+ some options allowing variants). Most of them are "[[Single-member district|single winner]]" methods although a complete ranking is usually provided, it also includes proportional methods, (STV, CPO-STV, Largest remainder, Highest Average....).
As of July 2022, the application is provided natively with 22 different voting methods (+ some options allowing variants). Most of them are "[[Single-member district|single winner]]" methods although a complete ranking is usually provided, it also includes [[Proportional representation|proportional methods]], ''([[Single transferable vote|STV]], [[CPO-STV]], [[Largest remainder method|Largest remainder]], [[Highest averages method|Highest Average]]....)''.
The full list is available on [https://github.com/julien-boudry/Condorcet/blob/master/VOTING_METHODS.md the documentation].
The full list is available on [https://github.com/julien-boudry/Condorcet/blob/master/VOTING_METHODS.md '''the documentation'''].


As input, the ballots are in the form of candidate rankings which allows the implementation of all [[Preferential voting|preferential voting methods]] but does not allow methods like [[Majority Judgment|majority judgment]]. However, by extension, it allows the inclusion of methods like [[First Past the Post electoral system|FTPT]] which is included natively, the implementation choice being then to keep only the first expressed rank (without ties).
As input, the ballots are in the form of candidate rankings which allows the implementation of all [[Preferential voting|preferential voting methods]] but does not allow methods like [[Majority Judgment|majority judgment]]. However, by extension, it allows the inclusion of methods like [[First Past the Post electoral system|FTPT]] which is included natively, the implementation choice being then to keep only the first expressed rank (without ties).

Revision as of 14:37, 2 July 2022

Condorcet PHP is a command-line application and a software library written in PHP8 and distributed open-source. It is designed to manage and compute an election (candidates, votes, results) with many options, and natively implements many voting methods.
Its interface is designed to offer both high-level methods: simple to understand and use. As well as more technical approaches allowing numerous settings and extensions.

Condorcet PHP is designed to work with good performances, but especially quasi-linear performances, allowing to manage billions of votes on a small machine. It is also suitable for use in simulations and other statistical work, thanks to full computational details for each voting method. The performance and the rich API make vote manipulation fast and easy.

Voting methods included natively

As of July 2022, the application is provided natively with 22 different voting methods (+ some options allowing variants). Most of them are "single winner" methods although a complete ranking is usually provided, it also includes proportional methods, (STV, CPO-STV, Largest remainder, Highest Average....). The full list is available on the documentation.

As input, the ballots are in the form of candidate rankings which allows the implementation of all preferential voting methods but does not allow methods like majority judgment. However, by extension, it allows the inclusion of methods like FTPT which is included natively, the implementation choice being then to keep only the first expressed rank (without ties).

Condorcet PHP distinguishes itself from most software by its ability to take equalities on ranks on the input, and also as output equalities on a rank rather than an arbitrary choice on the results. This last statement must however be completed by the specificities and the documentation of each method.

Two versions for two different types of user

  • Usage as a command-line application allows usage without complicated technical skills, in particular thanks to the official Docker image, but not strictly as simple as a traditional or web application.
  • Usage as a software library gives access to much more complete parameterization and management, with different levels of abstraction. The modular and open architecture allows the creation of additional voting methods, custom validation methods, or extends the source code.

Advanced or original features

  • Vote weight management, allowing to give more weight to one or more votes
  • Management of tags and metadata on a vote, then sort, delete, and use them
  • Management of ties on ballots, and in results (for compatible methods)
  • Constraint management (ignore votes that don't meet the criteria. For example, prohibit ties on a rank).
  • Implicit interpretation of votes (unspecified candidates are assumed to be tied on the last row) or explicit (unspecified candidates on a ballot are ignored).
  • Details of calculations for each voting method
  • Ballot management in technical formats (objects, array, Json...) or user-friendly formats.
  • Export of results in technical (objects, array, Json) or user-friendly formats.
  • Compatibility with election description for import Condorcet Election Format, David Hill Format, Debian Format
  • Export of an election in standard Condorcet Election Format
  • Ability to compute billions of votes with domestic hardware.
  • Compatibility with the Condorcet Election Format (import/export), David Hill Format (import), and Debian Format (import).

External Links