Swiss mode runs a fixed number of rounds where players with similar scores are paired together. Each pairing is played as a two-game match (same opening, colors swapped).
- Set
TournamentModetoSwiss - Ensure the number of rounds is less than the number of players (to avoid forced rematches)
- Configure
SwissOptionsas needed
"SwissOptions": {
"GamesPerMatch": 2,
"Rounds": 5,
"SeedGroupCount": 1,
"UniquePerMatchOnly": true,
"RandomOpenings": true,
"AllowExtraPairsOnTie": true,
"StatePath": "wwwroot/swiss_state.json"
}| Field | Description |
|---|---|
GamesPerMatch |
Games per pairing (must be even; each pair is two games with colors swapped). |
Rounds |
Total Swiss rounds. Uses global Rounds when set to 0. Must be less than player count to avoid forced rematches. |
SeedGroupCount |
Number of seeding groups for TCEC-style interleaving (see below). |
UniquePerMatchOnly |
When true, openings can repeat across matches but not within a match. |
RandomOpenings |
Randomize opening order; the shuffled order is persisted for resume. |
AllowExtraPairsOnTie |
Play extra pairs to break ties at the top after scheduled rounds. |
StatePath |
JSON file for state persistence and GUI updates. |
Default seeding uses TCEC-style grouping and interleaving:
- Sort engines by rating (descending).
- Split into N groups of roughly equal size.
- Interleave by rank: A1, B1, C1, ... then A2, B2, C2, ...
| Players | Recommended | Result |
|---|---|---|
| 8 | 1 | A1, A2, A3, A4, A5, A6, A7, A8 |
| 12 | 2 | A1, B1, A2, B2, A3, B3, ... |
| 24 | 4 | A1, B1, C1, D1, A2, B2, C2, D2, ... |
Use fewer groups for conservative seeding, more groups to spread top seeds further apart.
The pairing algorithm follows standard Swiss principles with two code paths:
- Group players by current score (highest to lowest).
- Sort within each group by seed (strongest first).
- Split each group into top-half and bottom-half.
- Pair top-half vs bottom-half (1st vs middle, 2nd vs middle+1, etc.).
- If a group has odd count, float one player down to the next score group.
- Backtrack if a pairing would cause a rematch.
When the main path fails due to complex prior-pairing constraints (common in later rounds), a fallback algorithm attempts global pairing:
- Order all players by score (descending), then by seed.
- Greedily pair each player with the closest-scoring available opponent.
- Backtrack if needed to avoid rematches.
Both paths produce pairings sorted so that weakest score groups play first and strongest last.
When there is an odd number of players, one player receives a bye (worth 1 point). The bye recipient is selected as follows:
- Lowest score first: Players with fewer points are prioritized.
- Weakest among ties: If multiple players share the lowest score, the one with the highest seed number (lowest rating) receives the bye.
- No repeat byes: Players who have already received a bye are skipped when possible.
This ensures byes go to trailing engines, and among equals, to the lower-rated one.
Each round executes pairings from weakest to strongest score groups. This follows standard Swiss convention:
- Weaker matchups typically finish faster
- Top games are saved for last (more exciting for spectators)
- Reduces overall round duration
- Each match uses one opening played twice (colors swapped for the second game).
- When
RandomOpeningsis true, the opening order is shuffled once and persisted. - When
UniquePerMatchOnlyis true, openings can repeat across different matches but not within a single match.
Winner determination:
- Points only. If tied after scheduled rounds, play extra pairs (if
AllowExtraPairsOnTieis true). - For two tied engines: play additional pairs until one wins a pair.
- For three or more tied: use tie-break criteria.
Tie-break order for non-winner placements:
- Sonneborn-Berger score
- Number of wins
- Direct encounter result
- If still tied, share places (unless it affects promotion/relegation)
Swiss state is saved to StatePath (JSON) after each game, including:
- Current round number and global opening index
- All pairings per round with results
- Standings snapshot per round
- Opening order (for resume consistency)
To resume a tournament, ensure the state file exists at the configured path.
- Standings table with live score updates
- Current round pairings list
- Swiss overview dialog between games