About
This project is about the problem of planning a tournament with the following characteristics:
- all players are evenly distributed on tables (or playfields)
- all players are playing at the same time
- after a round (all tables have finished) the players are mixed and re-distributed on the tables
- a player is not allowed to play against the same opponent twice
There characteristics lead to the problem of how to distribute the players to the tables to be able to play as many rounds as possible.
To plan such a tournament without higher mathematics is nearly impossible, as going through all combinations by hand would take forever.
Brute Forcing all Combinations
This litte program does a bute force on all possible combinations in order to find the best arrangement of all players (i.e. finding a combination with the most rounds).
Usage
Using SkatTournament is easy since it only needs at least two parameters. They are:
1.) Number of players (must be a multiple of number of tables)
2.) Number of tables/playfields
The third parameter is optional:
3.) Autostop. Pauses the program according to the value of this parameter:
- -1: no autostop: go through all solutions
- 0: autostop after every solution (default)
- >0: autostops if a solution has at least X rounds
With the following parameters rounds can be pre-selected to speed-up the calculation:
4.) Index of combination for round one (starting with 0)
5.) Index of combination for round two (starting with 0)
x.) etc.
Examples:
$ SkatTournament 12 4 -1 0 0
Finds all solutions for tournaments with 12 players distributed on four tables, showing all solutions and pre-selecting round one and two each with the first combination found.
$ SkatTournament 16 2 0 0 0 0
Finds all solution for tournaments with 16 players distributed on four tables, pausing after each solution and pre-selecting round one to three each with the first combination found.
$ SkatTournament 12 4 4 0 0
Same as first example, but only shows solutions with four or more rounds.
Output
New possible tournament (4):
Combination: [3, 4, 12]
Combination: [5, 7, 11]
Combination: [2, 6, 8]
Combination: [1, 9, 10]
Combset total: 4 comb
Combination: [3, 6, 10]
Combination: [4, 9, 11]
Combination: [2, 7, 12]
Combination: [1, 5, 8]
Combset total: 4 comb
Combination: [6, 9, 12]
Combination: [3, 8, 11]
Combination: [2, 5, 10]
Combination: [1, 4, 7]
Combset total: 4 comb
Combination: [10, 11, 12]
Combination: [7, 8, 9]
Combination: [4, 5, 6]
Combination: [1, 2, 3]
Combset total: 4 comb
This is an example output for a four-round-tournament of 12 players on four tables. The number in parentheses show the number of rounds for this solution. The output is easier to read if you read it from the bottom up.
Download
You can download this tool through Git.
- Source: http://www.stiefels.net/~sst/repos/SkatTournament.git
- OS X-Binary
- Win32-Binary
Latest Comments
RSS