Running Stellenbosch Handicap Tournaments
This page is starting off a little chaotic, but should, over time, settle into a more useful, organized state.
A couple of call-for-entries are usually posted on the SAGC blog, and emails are sent to the Stellenbosch Go Mailing List. The first call-for-entries is typically done as soon as the previous handicap tournament is finished. An exception to this guideline may be for the first quarter handicap tournament, due to the holidays it might make sense to only send it out in January. A final call-for-entries is typically made a week or so before the tournament, as the first call-for-entries may have been "too long ago".
Typically the response to such calls-for-entries is not overwhelming, and probably inadequate. Direct marketing techniques tend to work much better. (Also remember to specifically contact the odd member that isn't on the mailing list.) Club nights one and two weeks before the tournament is the best place to collect entrants. Some people require just a little bit of encouragement.
Direct email marketing with messages like Jy wil seker ook graag inskryf vir die handicap toernooi, né? Sê vir my "ja" voor Woensdag, dankie... ;) and Wat sê jy, gaan jy speel? Ek verwag jy gaan ja sê voor of op Dinsdag... has also proven to be successful.
handi_tourney_helper.py is a very simple Python script I wrote to help me make pairings and calculate results. It uses a simple text file for input.
Config file format
- Lines that start with # are comments. (Only lines, whole lines, that start with #, not whitespace then #, and not a # to the right of some other info.)
- The first "paragraph", ending with an empty line (not whitespace, empty!), defines the players taking part in the tournament. A player is defined by an alphanumeric id, a rank, and a free-form name, the three seperated by whitespace (any whitespace!). These lines may also start and end with whitespace, as they are processed by the following regular expression: ^\s*(\w*)\s+(\w*)\s+(.*)\s*$. For example:
# PLAYERS jaco 4k Jaco Swanepoel david 6k David Richfield christina 12k Christina Auret
- The id is used during the rest of the file to fill in results. The rank is anything from 30k to 1k, or 1d to 6d. The free-form name is used in result and pairing tables.
- After the players are specified, the next paragraph (following one empty line) contains game results. A line should either start with # (comments), or be of the form rory bt hugo for a victory, or unplayed: hugo vs rory for an unplayed. These lines are again quite free (whitespace anywhere), as they are processed using regular expressions.
- NB: bye results should also be entered, with the player paired against the "bye" "fake player" scoring the victory: louis bt bye
Using the script
The first parameter is the name of the "config file" (defining the players and containing the game results). The second parameter is one of the following:
- Prints results in a "simple form", just a dump of the Python list. E.g.:
[((3, 5, 14), 'hugo'), ((2, 4, 16), 'lei'), ((2, 4, 13), 'rory'), ((1, 6, 12), 'charl'), ((1, 3, 15), 'davidr'), ((0, 5, 11), 'christina')]
- Prints html for publishing the results in a nice table, that looks like this:
|1||Hugo van der Merwe||3||5||14|
|4||Charl du Plessis||1||6||12|
- Prints the best 5 pairings (if it can find 5) in a "simple form": just a dump of the Python list.
- Prints the best 5 pairings in a "human readable" form, useful for emailing the pairings.
- Prints html for the best 5 pairings for publishing the pairings in a nice table.
Example: 1st Quarter Handi 2006
I don't like this section much, I don't think presenting it this way is useful. I think a FAQ approach might be better.
First enter all the player info, ending with a blank line, like this (assuming it's in a file Handi06-1):
# PLAYERS jaco 4k Jaco Swanepoel david 6k David Richfield rory 7k Rory Beling hugo 9k Hugo van der Merwe christina 12k Christina Auret heinz 13k Heinz Staschen ben 15k Ben Bredenkamp hanno 17k Hanno Botha louis 19k Louis de Jager wim 25k Wim Conradie iain 27k Iain Lawrie andre 29k Andre Heydenrich willie 30k Willie Krige
Now we can generate pairings. This can take quite some time, as it is done "brute force" (with only the simple, obvious tree-pruning). For the first round, with 14 players, it took between 30 and 40 seconds to calculate the pairings. handi_tourney_helper.py Handi06-1 pairings - the output is:
H: [2, 2, 2, 2, 1, 1, 0] ssh: 18 Wim Conradie(W) vs Iain Lawrie(B) with 2H Andre Heydenrich(W) vs Willie Krige(B) with 0.5komi Rory Beling(W) vs Hugo van der Merwe(B) with 2H Louis de Jager: BYE Jaco Swanepoel(W) vs David Richfield(B) with 2H Christina Auret(W) vs Heinz Staschen(B) with 0.5komi Ben Bredenkamp(W) vs Hanno Botha(B) with 2H H: [2, 2, 2, 2, 1, 1, 0] ssh: 18 Wim Conradie(W) vs Iain Lawrie(B) with 2H Andre Heydenrich(W) vs Willie Krige(B) with 0.5komi Rory Beling(W) vs Hugo van der Merwe(B) with 2H Hanno Botha(W) vs Louis de Jager(B) with 2H Jaco Swanepoel(W) vs David Richfield(B) with 2H Christina Auret(W) vs Heinz Staschen(B) with 0.5komi Ben Bredenkamp: BYE H: [2, 2, 2, 2, 2, 1, 0] ssh: 21 Wim Conradie(W) vs Iain Lawrie(B) with 2H Andre Heydenrich(W) vs Willie Krige(B) with 0.5komi Rory Beling(W) vs Hugo van der Merwe(B) with 2H Hanno Botha(W) vs Louis de Jager(B) with 2H Jaco Swanepoel(W) vs David Richfield(B) with 2H Heinz Staschen(W) vs Ben Bredenkamp(B) with 2H Christina Auret: BYE H: [3, 2, 2, 2, 1, 1, 0] ssh: 23 Wim Conradie(W) vs Iain Lawrie(B) with 2H Andre Heydenrich(W) vs Willie Krige(B) with 0.5komi David Richfield(W) vs Rory Beling(B) with 0.5komi Hanno Botha(W) vs Louis de Jager(B) with 2H Jaco Swanepoel: BYE Hugo van der Merwe(W) vs Christina Auret(B) with 3H Heinz Staschen(W) vs Ben Bredenkamp(B) with 2H H: [3, 2, 2, 2, 2, 1, 0] ssh: 26 Wim Conradie(W) vs Iain Lawrie(B) with 2H Andre Heydenrich(W) vs Willie Krige(B) with 0.5komi Rory Beling: BYE Hanno Botha(W) vs Louis de Jager(B) with 2H Jaco Swanepoel(W) vs David Richfield(B) with 2H Hugo van der Merwe(W) vs Christina Auret(B) with 3H Heinz Staschen(W) vs Ben Bredenkamp(B) with 2H
Each pairing starts with a "H:" line, that shows the criteria by which it was sorted: handicaps sorted from maximum to minimum (then sum of square handicaps - which will have no effect on the sorting, it's only there because I found it interesting). Notice that there are two "equal" pairings possible for the first round of this tournament. NB: this script is deterministic, it makes testing the script easier. This means you have to flip a coin or use a random number generator to pick between equal pairings! (Very important, can't allow your name to give you an advantage/disadvantage!) I flipped a coin with "rand * 2", which gave me the first pairing. Copy/paste the relevant text into an email sent to all the participants, then run handi_tourney_helper.py Handi06-1 htmlpairings, which will also take long, as it recalculates the pairings again. Copy/paste the correct pairing into the website. (Make very sure you use the same pairing!)
Next I suggest entering all the pairings into the tournament file as unplayed:
# ROUND 1 unplayed: wim vs iain unplayed: andre vs willie unplayed: rory vs hugo louis bt bye unplayed: jaco vs david unplayed: christina vs heinz unplayed: ben vs hanno
Notice Louis has a bye, which should be entered as a victory for him.
If players do not play - both forfeit their games. Leave it as an "unplayed: ..." line, to make sure the script does not pair them again.
TO BE CONTINUED