Monday, March 28, 2016

Kitesurfing Memories

Finally got a woo to measure jumping height, and March delivered a 2 weeks spell of near 20 knot days to test it out. This video was of a particularly clean day in the run-out channel at 1/2 tide. Such a smooth section. Such a lovely day to be out on the water. Such a great time going higher and higher!

TournamentCompare v0.004 - Player Pools

One slight deviation from the old Clarion application is that I have instituted player pools as a starting point for a tournament. All players for a tournament are entered into a sorted list (player pool) that the tournament template draws from. This allows the generation of the player pool to be independent from the tournament template and can therefore be used to test all sorts of varied starting positions and even seeding patterns.

For smaller tournament formats (8 players or less), every possible player pool combination can be generated and used in sequence to eliminate another possible bias. For 8 players this would be 40320 combinations (8 factorial). If a tournament is larger than 8, you could potentially take the top 8 combinations and interleave other random players to give 16, 32, 64, or 128 player pools. This would give a large control set (~40,000 samples), but at least give a somewhat even spread of higher candidates.Unfortunately it would also eliminate the random chance that the most skilled player meets the second most skilled player in round 1 of a 128 player tournament. Since generating a random player pool will be quite easy, I can also test the difference of these two formats and isolate a specific amount of bias due to potential seeding.      

TournamentCompare v0.003 - Validating a tournament template

Because the tournament template system is flexible enough to allow all sorts of formats, it is also flexible enough to bring in all sorts of loops, missing players, unlinked matches, etc, so I'll be making up a validator to vet each tournament template before running thousands of tests on an invalid tournament.

Here's the high level pseudocode:

  1. Start with the final match and work back along the player entry locations until all matches have been processed into a list (vettedMatchList) and all the players are in another list (competitorList). This also sets the match layer (how deep into the tournament that this match represents)
  2. Check to make sure that all TournamentTemplateMatches for this TournamentTemplate have been accounted for.
  3. Check to make sure that all competitors have an entry into the tournament
  4. Build a list (noExitMatchList) for each match that 2nd place continues in the tournament.This is combined with the match layer to evaluate final exit position for 2nd placegetters that do NOT continue.
  5. Mark the tournament as valid and update the database with match layers & exit positions.