stv
Conducts single-winner instant-runoff voting using ranked-choice ballots, eliminating the candidate with fewest votes each round until a majority winner is determined.
Instructions
Single-winner STV / instant-runoff over ranking ballots.
Rounds: count top active preferences; a strict majority wins, else eliminate the fewest-voted (ties broken by eliminating the lexicographically largest) and transfer. Ballots with no remaining preference are exhausted. Clone-resistant. Errors if any ballot is not a ranking.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| seed | No | ||
| profile | Yes | ||
| tie_break | No | lexicographic |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| note | No | ||
| rule | Yes | ||
| scores | No | ||
| winner | Yes | ||
| ranking | No | ||
| winners | Yes | ||
| tie_break | No | lexicographic |