The Swiss system is built so that pairing a field by hand honestly becomes nearly impossible past twenty players. Dozens of requirements have to hold simultaneously: never pair the same two people twice, keep the colours balanced, pair players on equal scores, and where that is impossible, choose the least bad option from a strictly ordered list of priorities. A pairing engine takes that work on.
bbpPairings is such an engine. It reads a file with the full history of the event, computes the pairings for the next round and writes them to a file. No interface, no database, no network: the program reads one text file and writes another. Everything else - registration, entering results, the standings, the display - belongs to whichever program calls it.
That separation is the industry norm: there is a reference engine, and there are tournament managers that use one. The best-known counterpart is JaVaFoby Roberto Ricca, the reference implementation of the Dutch system in Java. The bbpPairings interface was deliberately made similar to JaVaFo 1.4, with the permission of JaVaFo's author - about JaVaFo.
A property that matters to an organizer: the engine sends nothing anywhere. It is a local executable working with files on disk. Participants' personal data does not leave the machine the engine runs on.
The Dutch system is the main one. This is the Swiss that FIDE describes in section C.04.3 of its handbook and that is used at the overwhelming majority of open tournaments worldwide. Version 6.0.0 implements the 2025 edition of the rules, in force from 1 February 2026.
The Burstein system is the secondary one. Here the author is candid: the README states it implements the previous version of the system and contains shortcomings. It has no FIDE endorsement. In practice the engine is used for Dutch.
Round robins need no engine at all: there the schedule is computed arithmetically from the Berger tables, with nothing to search - the Berger tables.
To follow what the engine does, it helps to know the vocabulary of the FIDE rules - the same terms appear in its source and in its error messages.
Half the difficulty of a Swiss is colours. The rules divide a player's preference into three degrees:
Which is where the familiar picture comes from: colours alternate, long runs of one colour do not happen, and with an odd field somebody gets a bye - but not twice - about byes.
The FIDE rules state pairing as a strictly ordered list of requirements. The absolute ones come first and may never be broken:
Then come the quality criteria, also ordered: maximize the pairs in the bracket, minimize the players floating down, keep the next bracket pairable, then honour the colour preferences - first any of them, then the strong ones, and only at the end the cosmetic concerns, such as not floating the same player down or up several rounds in a row.
The practical meaning is simple: the engine is not looking for a «nice» pairing, it is looking for one admissible under the highest-priority rule, and it concedes only where a round is mathematically impossible otherwise. Which is why arguing with its answer is usually pointless - if a pair looks odd, every alternative broke a higher-ranked rule.
Communication with the engine goes through TRF - the FIDE tournament data exchange format, also called the Krause format. It is a plain text file with a strictly positional layout: the meaning of a value is given by its column number, not by a delimiter.
The key line is 001, one per player: the player number, title, name, rating, federation, FIDE ID, date of birth, score, and then the round history in blocks of ten characters. Each block holds the opponent's number, the colour (w or b) and the result: 1 win, 0 loss, = draw, U a full-point bye, and + and - for wins and losses by forfeit.
Version 6.0.0 works with TRF-2026 and keeps backward compatibility with the older TRF(bx). It also has its own extensions for non-standard scoring - codes such as BBW, BBD and BBL, which set your own values for a win, a draw and a loss.
The same TRF is needed after the event: arbiter software and federations accept the file with the results, which is why «export the TRF» and «submit the tournament for rating» are close to synonyms in practice - the TRF format in detail.
The engine has three modes.
bbpPairings --dutch tournament.trf -p pairings.txt - the main mode. The output file has the number of pairs on the first line and then the pairs by player number.bbpPairings --dutch tournament.trf -c - the engine checks whether an existing pairing complies with the rules. Useful when the pairing came from another program or from a human.bbpPairings --dutch -g -o trf_file - creates a random event for testing. This is how the authors verify the engine across thousands of generated scenarios.The outcome comes back as an exit code: 0 success, 1 no valid pairing exists, 2 internal error, 3 invalid request or data, 4 the tournament exceeds the size limits, 5 the file could not be read.
Code 1 is worth distinguishing from a real error. It is not a failure but arithmetic: a Swiss cannot pair the same two players twice, so with N players there are no opponents left after N-1 rounds. The correct response from the calling program is not to retry but to say the tournament has run its course.
The README gives the theoretical complexity: roughly O(n³) for Burstein and O(n³ × s² × log n) for Dutch, where n is the number of players and s the number of occupied score groups. In practice an amateur event of a few dozen players is paired instantly, and the computation takes noticeable time only at very large opens.
Size limits are fixed at build time; exceed them and the engine returns code 4. Separately, remember that the engine knows only what the file told it - not the rating on a federation website, and not that somebody arrived late. All of that is the calling program's responsibility.
This is easy to get wrong, so point by point. FIDE maintains a list of endorsed programs - a certification granted by the SPP commission after testing. That list holds tournament managers such as Swiss-Manager and Vega, and JaVaFo is treated as the reference implementation of the Dutch algorithm.
bbpPairings is not on that list. Its README is careful about the claim: the program aims to implement the rules described in the FIDE handbook. The Burstein implementation is explicitly marked as incomplete and unendorsed.
What that means in practice. For a club, school, company or amateur tournament bbpPairings is entirely suitable: it computes pairings by the same Dutch rules as the certified programs. If your event is going for FIDE rating, check the requirements on software with your federation and chief arbiter in advance - because of the absent certificate, not because of the algorithm - Swiss-Manager, Vega.
In Vibe Chess the Swiss pairings are computed by bbpPairings - version 6.0.0, built from source and run with the --dutchflag. The scheme is exactly the one described above: the app assembles a TRF from the tournament history, hands it to the engine, receives the round's pairs and lays them out across the tables.
Several consequences an organizer notices:
The same caveat as above: following the Dutch rules is not a FIDE certificate. Vibe Chess has not gone through SPP endorsement, and for rated events that has to be taken into account. For club, school, bar and company tournaments there is no restriction - and all of it is free - how to run an event in it.
Prebuilt binaries live in the repository's releases section, but building from source is straightforward. You need a C++ compiler and make:
git clone https://github.com/BieremaBoyzProgramming/bbpPairings.gitmake - producing an executable called bbpPairings.exe (that name on Linux too);./bbpPairings.exe --dutch -g -o test.trf./bbpPairings.exe --dutch test.trf -p out.txtIf you simply want to run a tournament rather than work through a build, that path has been walked for you: the engine is already embedded in the app, and the organizer only creates the event and presses buttons.
An open-source Swiss pairing engine written in C++ by Bierema Boyz Programming. It takes a file with the tournament history in TRF format and returns the next round's pairings under the FIDE Dutch rules. It is not a tournament manager: it has no interface, no player database and no standings.
Yes. The source is open under the Apache 2.0 licence: the engine may be used, studied and embedded freely, including in commercial software.
It is not on the official list of FIDE-endorsed programs: certification is granted to tournament managers, and JaVaFo is treated as the reference implementation of Dutch. bbpPairings implements the same FIDE rules, and its author states that the Burstein implementation is incomplete and unendorsed. For club and amateur events that is no obstacle; for FIDE-rated events check the requirements with your federation.
Two Swiss systems: Dutch (the main one, following FIDE handbook section C.04.3) and Burstein (secondary, implementing the previous edition with known shortcomings). Round robins need no engine - their schedule comes from the Berger tables.
The FIDE tournament data exchange format, also called the Krause format. A text file with a strictly positional layout: line 001 holds a player's details, score and round history - opponent, colour and result for each game. The same file is accepted by arbiter software and federations when submitting an event.
Most likely it returned code 1 - no valid pairing exists. A Swiss cannot pair the same two players twice, so with N players there are no opponents left after N-1 rounds. That is not a program failure but a signal that the rounds have run out.
In Lichess Swiss tournaments (a fork with the Fast Swiss system), in the SwissSys tournament manager, in the Vibe Chess app and in a great many home-built services - the open licence and simple file interface make it easy to embed.
6.0.0, released on 1 February 2026, the day the new edition of the Dutch rules took effect. Earlier versions: 5.0.1 (2023), 5.0.0 (2022), 4.1.0 (2017).
bbpPairings 6.0.0 with the --dutch flag. The app assembles a TRF from the tournament history and the engine returns the round's pairs. The service has no FIDE SPP endorsement, while the Dutch rules themselves are followed.
The Vibe Chess app opens from a link and needs no installation. Setting up a tournament takes a minute: pick the system, set the date, the venue and the time control - the app handles the rest.
for a large field: opponents are matched by score, you choose the number of rounds
for a small circle: everyone plays everyone, the round count follows from the field
no rounds, no pairings: players sign up and pick opponents at the table
The bot is constantly improved based on real tournaments. If you need a feature that isn't there yet, message the developers right inside the bot with the /support command. Many features appeared exactly because organizers asked for them, and useful ideas get added quickly.
The reference implementation - JaVaFo. The file it reads - the TRF format. The system itself - Swiss or round robin. Standings - the Buchholz score.