Subject: | scores aren't recorded properly |
Date: | Wed, 5 Sep 2007 12:51:19 +0200 |
To: | bug-Games-Tournament-Swiss [...] rt.cpan.org |
From: | Christian Bartolomaeus <bartolin [...] gmx.de> |
Hi,
in the thread about C14 in FIDE.pm [1] I noted an error of script
"pair", complaining about missing results for players.
Show quoted text
> No result in round 1 for player 1, player_1 as White at
> /opt/perl_modules/Games-Tournament-Swiss-0.07/script_files/pair line 126
> No result in round 1 for player 2, player_2 as Black at
> /opt/perl_modules/Games-Tournament-Swiss-0.07/script_files/pair line 126
> [...]
> No result in round 1 for player 12, player_12 as White at
> /opt/perl_modules/Games-Tournament-Swiss-0.07/script_files/pair line 126
> No result in round 2 for player 1, player_1 as Black at
> /opt/perl_modules/Games-Tournament-Swiss-0.07/script_files/pair line 126
> No result in round 2 for player 2, player_2 as White at
> /opt/perl_modules/Games-Tournament-Swiss-0.07/script_files/pair line 126
> [...]
> No result in round 2 for player 11, player_11 as White at
> /opt/perl_modules/Games-Tournament-Swiss-0.07/script_files/pair line 126
> No result in round 2 for player 12, player_12 as Black at
> /opt/perl_modules/Games-Tournament-Swiss-0.07/script_files/pair line 126
You explained this is related to pair relying on pairing tables
nowadays.
Show quoted text> This is a warning about the use of pairing tables. They don't
> give the players' individual results in each round. There is only
> a total score.
Convincing as this explanation is, I suspect there is another problem
related to this one. [But maybe, it's not related.]
It seems as if the scores aren't recorded anymore in the yaml files in
round subdiretories -- at least they aren't recorded properly.
I guess that due to this, "crosstable" and "pairingtable" don't
generate correct tables if ($round > 1). If I insert
print Dump($player->scores);
in crosstable, directely before the table is printed out, it gives
values like:
1: ~
2: Win
If I use on old version of yaml files (generated with
Games::Tournament::Swiss Version 0.05) those lines read:
1: Win
2: Win
This corresponds to (or is caused by) missing values for "scores" in
yaml files (like player.yaml). A player.yaml file generated by version
0.07 (pairingtable -> pairtable2yaml -> pair) reads
- !!perl/hash:Games::Tournament::Contestant::Swiss
floater: Up
floats:
- ~
- None
id: 1
name: 'player_1'
oldId: 1
pairingNumber: 1
preference: !!perl/hash:Games::Tournament::Contestant::Swiss::Preference
difference: 1
direction: White
lastTwo:
- White
rating: 2200
roles:
- White
scores:
1: Draw
title: ~
while the corresponding lines from a player.yaml file generated with
version 0.05 are:
- !!perl/hash:Games::Tournament::Contestant::Swiss
floater: Up
floats:
- ~
- Not
id: 1
name: 'player_1'
oldId: 1
pairingNumber: 1
preference: !!perl/hash:Games::Tournament::Contestant::Swiss::Preference
difference: 1
direction: White
lastTwo:
- White
rating: 2200
roles:
- White
score: 0.5
scores:
1: ~
title: ~
As a result, the method "score" from Contestant.pm seems to be unable
to compute the total scores after two or more rounds, and therefor the
crosstables and pairingtables aren't correct.
I hope my description of the problem was understandable.
Best regards,
Christian
[1] http://rt.cpan.org/Public/Bug/Display.html?id=29073