- Blind mode tutorial
lichess.org
Donate

High level descriptiion of the matchmaking algorithm

From the page that appears before an arena begins:
"How does the pairing work?

At the beginning of the tournament, players are paired based on their rating.
As soon as you finish a game, return to the tournament lobby: you will then be paired with a player close to your ranking. This ensures minimum wait time, however you may not face all other players in the tournament.
Play fast and return to the lobby to play more games and win more points."
Seems like I can't just delete the thread and reopen, so I guess it's better to leave it instead of having two instances? But agreed and no hard feelings if an admin removes this ;-).
> From the page that appears before an arena begins:

Well I guess I'm looking for something a bit more detailed, but not quite as detailed as the code ;-).
OK, I dived into the code a bit more. Here's my understanding:

Arena matchmaking computes a minimum weight matching in the sense of graph theory.¹

> en.wikipedia.org/wiki/Matching_(graph_theory)

Nodes are the seeking players and edge-weights are given by

> abs(a.rank-b.rank)*[300 + 1700 * (maxRank - min(a.rank, b.rank)) / maxRank ] + abs(a.rating - b.rating)²

So essentially, the algo finds players a,b for which this number is small, or more accurately finds matchings where the corresponding numbers have minimal sum.

There's some additional logic that ensures that colors match and that immediate repetitions are discouraged. Also there's some timing logic that dictates how long the system waits before assigning matches.

----
¹ github.com/ornicar/lila/blob/master/modules/tournament/src/main/arena/PairingSystem.scala
² github.com/ornicar/lila/blob/442da0c86a9d54c3cff5645e14d67dfe269a9d0b/modules/tournament/src/main/arena/AntmaPairing.scala#L24

This topic has been archived and can no longer be replied to.