julien-boudry / Condorcet

Command line application and PHP library, providing an election engine with a high-level interface. Native support 20+ voting methods, easy to extend. Support simple elections with ease or billions of votes in low resource environment. Intensively tested and highly polyvalent.
https://www.condorcet.io
MIT License
119 stars 11 forks source link

Add multi-winner methods, such as STV, Schulze STV, CPO-STV... #30

Closed lordlouckster closed 3 years ago

lordlouckster commented 3 years ago

With that, a new command line parameter called --seats, assigned a numerical value telling the number of seats.

julien-boudry commented 3 years ago

I thought about it too, because from what I understand, most of these methods would not require any modification of the input API. Potentially supplements to the results API, but in a fairly manageable way.

On the other hand, I have not found such a simple document describing these methods in detail. Ideally with pseudo-codes. And also examples of results allowing me to test the validity of those I will compute. The mathematical formulas also seem more complex and heavy.

In short, if you have such examples, leads, priorities ... I could be interested in the subject again.

julien-boudry commented 3 years ago

Even if they are not really multi-winners methods. All existing method (except Basic Condorcet) implements a full ranking as a result and statistics specifics for each one. You can also get a simple version of it from the command line application. Is not the same thing, but can be useful if you just looking for a ranking and some numbers.

lordlouckster commented 3 years ago

I was also going to suggest d'Hondt's method, Sainte-Laguë, and other kinds of proportional representations, but parties would be hard to implement and probably going to require modification of APIs.

julien-boudry commented 3 years ago

In a fairly simple way with very few API changes, most likely without party management.

julien-boudry commented 3 years ago

The release is imminent with only STV and simples quotas. Without party support. that will be really more complicated, but it can be more easily emulated on the client-side. Differents quotas support on the CLI tools is not yet supported yet.

Others methods are much more complicated to implement (CPO, Schulze STV). The internal API is ready. But they are very fat to understand, to code, then to test. And sometimes have some blind spots, for example, Schulze is a daft.

julien-boudry commented 3 years ago

STV release with 3.1