Personal project · Desktop application

Swiss Pairing

Chess tournament software that follows the FIDE handbook

  • Python 3
  • PyQt5
  • PyInstaller
  • Qt Linguist

A desktop application for running a chess tournament from the entry list to the final standings: pairings, results, cross-table, colour report, export and print.

The pairing engine follows the FIDE Handbook rather than approximating it. Every generated round is put through a rule checker before it can be published, and when no legal pairing exists at all, the message names the players who cannot be given a board and why.

What it does

Pairing systems

  • Swiss – Dutch / FIDE, following criteria [C1]–[C21] of Handbook C.04.3
  • Swiss – Monrad: ladder pairing with rematch avoidance
  • Swiss – Danish: the same ladder, rematches permitted
  • Round Robin and Double Round Robin, using the Berger tables of C.05 Annex 1
  • Scheveningen: every player of team A meets every player of team B
  • Single and Double Elimination brackets, seeded, with byes for the top seeds

Colours and tie-breaks

  • Colours allocated by the FIDE rules in every system: balance first, then alternation, never three of the same colour in a row, never a difference beyond ±2
  • The full C.07 (2024) tie-break catalogue: Buchholz with Cut-1, Cut-2 and Median variants, AOB, Sonneborn-Berger, Koya, Direct Encounter, Number of Wins, Games Won, Games with Black, Progressive Score, Average Rating of Opponents
  • Unplayed rounds handled per article 16, including how the "cut" modifiers drop a voluntary unplayed round first
  • The tie-break list and its order are configurable per tournament

Running the tournament

  • Cross-table by round — each cell shows the opponent’s rank, the colour and the result
  • Colour report: whites, blacks, difference, full history, current streak and the colour due next
  • Byes and forfeits: pairing-allocated, requested half-point and zero-point byes
  • Withdrawals — a withdrawn player stops being paired, but their games keep counting for everybody else’s tie-breaks
  • Corrections: fix the latest round’s results, or delete and re-pair the last round
  • Manual adjustments: swap colours on a board or swap two opponents, re-checked immediately
  • Accelerated pairings, standard and Baku, announced up front as the regulations require
  • Autosave on every change

Interface

  • Dark and light themes, or follow the desktop setting — read from the registry on Windows, AppleInterfaceStyle on macOS, and the XDG portal, GNOME or KDE on Linux
  • A toolbar that adapts to the window width, down to icons with tooltips
  • Export standings, cross-table, colour report and pairing sheets as HTML or CSV, plus print preview
  • English and Serbian interface

Download

Linux executable

Linux · x86-64

Self-contained binary. Mark it executable with chmod +x and run it.

Download

Source archive

Any platform

Includes the installers and the PyInstaller build scripts for Linux and Windows.

Download

Requirements

  • Linux (x86-64) or Windows
  • No Python installation needed — the download is a self-contained executable
  • Python 3 is only required if you build from source

Installing

Linux

./install.sh

Everything goes under ~/.local, so no root is needed: the program in ~/.local/share/swiss-pairing, on PATH as ~/.local/bin/swiss-pairing, plus a menu entry and icons. Use ./install.sh --prefix /usr/local with sudo to install for everyone. ./uninstall.sh removes it; --purge drops the saved settings too. Tournament files are never touched.

Windows

powershell -ExecutionPolicy Bypass -File install.ps1

Everything goes under %LOCALAPPDATA%\SwissPairing, so no administrator rights are needed. You get a Start Menu and Desktop shortcut, an entry in Add / Remove Programs, and the install directory on your PATH. uninstall.ps1 removes it, -Purge drops the settings as well.

Build only

packaging/build.sh      # dist/swiss-pairing
packaging\build.ps1    # dist\SwissPairing.exe

The build tools go into build/venv rather than the system Python, so nothing outside the project directory is touched.

Source code

https://gitlab.com/dusan.atanackovic.pydev/swiss-pairing

The repository is private. If you would like to look through the code, get in touch and I will grant access.