Games-Tournament-Swiss This is version 0.05 of Games::Tournament::Swiss. This is ALPHA-level software. It may not run. It will be slow. Although it attempts to implement the FIDE Swiss Rules, it may not pair players correctly. It may take over your computer, and force you to reboot. It may DESTROY your computer. Use at your own risk. If it does work, I reserve the right to change functionality and interfaces. In this version, I fix a few bugs and get ready in the scripts to do less serialization (storing of the program's data structures in files between runs of the program) and to do it more in a manner that is understandable by the chess world. That is, I want to use pairing tables, cross tables and the like to maintain state, rather than the pure programming objects I am freezing into the tourney.yaml, player.yaml etc files at the moment. These tables will still take the form of YAML files, and won't be pairing tables, but the contents will be relatable by the user to pairing tables. All this means that scripts which were working are likely to break. If the version you were using was doing what you wanted after a fashion (ha-ha), then you are not likely to do better with this version. As part of my plan, I have renamed the script_files script, 'pair' to 'pairstately' to allow me to rework pair. So the take-home message for 2-time readers of this is, use 'pairstately' rather than 'pair.' For 1st-time readers, this program is run from a shell. You need to work from a command line and type commands. It also depends on perl to run. If you don't know anything about perl, you will have to learn something about installing it and running scripts, before you can use this software. For perl on Windows, try the free download of ActiveState's distribution at http://www.activestate.com/store/activeperl, or the experimental Strawberry Perl http://win32.perl.org/wiki/index.php?title=Strawberry_Perl On other platforms, find it from your regular source for new packages. INSTALLATION This software doesn't install itself. To install this module, run the following commands: perl Build.PL or perl Makefile.PL ./Build make ./Build test make install ./Build install make may be nmake or dmake on Windows. The distribution is made up of modules and scripts. The modules provide functionality that you can use to write your own tournament software. The scripts are an example of a swiss pairing program. SCRIPTS The scripts in script_files/ need to be installed somewhere so that they can be run in the directory in which pairing of each round is done. DIRECTORY LAYOUT The scripts assume that there is a directory in which a configuration file, called league.yaml, with data about the players exists. The rounds are paired in subdirectories, named 1,2,3,.. below this directory. Files named: brackets.yaml pairing.yaml round.yaml matches.yaml player.yaml tourney.yaml are left in these subdirectories after pairing. Don't delete these, as they are what allows data to be carried over from round to round. Scores are in another subdirectory called scores. They are of the form 1.yaml, 2.yaml,.. You need to create these files yourself. DATA FILES Do not use tabs in these YAML files. The level of indentation is significant. Follow the examples closely. The first, league.yaml has lines of the form: member: - id: 1 name: Laver, Rod rating: 2810 title: Grandmaster - id: 2 name: Sampras, Pete rating: 2800 title: Unknown - id: 3 name: McEnroe, John rating: 2780 title: Unknown If you are using your own scoring scheme, and colors (called, roles), see the example below. You can add your own data to the member records. A pairing number is generated for the players, so don't add a pairing number. TODO Configuration of your own scoring scheme looks like it is broken. The score files: 1.yaml, etc, are of the form: 'Laver, Rod': Loss 'Sampras, Pete': Draw 'McEnroe, John': Bye First number is the name of the player. (Every name will have to be unique.) The second is the result for that player. A sample scoring scheme and roles in league.yaml could be: scores: win: 1 loss: 0 draw: 0.5 absent: 0 bye: 1 roles: - White - Black GENERATING PAIRINGS Starting with an empty main directory, create league.yaml, and an empty subdirectory for the first round. Run the script, 'pairstately' in the empty round subdirectory. A log of the pairing is printed and 'round.yaml' in the directory contains the matches. After the games in the round are complete, in the scores subdirectory, enter the scores for the players in the file, '1.yaml', or whatever the round is. Then you can run 'crosstable' or 'pairingtable' in the original directory above the subdirectory, to get current standings. If there is a next round, make another empty subdirectory, named after it and continue as before. SUPPORT AND DOCUMENTATION After installing, you can find documentation for this module with the perldoc command. perldoc Games::Tournament::Swiss You can also look for information at: Search CPAN, for documentation and source: http://search.cpan.org/dist/Games-Tournament-Swiss CPAN Request Tracker (Report Bugs here): http://rt.cpan.org/NoAuth/Bugs.html?Dist=Games-Tournament-Swiss AnnoCPAN, annotated CPAN documentation: http://annocpan.org/dist/Games-Tournament-Swiss CPAN Ratings: http://cpanratings.perl.org/d/Games-Tournament-Swiss COPYRIGHT AND LICENCE Copyright (C) 2006 Dr Bean This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.