Skip to content

Improve the pairing algorithm #41

@falbru

Description

@falbru

Currently, the pairing algorithm sorts the players by score and match the players who are closest to each other by score. The algorithm prevents two players from being paired with each other two times in a row, but that's it. It also tries to fairly assign colours to the two players, so if player A is set up to play against player B, and player A played white and player B played black the previous match, they switch colours this match.

Some problems we've encountered:

  • Even though two players can't be matched two times in a row, players often ended up playing against players multiple times. I think that, in the way that the algorithm currently works, you'll match with the same person over and over again if you have the same score and did not play against each other the previous match.
  • Some players played the same colour sevaral times in a row.

Some solutions:

  • Shuffle the list of players who have the same score. This is not perfect, but a quite easy fix.
  • For all players with the same score, try to match players who played of differen't colors last game.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions