CSCI 280 - Algorithms and Problem Solving Paradigms
Spring 2010
Project 1: Chess Tournament Pairings
Background
In a chess tournament, n players play m games apiece. A
tournament director is faced with the challenge of assigning each pair for each
game. The most important goal is to arrange the pairs so that there is a clear
winner at the end of the tournament. Ideally, the tournament will also provide
enough information to rank the remaining players as well. Unlike an
elimination tournament, every player will play a game in every round.
Details
- For each player, each chess game can result in a win (one point), loss (no points) or a draw (half point).
- In the first round, pairings may be made arbitrarily.
- In the second and later rounds, each pairing will ideally have the
following properties:
- No two players will play each other more than once
- The players will have the same score
- Each player will alternate playing as black and white, or, if
alternation does not work, each player should at least play as black
and white an equal number of times
- If there is an odd number of players, in each round one player gets a
bye. Each bye counts as a win, receiving one point. No player can
receive more than one bye. In any given round, the lowest-ranked player
who has not yet received a bye should receive the bye.
Assignment
Write a program in the language of your choice that computes pairings.
- Your program will have two parts:
- A tournament simulator
- A pairing assigner
- The tournament simulator will be initialized with a number of tournament
participants. Each participant should be represented by:
- A name
- Numbers of wins, losses and draws
- For each round, whether the participant played white or black
- Any other data you consider to be pertinent
- The tournament simulator will run for a pre-determined number of rounds.
For each round, it will:
- Request a set of pairings from the pairing assigner
- Simulate a tournament by assigning wins, losses, and draws for each match
- Update any statistics considered worthwhile to maintain
- The pairing assigner will assign pairings based on the properties given
above. These properties are given in their order of importance. For
each round, the pairing assigner will use the data maintained by the
simulator in order to generate the pairings.
- The pairing assigner should also produce a totally ordered ranking of
the players. Be sure to include a set of tie-breaking strategies to
produce this, in the event that the win-loss-draw scores are insufficient.
- You may find elements of this assignment to be ambiguous in places.
Handle the ambiguities as you see fit. Feel free to consult the instructor
if you are confused about any particulars.
Analysis
- With respect to your implemented pairing assigner, prove that:
- If m ≥ log2n, where m is the
number of rounds and n is the number of players, there can
exist no more than one undefeated player.
- No two players ever play each other more than once, as long as m < n
- No player receives more than one bye for the entire tournament.
- Again with respect to your algorithm, for each of the following state whether it is true or false, and prove your answer:
- Each player will alternate playing black and white on each round.
- If b is the number of games played as black and w is
the number of games played as white, |b - w| &le 1.
- For some constant cbw, |b - w| ≤ cbw. If this is true,
be sure to describe how cbw is calculated. It may depend on the
values for n and/or m.
- If x and y are the scores for two players who have
been paired, |x - y| = 0.
- For some constant cs, |x - y| ≤ cs. If this is true,
again be sure to describe how to calculate cs.
- Run your simulator and pairing algorithm, with
m = log2n for all runs. Try 3 runs with each of
10, 50, and 100 players (for a total of 9 runs). Report each of the
following:
- Number of rounds played
- Maximum number of games between any two players
- Across all players, the minimum, maximum, average, and standard deviation of:
- Number of undefeated players
- Any other statistics that can help describe the practical performance
of your algorithm
Submission
Submit the following, all via Sauron:
- Your source code
- A word-processed report that includes:
- A description of your algorithm
- Your proofs
- Graphs of your data
- Textual analysis of your data
- Conclusions
- You may use any text-preparation system you wish