> For the complete documentation index, see [llms.txt](https://docs.ultie.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ultie.org/competition-formats/swiss-system.md).

# Swiss system

Learn how Ultie's Swiss system uses power rankings to create competitive pairings after each round.

Ultie's Swiss system combines a Swiss draw with a power-ranking model. It is based on a modified version of the approach originally developed for the Windmill tournament, then adapted so organizers can configure pairing constraints for different events.

For the mathematical background and the original Ultimate-specific explanation, see [Power Rankings in Ultimate – Leaguevine](https://www.leaguevine.com/blog/134/power-rankings-in-ultimate/).

## What the system is trying to do

A full Round Robin quickly becomes impractical in a large division. A Swiss stage gives every team several games while using each completed round to decide the next one.

The goal is to bring teams of similar strength together as the stage progresses. To do that, Ultie does not rank teams only by wins and losses or treat a 5-point win the same against every opponent. It uses the score difference and the strength of all opponents to estimate how strong each team currently appears.

The algorithm then works in 2 parts:

1. Calculate the current strength of every team.
2. Choose the best complete set of pairings for the next round.

## 1. Calculate team strength

Ultie calculates a power rating from all completed games in the Swiss stage.

Imagine that Team A beats Team B by 5 points. With only that result, their relative strength could be represented as:

* Team A: +2.5
* Team B: −2.5

The difference between the ratings is 5, matching the game result.

Now imagine that Team B later beats Team C by 5 points. That result connects Team C to the same set of teams. In a real Swiss stage, many results overlap like this, so Ultie recalculates all team ratings together and finds the strength values that best explain the completed scores.

This has an important consequence: a team's rating can change when one of its previous opponents plays another game. Earlier results are re-evaluated as the system learns more about the teams involved.

Power rating is therefore not a number of points that a team earns and keeps. It is the current estimate of team strength based on:

* score differences;
* opponent strength;
* all completed results in the Swiss stage.

A large win against a strong opponent provides different information from the same margin against a weaker opponent.

## 2. Choose the next round

After calculating the ratings, Ultie considers the possible matchups for the next round.

Each matchup receives a cost:

* a larger rating difference creates a higher cost because the game is expected to be less balanced;
* pairing constraints can add penalties for matchups the organizer wants to avoid.

Ultie evaluates complete sets of pairings rather than choosing the best-looking matchup first and then pairing the remaining teams. It selects the complete round with the lowest total cost.

For example:

|            | Team A | Team B | Team C | Team D |
| ---------- | -----: | -----: | -----: | -----: |
| **Team A** |      — |     10 |     30 |     20 |
| **Team B** |     10 |      — |     20 |     40 |
| **Team C** |     30 |     20 |      — |     10 |
| **Team D** |     20 |     40 |     10 |      — |

The possible complete rounds are:

* Team A–Team B and Team C–Team D: total cost 20;
* Team A–Team D and Team B–Team C: total cost 40;
* Team A–Team C and Team B–Team D: total cost 70.

Ultie selects Team A–Team B and Team C–Team D because that complete round has the lowest total cost.

These numbers only illustrate the selection process. The actual costs depend on the current power ratings and the Swiss settings for the event.

## Pairing constraints

Power-rating distance is not the only factor in the final round.

* Rematches are blocked by default.
* If no valid complete round exists, the organizer can explicitly allow a rematch as a last resort.
* Country and city preferences are configurable soft constraints. They make a pairing less desirable without creating an absolute guarantee.

Ultie evaluates the rating difference and all configured penalties together across the complete round.

## First-round pairings

Before any Swiss results exist, Ultie cannot calculate team strength from the stage. The first round can therefore use pre-seeding. If pre-seeding is not used, the saved Swiss settings determine the initial pairings.

After each completed round, Ultie recalculates the power ratings and generates the next set of pairings.
