CG Collection — Automated Tournament Builder

The prototype is on the workbench, in pieces. But it works, tied together with string and wire, belching smoke and backfiring – yet, I still managed to build a collection of 198 games in under an hour.

It’s designed to work off a SCID Swiss crosstable for a tournament – where all the pairings for each round are known (knockouts come later) .

Basically you just feed the crosstable (xtab) to a script – and out comes the <CG> games correctly ordered, round by round. The python script parses the xtab out, allowing the user to supervise the mapping of  SCID’s normalized names to CG names.

Actually, to be even more accurate, instead of names the CG pid (player id number) is used to automatically do a CG search for <player1> vs <player2> in <year> from the script (no human intervention needed). I parse out the HTML returned from the CG search to determine the data for all “hits” – the data being the pairing (with correct colors), Event/Site, opening, moves and result.

Doing this round by round generates a HTML file which can be displayed on my local PC (or MAC) with any browser. All the tournament games should, in principle, be included – along with a few extras that don’t belong (see below). All I need to do is visually scan for the correct info before using a button to add the game to my collection. No page hops (I update the little frame at the top, the one with the <CG> logo). Just, click, click, click, click… ad infinitum away!

Of course, the <CG> games are a mess with respect to Event/Site labels – so some caution needs to be exercised. And if that wasn’t enough, the Hoogovens 55th tournament (1993) was really two tournaments — a Knockout and an Open (Swiss). So there even more room for confusion.

Hoogovens 55e Builder (1)

(click image to enlarge)

The first round looks easy, but the 2nd round shows some of the pitfalls – where certain players faced off several times during the same year. Since the Event/Site fields are untrustworthy, each pairing should be reviewed by hand:

Hoogovens 55e Builder (2)

(click image to enlarge)

The highlighting shows 3 degenerate matchups. Another even nastier case could be a player facing the same opponent in both the Open and Knockout sections. Hopefully one of the tags provides some help, if not, the result and moves must be used (or the game itself must be inspected).

The script runs in a command window – spitting out the leaders and pairing for each round. The collection is built in the same order (ordered by round, with the round leaders at the top):

Hoogovens 55e Builder (3)(as always – click to enlarge)

Everything works off the assumption that a normalized tournament is correctly built on your computer at home (or work, or wherever). Then, using SCID, a Swiss crosstable is built:

Hoogovens 55e Builder (4)Easy as 1…2…3  (I wish!)



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s