Ballot file CSV
Choose one of these:
This simulator visualises how the counting process works step-by-step, for Instant-runoff voting (called preferential voting in Australia), as it's used for the House of Representatives in Australian federal elections. It implements the rules as specified in the Electoral Act 1918 (Cth) s274.
To start a new simulation, upload a ballot CSV file. The file must contain a header row with the names of the candidates, and then a row representing each ballot, with a given ballot containing votes from 1 to x (where x is the number of candidates) for all candidates.
Alternatively, click on a "Choose one of these:" button to begin a simulation using one of the built-in sample ballot files.
All ballots start in the "Undistributed" pile. Once the ballots are loaded, the "Run round 1" button will appear. Click that button to run the first round of ballot distribution.
If there's a winner after distributing ballots for a given round, then a winner is declared and the simulation ends. Otherwise, click "Run round x" to eliminate the loser for the current round, and to distribute ballots for the next round. This continues until a single candidate's pile contains more than half of all the ballots.
To run the simulation again, upload or choose another ballot file.
There are other tools around that do basically the same thing as this simulator. Kudos to the authors of those tools. However, they only output a text log or a text-based table, they don't provide any visualisation or animation of the vote-counting process. And they spit out the results for all rounds all at once, they don't show (quite as clearly) how the results evolve from one round to the next.
I hope that, by being interactive and prompting the user to run each round one-by-one, and by visualising the ballot distribution between rounds with some basic animation, this simulation gives you a deeper understanding of how instant-runoff voting works.
For more information, see this blog article about the instant-runoff voting simulator.