Optimal Voting Package
This package allows the application of standard optimization techniques to voting rule design. Existing approaches of using neural networks to develop optimized voting rules have been critiqued due to their lack of interpretability. This package allows optimizing interpretable classes of voting rule such as positional scoring rules where simply looking at the score vector provides intuition about the rule itself.
The package aims to support a wide range of existing and user-specifiable optimization targets, as well as several classes of voting rule.
Possible optimization targets:
- common utility functions (current):
- Utilitarian
- Nash
- Egalitarian/Rawlsian
- Malfare
- measures of distortion
- axiom violation rate (https://arxiv.org/abs/2508.06454)
- ranking consistency (https://arxiv.org/abs/2508.17177)
Optimizable rule types:
- positional scoring rules (current)
- probabilistic positional scoring rules (soon)
- functions of (weighted) tournaments, i.e., C2 rules (soon)
- sequential rules, i.e., Instant-Runoff Voting (soon)
- sequential Thiele rules (eventual)
- Thiele rules (perhaps)
Optimization techniques:
- simulated annealing: due to ease-of-use across domains this is intended to be the primary optimization method
- gradient descent: partially implemented at the moment. Early experiments show that this results in outcomes of a similar quality to simulated annealing but requires more compute. The eventual goal is to support GD with Torch and Jax but annealing is likely to remain preferable.
Proper documentation will be developed as the package matures. A rough overview of package use is:
- Generate preference profile(s) empirically or by sampling one or more distributions.
- (Optional) generate utilities corresponding to the preference profiles.
- Select an optimization target (i.e., egalitarian social welfare).
- Send profiles, utilities, target to Optimal-Voting.
- Optimal-Voting returns a positional scoring vector which maximizes egalitarian social welfare on the provided profiles.
NOTE: At the moment, the package is in active development. Changes that break compatibilty should be expected.
If you are interested in using the package or have suggestions for possible features you are encouraged to reach out at BenArmstrong dot ca
Metadata
Release files for optimal-voting 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| optimal_voting-0.1.0.tar.gz | 26.9 kB | Without provenance | Details for optimal_voting-0.1.0.tar.gz |
Release files / optimal_voting-0.1.0.tar.gz
| Download URL | optimal_voting-0.1.0.tar.gz |
|---|---|
| Size | 26.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
00ba6a5394092bd945ca71a638987adbbe0b7d4522dc3ba7042d18f5a6bbd22c
|
|
BLAKE2b-256 checksum How to use checksums |
8e39fd9519a223a1fa28e60b40a06e3a6dc76d760e01725b9f04cc23d119e21a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.6
|
Security for optimal-voting 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.