README.md for the code used in the paper Stable Voting by W. Holliday and E. Pacuit.
The notebooks use the Python package pref_voting
. Consult https://pref-voting.readthedocs.io/ for an overview of this package.
-
01-StableVoting.ipynb: This notebook contains the code to run Simple Stable Voting and Stable Voting, and some illustrative examples not discussed in the paper.
-
02-StableVotingExamples.ipynb: This notebook discusses the examples from the paper, including the real elections (the ballots for these elections is available and find the winnners in real elections from preflib.org (the election data is available in preflib-data/).
-
03-RunningTimes.ipynb: Graphs comparing the running times of Simple Stable Voting and Stable Voting.
-
04-StableVoting_Julia.ipynb: An implementation of Stable Voting and other voting methods mentioned in the paper in Julia used to produce the irresoluteness and monotonicity violations graphs.
-
05-CreateGraphs.ipynb: An implementation of Stable Voting and other voting methods mentioned in the paper in Julia used to produce the irresoluteness and monotonicity violations graphs.
-
preflib-data/: Data from preflib.org of actual elections discussed in the paper.
-
data/: CSV files containing data for the percent multiple winner graphs, monotonicity violation graphs, and the graphs comparing the running times of Simple Stable Voting and Stable Voting.
The code for notebooks 01-03 is written in Python 3. The code for notebook 04 is written in Julia.
- pref_voting: Preferential Voting Tools
- The notebooks and the pref_voting library is built around a full SciPy stack: MatPlotLib, Numpy, Pandas, numba, networkx, and tabulate
- tqdm.notebook
- seaborn
- multiprocess (only needed if running the simulations in 05-ProbabilisticStabilityWinners.ipynb)
- PrefLibTools (for analyzing the elections)