condorcet
Finds the Condorcet winner from ranking ballots: a candidate who defeats every other in pairwise comparisons. Returns no winner if majority cycles exist.
Instructions
Condorcet winner over ranking ballots: beats every other candidate pairwise.
If the majority relation cycles (e.g. a>b>c>a) there is NO Condorcet winner:
winners is empty, winner is null, and note says so. Errors if any
ballot is not a ranking.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"profile": "<profile>"
},
"name": "condorcet"
}
}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 |