Skip Menu |

This queue is for tickets about the Games-Tournament-Swiss CPAN distribution.

Report information
The Basics
Id: 29073
Status: stalled
Priority: 0/
Queue: Games-Tournament-Swiss

People
Owner: Nobody in particular
Requestors: bartolin [...] gmx.de
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Problems with C14 in FIDE.pm
Date: Thu, 30 Aug 2007 20:10:14 +0200
To: bug-Games-Tournament-Swiss [...] rt.cpan.org
From: Christian Bartolomaeus <bartolin [...] gmx.de>
Hi, I'm still trying to get a better understanding of your pairing algorithm in FIDE.pm. But I think there is a problem with lines 1125 and 1126 in combination with line 1141. In line 1125 and 1126 $args{index} and $args{brackets}, respectively, get deleted by my $index = delete $args{index}; my $groups = delete $args{brackets}; Since no new values are created, the %args returned from c14 in line 1126 are missing values for "index" and "brackets". Therefore C4 doesn't seem to work properly when called next time. In line 1158-1161 you are defining new values for $args{index} and $args{brackets} -- but not an line 1126. But returning the for $args{index} and $args{brackets} doesn't seem to be the right thing as well. Best regards Christian
Subject: Re: [rt.cpan.org #29073] AutoReply: Problems with C14 in FIDE.pm
Date: Thu, 30 Aug 2007 22:05:31 +0200
To: Bugs in Games-Tournament-Swiss via RT <bug-Games-Tournament-Swiss [...] rt.cpan.org>
From: Christian Bartolomaeus <bartolin [...] gmx.de>
* On 2007-08-30 Bugs in Games-Tournament-Swiss via RT (bug-Games-Tournament-Swiss@rt.cpan.org) wrote: Show quoted text
> > I'm still trying to get a better understanding of your pairing > algorithm in FIDE.pm. But I think there is a problem with lines 1125 > and 1126 in combination with line 1141. > > In line 1125 and 1126 $args{index} and $args{brackets}, respectively, > get deleted by > > my $index = delete $args{index}; > my $groups = delete $args{brackets}; > > Since no new values are created, the %args returned from c14 in line > 1126 are missing values for "index" and "brackets". Therefore C4 > doesn't seem to work properly when called next time.
Actually my problems occured with the following pairingtable: Round 3 Pairing Groups ------------------------------------------------------------------------- Place No Opponents Roles Float Score 1-2 1 7,2 BW 1.5 2 8,1 WB 1.5 3-10 3 9,11 BW 1 4 10,12 WB 1 5 11,9 BW 1 6 12,10 WB 1 9 3,5 WB 1 10 4,6 BW 1 11 5,3 WB 1 12 6,4 BW 1 11-12 7 1,8 WB 0.5 8 2,7 BW 0.5 Trying to get pairings for the third round, pairstately failed with the following output: [...] C10,re-pairing Player 2 in Bracket 2 C7, last transposition C10,again C11, x=p=2 already, no more x increases in Bracket 2. C14, Bracket 2, now p=1 Use of uninitialized value in array element at /usr/local/share/perl/5.8.8/Games/Tournament/Swiss/Procedure/FIDE.pm line 443. Can't call method "members" on an undefined value at /usr/local/share/perl/5.8.8/Games/Tournament/Swiss/Procedure/FIDE.pm line 444. As I understand, there is no legal pairing for players 7 and 8 in the last bracket because they were already paired against each other. But in that case according to C13 the last two brackets should be joined. Why is C14 used at all? Wouldn't the pairing algorithm work like: 1. C1 / Bracket 1: Players 1 and 2 are moved down 2. C4,C5 / Bracket 2: Players 1 and 2 are paired agains two players from S2 3. C8,C5,C6,C7 / (remaining) Bracket 2: The remaining six players are paired agains each other. 4. C13 / Bracket 3: No pairing possible -> back to Step 3 (Bracket 2) 5. C13 / Bracket 2/3: Join brackets since there are no pairings for Bracket 2 which allow a pairing for Bracket 3 6. C4,C5 / (joined) Bracket 2: Find pairings for joined bracket -> that's possible But why is C14 needed? Best regards Christian
Subject: Re: [rt.cpan.org #29073] Problems with C14 in FIDE.pm
Date: Fri, 31 Aug 2007 01:28:17 +0000
To: Christian Bartolomaeus via RT <bug-Games-Tournament-Swiss [...] rt.cpan.org>
From: Greg Matheson <drbean [...] freeshell.org>
On Thu, 30 Aug 2007, Christian Bartolomaeus via RT wrote: Show quoted text
> In line 1125 and 1126 $args{index} and $args{brackets}, respectively, > get deleted by
Show quoted text
> my $index = delete $args{index}; > my $groups = delete $args{brackets};
Show quoted text
> Since no new values are created, the %args returned from c14 in line > 1126 are missing values for "index" and "brackets". Therefore C4 > doesn't seem to work properly when called next time.
Oops. You're right. Show quoted text
> But returning the for $args{index} and $args{brackets} doesn't seem to > be the right thing as well.
I don't understand.
Subject: Re: [rt.cpan.org #29073] AutoReply: Problems with C14 in FIDE.pm
Date: Fri, 31 Aug 2007 01:54:24 +0000
To: Christian Bartolomaeus via RT <bug-Games-Tournament-Swiss [...] rt.cpan.org>
From: Greg Matheson <drbean [...] freeshell.org>
On Thu, 30 Aug 2007, Christian Bartolomaeus via RT wrote: Show quoted text
> Actually my problems occured with the following pairingtable:
Show quoted text
> Round 3 Pairing Groups > ------------------------------------------------------------------------- > Place No Opponents Roles Float Score > 1-2 > 1 7,2 BW 1.5 > 2 8,1 WB 1.5 > 3-10 > 3 9,11 BW 1 > 4 10,12 WB 1 > 5 11,9 BW 1 > 6 12,10 WB 1 > 9 3,5 WB 1 > 10 4,6 BW 1 > 11 5,3 WB 1 > 12 6,4 BW 1 > 11-12 > 7 1,8 WB 0.5 > 8 2,7 BW 0.5
I should try to include that in the tests. Show quoted text
> Trying to get pairings for the third round, pairstately failed with > the following output:
Show quoted text
> [...] > C10,re-pairing Player 2 in Bracket 2 > C7, last transposition > C10,again C11, x=p=2 already, no more x increases in Bracket 2. > C14, Bracket 2, now p=1 > Use of uninitialized value in array element at /usr/local/share/perl/5.8.8/Games/Tournament/Swiss/Procedure/FIDE.pm line 443. > Can't call method "members" on an undefined value at /usr/local/share/perl/5.8.8/Games/Tournament/Swiss/Procedure/FIDE.pm line 444.
That would be the message that your analysis of the bug would imply. Show quoted text
> As I understand, there is no legal pairing for players 7 and 8 in the > last bracket because they were already paired against each other. But > in that case according to C13 the last two brackets should be joined. > Why is C14 used at all? Wouldn't the pairing algorithm work like:
Show quoted text
> 1. C1 / Bracket 1: Players 1 and 2 are moved down
Show quoted text
> 2. C4,C5 / Bracket 2: Players 1 and 2 are paired agains two players > from S2
Show quoted text
> 3. C8,C5,C6,C7 / (remaining) Bracket 2: The remaining six players are > paired agains each other.
Show quoted text
> 4. C13 / Bracket 3: No pairing possible -> back to Step 3 (Bracket 2)
Show quoted text
> 5. C13 / Bracket 2/3: Join brackets since there are no pairings for > Bracket 2 which allow a pairing for Bracket 3
Show quoted text
> 6. C4,C5 / (joined) Bracket 2: Find pairings for joined bracket -> > that's possible
Show quoted text
> But why is C14 needed?
I'm not an expert on the FIDE rules, but C13 talks about p becoming zero in the penultimate bracket. The only way to decrease p is through C14. I'm not clear about the sequencing of the rules. C13 seems to include a number of different steps, depending on what happens before C13. What happens when you restore the round and groups before calling C4 as you said should happen in the previous message?
Subject: Re: [rt.cpan.org #29073] Problems with C14 in FIDE.pm
Date: Fri, 31 Aug 2007 08:19:48 +0200
To: Greg Matheson via RT <bug-Games-Tournament-Swiss [...] rt.cpan.org>
From: Christian Bartolomaeus <bartolin [...] gmx.de>
* On 2007-08-30 Greg Matheson via RT (bug-Games-Tournament-Swiss@rt.cpan.org) wrote: Show quoted text
> [...]
> > In line 1125 and 1126 $args{index} and $args{brackets}, respectively, > > get deleted by
>
> > my $index = delete $args{index}; > > my $groups = delete $args{brackets};
>
> > Since no new values are created, the %args returned from c14 in line > > 1126 are missing values for "index" and "brackets". Therefore C4 > > doesn't seem to work properly when called next time.
> > Oops. You're right. >
> > But returning the for $args{index} and $args{brackets} doesn't seem to > > be the right thing as well.
> > I don't understand.
Sorry. I meant "But returning the old values for $args{index} and $args{brackets} doesn't seem to be the right thing as well." So, if I change line 1141 from if ($pprime > 0) {return ( C4, %args );} to if ($pprime > 0) {return C4, index => @{ [ $index + 1 ] }, brackets => $groups, %args; } the algorithm is caught in a loop, whereas decreasing $args{index} by if ($pprime > 0) {return C4, index => @{ [ $index ] }, brackets => $groups, %args; } for some reasons gives pairings, but wrong ones. Somehow one player (player 2) seems to be dropped by "C6others": (output from pairstately): ==== C7, last transposition C8, exchange 5: last S1,S2 exchange C10,re-pairing Player 2 in Bracket 2 C7, last transposition C10,again C11, x=p=2 already, no more x increases in Bracket 2. C14, Bracket 2, now p=1 C4, S1 & S2: 1 2 & 12 4 3 5 6 9 10 11 C5, ordered: 1 2 & 3 4 5 6 9 10 11 12 C6, 1 tables paired. E4 3&1 C6others: Remainder Group, Bracket 2: 4 5 6 9 10 11 12 ==== Best regards Christian
Subject: Re: [rt.cpan.org #29073] AutoReply: Problems with C14 in FIDE.pm
Date: Fri, 31 Aug 2007 08:44:21 +0200
To: Greg Matheson via RT <bug-Games-Tournament-Swiss [...] rt.cpan.org>
From: Christian Bartolomaeus <bartolin [...] gmx.de>
* On 2007-08-30 Greg Matheson via RT (bug-Games-Tournament-Swiss@rt.cpan.org) wrote: Show quoted text
>
> > As I understand, there is no legal pairing for players 7 and 8 in the > > last bracket because they were already paired against each other. But > > in that case according to C13 the last two brackets should be joined. > > Why is C14 used at all? Wouldn't the pairing algorithm work like:
>
> > 1. C1 / Bracket 1: Players 1 and 2 are moved down
>
> > 2. C4,C5 / Bracket 2: Players 1 and 2 are paired agains two players > > from S2
>
> > 3. C8,C5,C6,C7 / (remaining) Bracket 2: The remaining six players are > > paired agains each other.
>
> > 4. C13 / Bracket 3: No pairing possible -> back to Step 3 (Bracket 2)
>
> > 5. C13 / Bracket 2/3: Join brackets since there are no pairings for > > Bracket 2 which allow a pairing for Bracket 3
>
> > 6. C4,C5 / (joined) Bracket 2: Find pairings for joined bracket -> > > that's possible
>
> > But why is C14 needed?
> > I'm not an expert on the FIDE rules, but C13 talks about p > becoming zero in the penultimate bracket. The only way to > decrease p is through C14. > > I'm not clear about the sequencing of the rules. C13 seems to > include a number of different steps, depending on what happens > before C13.
For sure, I'm even less an expert. But somehow I think one should arrive at the last part of the c13 function in FIDE.pm. If (! $pprime > 0) the last two brackets should be joined (lines 1043 to 1059). It seems to me, that the algoritm doesn't get there. But of course that may be a problem with the bug in C14. Show quoted text
> What happens when you restore the round and groups before calling > C4 as you said should happen in the previous message?
I hope that question was answered in my other mail? Best regards Christian
Subject: Re: [rt.cpan.org #29073] Problems with C14 in FIDE.pm
Date: Sat, 1 Sep 2007 08:19:27 +0200
To: Greg Matheson via RT <bug-Games-Tournament-Swiss [...] rt.cpan.org>
From: Christian Bartolomaeus <bartolin [...] gmx.de>
Hi, * On 2007-08-31 Christian Bartolomaeus (bartolin@gmx.de) wrote: Show quoted text
> [...] > Sorry. I meant "But returning the old values for $args{index} and > $args{brackets} doesn't seem to be the right thing as well." > > So, if I change line 1141 from > > if ($pprime > 0) {return ( C4, %args );} > > to > > if ($pprime > 0) {return C4, index => @{ [ $index + 1 ] }, brackets => $groups, %args; } > > the algorithm is caught in a loop, whereas decreasing $args{index} by > > if ($pprime > 0) {return C4, index => @{ [ $index ] }, brackets => $groups, %args; } > > for some reasons gives pairings, but wrong ones. Somehow one player > (player 2) seems to be dropped by "C6others": (output from > pairstately):
may I add that the new version of FIDE.pm (from 0.06) works much better? It seems to me that there is only one problem left: All pairings look okay, but somehow the first two (correct) pairings are "forgotten" while the other pairings are computed. Pairingtable: ==== Round 3 Pairing Groups ---------------------------------------------- Place No Opponents Roles Float Score 1-2 1 7,2 BW 1.5 2 8,1 WB 1.5 3-10 3 9,11 BW 1 4 10,12 WB 1 5 11,9 BW 1 6 12,10 WB 1 9 3,5 WB 1 10 4,6 BW 1 11 5,3 WB 1 12 6,4 BW 1 11-12 7 1,8 WB 0.5 8 2,7 BW 0.5 ==== Excerpt from pairstately -- you'll find the full output attached: ==== [...] C6, 2 tables paired. E1 4&1 E1 2&10 C6others: Remainder Group, Bracket 2: 3 5 6 9 11 12 [...] [after that, players 4,1,2,10 aren't considered any more] [...] C6, 2 tables paired. E1 6&3 E1 9&12 C6others: Remainder Group, Bracket 2: 5 11 C1, B1a: NOK. 5 11 Bracket 2. Floating 5 Down, 11 Down, [2] 11 => [3] 11 5 7 8 [...] C6, 2 tables paired. E1 7&5 E1 11&8 C6others: no non-paired players Pairing complete ==== The pairings in 3/round.yaml are: 6-3, 9-12, 7-5, 11-8 That seems to be correct, but the first two pairings 4-1 and 2-10 are missing. Just a note: I just replaced the old FIDE.pm with the new module from version 0.06. Otherwise I used the old module files. Best regards Christian

Message body is not shown because sender requested not to inline it.

Subject: Re: [rt.cpan.org #29073] AutoReply: Problems with C14 in FIDE.pm
Date: Sat, 1 Sep 2007 08:03:46 +0000
To: Christian Bartolomaeus via RT <bug-Games-Tournament-Swiss [...] rt.cpan.org>
From: Greg Matheson <drbean [...] freeshell.org>
On Fri, 31 Aug 2007, Christian Bartolomaeus via RT wrote: Show quoted text
> > > As I understand, there is no legal pairing for players 7 and 8 in the > > > last bracket because they were already paired against each other. But > > > in that case according to C13 the last two brackets should be joined. > > > Why is C14 used at all? Wouldn't the pairing algorithm work like:
Show quoted text
> > > 1. C1 / Bracket 1: Players 1 and 2 are moved down
Show quoted text
> > > 2. C4,C5 / Bracket 2: Players 1 and 2 are paired agains two players > > > from S2
Show quoted text
> > > 3. C8,C5,C6,C7 / (remaining) Bracket 2: The remaining six players are > > > paired agains each other.
Show quoted text
> > > 4. C13 / Bracket 3: No pairing possible -> back to Step 3 (Bracket 2)
Show quoted text
> > > 5. C13 / Bracket 2/3: Join brackets since there are no pairings for > > > Bracket 2 which allow a pairing for Bracket 3
Show quoted text
> > > 6. C4,C5 / (joined) Bracket 2: Find pairings for joined bracket -> > > > that's possible
Show quoted text
> > > But why is C14 needed?
Show quoted text
> > I'm not an expert on the FIDE rules, but C13 talks about p > > becoming zero in the penultimate bracket. The only way to > > decrease p is through C14.
Show quoted text
> > I'm not clear about the sequencing of the rules. C13 seems to > > include a number of different steps, depending on what happens > > before C13.
Show quoted text
> For sure, I'm even less an expert. But somehow I think one should > arrive at the last part of the c13 function in FIDE.pm.
Show quoted text
> If (! $pprime > 0) the last two brackets should be joined (lines 1043 > to 1059). It seems to me, that the algoritm doesn't get there.
Before getting to the joining of the last 2 brackets, you have to try and find a different pairing in Bracket 2, ie in between your step 4. and step 5. It looks like the FIDE.pm in 0.06 is now, at the moment, going through C14, dropping p from 3 to 2, ie pairing only 2 tables in Bracket 2, before downfloating the other 2 players to Bracket 3. And these 2 downfloated players allow 2 matches in Bracket 3. Thus we avoid the necessity of joining Bracket 2 and Bracket 3 together, to pair 7 and 8, the 2 incompatible players in Bracket 3. That's just my interpretation of the sequencing. I would be interested if other people disagree. Is this a pairing of a real tournament, or a notional one?
Subject: Re: [rt.cpan.org #29073] Problems with C14 in FIDE.pm
Date: Sat, 1 Sep 2007 10:15:40 +0000
To: Christian Bartolomaeus via RT <bug-Games-Tournament-Swiss [...] rt.cpan.org>
From: Greg Matheson <drbean [...] freeshell.org>
On Sat, 01 Sep 2007, Christian Bartolomaeus via RT wrote: Show quoted text
> may I add that the new version of FIDE.pm (from 0.06) works much > better? It seems to me that there is only one problem left: All > pairings look okay, but somehow the first two (correct) pairings are > "forgotten" while the other pairings are computed.
I noticed that before releasing 0.06, but I wanted to get a version out with the new 'pair' and 'pairtable2yaml'. Show quoted text
> Pairingtable: > ==== > Round 3 Pairing Groups > ---------------------------------------------- > Place No Opponents Roles Float Score > 1-2 > 1 7,2 BW 1.5 > 2 8,1 WB 1.5 > 3-10 > 3 9,11 BW 1 > 4 10,12 WB 1 > 5 11,9 BW 1 > 6 12,10 WB 1 > 9 3,5 WB 1 > 10 4,6 BW 1 > 11 5,3 WB 1 > 12 6,4 BW 1 > 11-12 > 7 1,8 WB 0.5 > 8 2,7 BW 0.5 > ====
Show quoted text
> Just a note: I just replaced the old FIDE.pm with the new module from > version 0.06. Otherwise I used the old module files.
There are a few changes in Games/Tournament/Swiss.pm and Card.pm and Contestant.pm. I guess they aren't major, or you wouldn't be getting the same results as me. Show quoted text
> Round 3: 1 2 (1.5), 3 4 5 6 9 10 11 12 (1), 7 8 (0.5),
First, Bracket 1 is floated down and paired with 2 players. The remainder group is also paired, requiring 3 exchanges, but this leaves Bracket 3 unpairable. Show quoted text
> C6, 3 tables paired. E1 6&5 E1 9&10 E1 11&12 > C6others: no non-paired players > Next, Bracket 3: 7 8 > C1, B1a: NOK. 7 8 > C13, Undoing Bracket 2 matches. Re-pairing Bracket 2, p=2. > C7, 4 5 3 6 9 10 11 12 > C6, 2 tables paired. E1 4&1 E1 2&5
This time 1 and 2 are paired with 4 and 5 instead of 4 and 3, leaving a different remainder group. One thing I am unsure about is whether the remainder group should be repaired, or the whole group. I think it's the whole group. Show quoted text
> C6others: Remainder Group, Bracket 2: 3 6 9 10 11 12 > C1, B1,2 test: ok, no unpairables > C2, x=0 > C3, p=3 Heterogeneous.
For some reason, the remainder group is being regarded as heterogeneous. This is a bug I think. 3 is being regarded as an upFloater, even though the pairing with 2 has been undone in C13. The fix for this is: @@ -1053,6 +1053,7 @@ $group->exit($_) for @floaters; $_->floating('') for @floaters; $penultimate->reentry($_) for @floaters; + $_->floating('') for ( $penultimate->upFloaters ); delete $args{badpair}; $groups->[$index] = $group; $groups->[$index-1] = $penultimate; But that's just going to mean it takes a very long time in C8 trying out all the exchanges, before we start reducing pprime through C14. It may not even be the right fix. Trying it out here, it seems to result in trying to repair 1 and 2 with other members of Bracket 2, again and again, rather than reducing pprime in the remainder bracket. I guess this is a result of C10 kicking in, trying to re-pair 1 and 2 to prevent players being downfloated from the remainder group to Bracket 3. Whereas this is actually what we want: the downfloating of a player to Bracket 3. And somehow a player got lost and there is only one player in the last group. Perhaps if we get to C13 once, we are justified in avoiding C10 to get back there. That seems to be the language of C13: "Try to find another pairing in the penultimate score bracket which will allow a pairing in the lowest score bracket." Perhaps I will ask on http://www.chesschat.org Show quoted text
> C11, x=1, Undoing all Bracket 2 matches > C11, x=2, Undoing all Bracket 2 matches > Next, Bracket 3: 7 8 > C1, B1a: NOK. 7 8 > C13, Undoing Bracket 2 matches. Re-pairing Bracket 2, p=2. > C11, x=1, Undoing all Bracket 2 matches > C11, x=2, Undoing all Bracket 2 matches > C11, x=3, Undoing all Bracket 2 matches > C11, x=p=3 already, no more x increases in Bracket 2. > C14, Bracket 2, now p=2 > Next, Bracket 3: 7 8 > C1, B1a: NOK. 7 8 > C13, Undoing Bracket 2 matches. Re-pairing Bracket 2, p=2. > Next, Bracket 3: 7 8 > C1, B1a: NOK. 7 8 > C13, Undoing Bracket 2 matches. Re-pairing Bracket 2, p=2. > Next, Bracket 3: 7 8 > C1, B1a: NOK. 7 8 > C13, Undoing Bracket 2 matches. Re-pairing Bracket 2, p=2. > C1, B1a: NOK. 5 11 Bracket 2. Floating 5 Down, 11 Down, [2] 11 => [3] 11 5 7 8
Show quoted text
> Next, Bracket 3: 11 5 7 8 > C1, B1,2 test: ok, no unpairables > C2, x=0 > C3, p=2 Heterogeneous. > C4, S1 & S2: 11 5 & 7 8 > C5, ordered: 5 11 & 7 8 > C6, 2 tables paired. E1 7&5 E1 11&8 > C6others: no non-paired players > Pairing complete
Perhaps that is the right pairing. :-) And, perhaps you were right about the joining of Brackets 2 and 3. But I didn't see why the first 2 tables got lost. I guess it's because of the repairing of the 2nd group.
Subject: Re: [rt.cpan.org #29073] AutoReply: Problems with C14 in FIDE.pm
Date: Sat, 1 Sep 2007 16:28:53 +0200
To: Greg Matheson via RT <bug-Games-Tournament-Swiss [...] rt.cpan.org>
From: Christian Bartolomaeus <bartolin [...] gmx.de>
Hi, * On 2007-09-01 Greg Matheson via RT (bug-Games-Tournament-Swiss@rt.cpan.org) wrote: Show quoted text
> [...]
> > > > As I understand, there is no legal pairing for players 7 and 8 in the > > > > last bracket because they were already paired against each other. But > > > > in that case according to C13 the last two brackets should be joined. > > > > Why is C14 used at all? Wouldn't the pairing algorithm work like:
>
> > > > 1. C1 / Bracket 1: Players 1 and 2 are moved down
>
> > > > 2. C4,C5 / Bracket 2: Players 1 and 2 are paired agains two players > > > > from S2
>
> > > > 3. C8,C5,C6,C7 / (remaining) Bracket 2: The remaining six players are > > > > paired agains each other.
>
> > > > 4. C13 / Bracket 3: No pairing possible -> back to Step 3 (Bracket 2)
>
> > > > 5. C13 / Bracket 2/3: Join brackets since there are no pairings for > > > > Bracket 2 which allow a pairing for Bracket 3
>
> > > > 6. C4,C5 / (joined) Bracket 2: Find pairings for joined bracket -> > > > > that's possible
>
> > > > But why is C14 needed?
>
> > > I'm not an expert on the FIDE rules, but C13 talks about p > > > becoming zero in the penultimate bracket. The only way to > > > decrease p is through C14.
>
> > > I'm not clear about the sequencing of the rules. C13 seems to > > > include a number of different steps, depending on what happens > > > before C13.
>
> > For sure, I'm even less an expert. But somehow I think one should > > arrive at the last part of the c13 function in FIDE.pm.
>
> > If (! $pprime > 0) the last two brackets should be joined (lines 1043 > > to 1059). It seems to me, that the algoritm doesn't get there.
> > Before getting to the joining of the last 2 brackets, you have to > try and find a different pairing in Bracket 2, ie in between your > step 4. and step 5. > > It looks like the FIDE.pm in 0.06 is now, at the moment, going > through C14, dropping p from 3 to 2, ie pairing only 2 tables in > Bracket 2, before downfloating the other 2 players to Bracket 3.
If I'm not mistaken, FIDE.pm doesn't downfloat those other 2 players straight away (as it IMHO should do, according to C6, since it is a homogenous group), but tries to pair them first against each other. Since that doesn't help for bracket 3 FIDE.pm repairs the first mentioned 2 tables until the remaining two players can't be paired against each other. Only then they are downfloated. But that means, the first 2 tables of Bracket 2 are unnecessarily (and maybe wrongly) repaired. At least that's how I interprete the following sequence: ==== C14, Bracket 2, now p=2 C4, S1 & S2: 3 5 & 6 12 11 9 C5, ordered: 3 5 & 6 9 11 12 C6, B1a: table 2 NOK C7, 6 11 9 12 C6, B1a: table 2 NOK C7, 6 12 9 11 C6, 2 tables paired. E1 6&3 E4 12&5 C6others: Remainder Group, Bracket 2: 9 11 C1, B1,2 test: ok, no unpairables C2, x=1 C3, p=1 Homogeneous. C4, S1 & S2: 9 & 11 C5, ordered: 9 & 11 C6, 1 tables paired. E4 9&11 C6others: no non-paired players Next, Bracket 3: 7 8 C1, B1a: NOK. 7 8 C13, Undoing Bracket 2 matches. Re-pairing Bracket 2, p=2. C7, 9 6 11 12 C6, B1a: table 1 NOK C7, 11 6 9 12 C6, B1a: table 1 NOK C7, 12 6 9 11 C6, 2 tables paired. E4 12&3 E1 6&5 C6others: Remainder Group, Bracket 2: 9 11 C1, B1,2 test: ok, no unpairables C2, x=1 C3, p=1 Homogeneous. C4, S1 & S2: 9 & 11 C5, ordered: 9 & 11 C6, 1 tables paired. E4 9&11 C6others: no non-paired players Next, Bracket 3: 7 8 C1, B1a: NOK. 7 8 C13, Undoing Bracket 2 matches. Re-pairing Bracket 2, p=2. C7, 12 9 6 11 C6, B1a: table 2 NOK C7, 12 11 6 9 C6, B1a: table 2 NOK C7, last transposition C9, Dropping B6 for Downfloats C4, S1 & S2: 12 6 & 3 5 11 9 C5, ordered: 6 12 & 3 5 9 11 C6, 2 tables paired. E1 6&3 E4 5&12 C6others: Remainder Group, Bracket 2: 9 11 C1, B1,2 test: ok, no unpairables C2, x=1 C3, p=1 Homogeneous. C4, S1 & S2: 9 & 11 C5, ordered: 9 & 11 C6, 1 tables paired. E4 9&11 C6others: no non-paired players Next, Bracket 3: 7 8 C1, B1a: NOK. 7 8 C13, Undoing Bracket 2 matches. Re-pairing Bracket 2, p=2. C7, 3 9 5 11 C6, 2 tables paired. E1 6&3 E1 9&12 C6others: Remainder Group, Bracket 2: 5 11 C1, B1a: NOK. 5 11 Bracket 2. Floating 5 Down, 11 Down, [2] 11 => [3] 11 5 7 8 Next, Bracket 3: 11 5 7 8 C1, B1,2 test: ok, no unpairables C2, x=0 C3, p=2 Heterogeneous. C4, S1 & S2: 11 5 & 7 8 C5, ordered: 5 11 & 7 8 C6, 2 tables paired. E1 7&5 E1 11&8 C6others: no non-paired players Pairing complete ==== Show quoted text
> And these 2 downfloated players allow 2 matches in Bracket 3. > Thus we avoid the necessity of joining Bracket 2 and Bracket 3 > together, to pair 7 and 8, the 2 incompatible players in Bracket > 3. > > That's just my interpretation of the sequencing. I would be > interested if other people disagree.
After re-reading the FIDE Swiss Rules for a while, I tend to agree with you, that it's not necessary to rejoin Bracket 2 and 3. But I will comment on your other mail regarding the question whether the whole group or the remainder group should be repaired. I think, it should be the remainder group -- as happened in the example above after C14. But more on this my next mail. Show quoted text
> Is this a pairing of a real tournament, or a notional one?
It's just a notional one. I invented it to test the pairing algorithm. Best regards Christian
Subject: Re: [rt.cpan.org #29073] Problems with C14 in FIDE.pm
Date: Sat, 1 Sep 2007 16:54:57 +0200
To: Greg Matheson via RT <bug-Games-Tournament-Swiss [...] rt.cpan.org>
From: Christian Bartolomaeus <bartolin [...] gmx.de>
Hi, * On 2007-09-01 Greg Matheson via RT (bug-Games-Tournament-Swiss@rt.cpan.org) wrote: Show quoted text
> [...]
> > Pairingtable: > > ==== > > Round 3 Pairing Groups > > ---------------------------------------------- > > Place No Opponents Roles Float Score > > 1-2 > > 1 7,2 BW 1.5 > > 2 8,1 WB 1.5 > > 3-10 > > 3 9,11 BW 1 > > 4 10,12 WB 1 > > 5 11,9 BW 1 > > 6 12,10 WB 1 > > 9 3,5 WB 1 > > 10 4,6 BW 1 > > 11 5,3 WB 1 > > 12 6,4 BW 1 > > 11-12 > > 7 1,8 WB 0.5 > > 8 2,7 BW 0.5 > > ====
> [...]
> > Round 3: 1 2 (1.5), 3 4 5 6 9 10 11 12 (1), 7 8 (0.5),
> > First, Bracket 1 is floated down and paired with 2 players. The > remainder group is also paired, requiring 3 exchanges, but this > leaves Bracket 3 unpairable. >
> > C6, 3 tables paired. E1 6&5 E1 9&10 E1 11&12 > > C6others: no non-paired players > > Next, Bracket 3: 7 8 > > C1, B1a: NOK. 7 8 > > C13, Undoing Bracket 2 matches. Re-pairing Bracket 2, p=2. > > C7, 4 5 3 6 9 10 11 12 > > C6, 2 tables paired. E1 4&1 E1 2&5
> > This time 1 and 2 are paired with 4 and 5 instead of 4 and 3, > leaving a different remainder group. > > One thing I am unsure about is whether the remainder group should > be repaired, or the whole group. I think it's the whole group.
I think, only the remainder group should be repaired. Firstly, intuitively it seems to me that the pairings of the downfloated players from Bracket 1 (players 1 and 2) shouldn't be affected (changed) by pairing problems for the next bracket -- at least if it's not absolutely necessary. Speaking about a chess tournament, it would be odd, if the decisive pairing for the leading players for the last round would be influenced by some problems regarding place, let's say, 20. Secondly, I would interpret A3 of the FIDE Swiss Rules in a way, that a "remainder score bracket" is treated as a regular (homogeneous) "score bracket". (Though it's a bit strange that e.g. C6 speaks about a "homogeneous remainder group" and not a "homogeneous remainder score bracket". Maybe the wording of the FIDE rules aren't that good in that respect?) So maybe, one should speak about the original (heterogeneous) score bracket (players 1,2 & 3,4,5,6,9,10,11,12) as "Bracket 2" and about the remainder group (players 5,6,9,10,11,12) as "Bracket 2a" (or even Bracket 3)? Or am I totally off the track? Show quoted text
> > C6others: Remainder Group, Bracket 2: 3 6 9 10 11 12 > > C1, B1,2 test: ok, no unpairables > > C2, x=0 > > C3, p=3 Heterogeneous.
> > For some reason, the remainder group is being regarded as > heterogeneous. This is a bug I think. > > 3 is being regarded as an upFloater, even though the pairing with > 2 has been undone in C13. > > The fix for this is: > > @@ -1053,6 +1053,7 @@ > $group->exit($_) for @floaters; > $_->floating('') for @floaters; > $penultimate->reentry($_) for @floaters; > + $_->floating('') for ( $penultimate->upFloaters ); > delete $args{badpair}; > $groups->[$index] = $group; > $groups->[$index-1] = $penultimate; > > But that's just going to mean it takes a very long time in C8 > trying out all the exchanges, before we start reducing pprime > through C14. > > It may not even be the right fix. Trying it out here, it seems to > result in trying to repair 1 and 2 with other members of Bracket > 2, again and again, rather than reducing pprime in the remainder > bracket. > > I guess this is a result of C10 kicking in, trying to re-pair 1 > and 2 to prevent players being downfloated from the remainder > group to Bracket 3. Whereas this is actually what we want: the > downfloating of a player to Bracket 3.
I didn't try to apply your fix. But: Wouldn't this problem went away if one repairs only the homogeneous "remainder score bracket" (with p decreased by 1 due to C14). In that case C6 would apply and the two remaining (unpaired) players were downfloated directly. C10 wouldn't relevant in that case, would it? Show quoted text
> Perhaps if we get to C13 once, we are justified in avoiding > C10 to get back there. > > That seems to be the language of C13: "Try to find another > pairing in the penultimate score bracket which will allow a > pairing in the lowest score bracket." > > Perhaps I will ask on http://www.chesschat.org
I'll follow any new discussion there. Show quoted text
> But I didn't see why the first 2 tables got lost. I guess it's > because of the repairing of the 2nd group.
At the moment I have no idea about that. Best regards Christian
Subject: Re: [rt.cpan.org #29073] AutoReply: Problems with C14 in FIDE.pm
Date: Tue, 4 Sep 2007 15:01:48 +0000
To: Christian Bartolomaeus via RT <bug-Games-Tournament-Swiss [...] rt.cpan.org>
From: Greg Matheson <drbean [...] freeshell.org>
On Sat, 01 Sep 2007, Christian Bartolomaeus via RT wrote: Show quoted text
> > > > I'm not clear about the sequencing of the rules. C13 seems to > > > > include a number of different steps, depending on what happens > > > > before C13.
Show quoted text
> > > For sure, I'm even less an expert. But somehow I think one should > > > arrive at the last part of the c13 function in FIDE.pm.
Show quoted text
> > > If (! $pprime > 0) the last two brackets should be joined (lines 1043 > > > to 1059). It seems to me, that the algoritm doesn't get there.
I think if $pprime == 0, then the last 2 brackets should be joined, but if it != 0, then they don't have to be. Show quoted text
> > Before getting to the joining of the last 2 brackets, you have to > > try and find a different pairing in Bracket 2, ie in between your > > step 4. and step 5.
Show quoted text
> > It looks like the FIDE.pm in 0.06 is now, at the moment, going > > through C14, dropping p from 3 to 2, ie pairing only 2 tables in > > Bracket 2, before downfloating the other 2 players to Bracket 3.
Show quoted text
> If I'm not mistaken, FIDE.pm doesn't downfloat those other 2 players > straight away (as it IMHO should do, according to C6, since it is a > homogenous group), but tries to pair them first against each other. > Since that doesn't help for bracket 3 FIDE.pm repairs the first > mentioned 2 tables until the remaining two players can't be paired > against each other. Only then they are downfloated. But that means, > the first 2 tables of Bracket 2 are unnecessarily (and maybe wrongly) > repaired.
Yes, I think you are correct. I've uploaded version 0.07 after doing some work on C6, C13 and C14. It seems to be downfloating them straight away, rather than trying to pair them. C11, x=p=3 already, no more x increases in Bracket 2. C14, Bracket 2, now p=2 C4, S1 & S2: 5 6 9 & 12 11 10 C5, ordered: 5 6 9 & 10 11 12 C6, Bracket tables 1 2 3 paired. E4 10&5 E4 6&11 C6others: Floating remaining 9 12 Down. [2] 5 6 9 12 11 10 => [3] 12 9 7 8 Next, Bracket 3: 12 9 7 8 C1, B1,2 test: ok, no unpairables C2, x=0 C3, p=2 Homogeneous. C4, S1 & S2: 9 12 & 7 8 C5, ordered: 9 12 & 7 8 C6, B4: x=0, table 1 2 NOK C7, 8 7 C6, Bracket tables 1 2 paired. E1 9&8 E1 7&12 C6others: no non-paired players Pairing complete But it only gets to this point after re-pairing all 3 tables in Bracket 2, without downfloating any players for quite a long time But I want to follow the same rules looking for alternative downfloaters in C13 that are followed elsewhere. Show quoted text
> At least that's how I interprete the following sequence:
Show quoted text
> ==== > C14, Bracket 2, now p=2 > C4, S1 & S2: 3 5 & 6 12 11 9 > C5, ordered: 3 5 & 6 9 11 12 > C6, B1a: table 2 NOK > C7, 6 11 9 12 > C6, B1a: table 2 NOK > C7, 6 12 9 11 > C6, 2 tables paired. E1 6&3 E4 12&5 > C6others: Remainder Group, Bracket 2: 9 11 > C1, B1,2 test: ok, no unpairables > C2, x=1 > C3, p=1 Homogeneous. > C4, S1 & S2: 9 & 11 > C5, ordered: 9 & 11 > C6, 1 tables paired. E4 9&11 > C6others: no non-paired players > Next, Bracket 3: 7 8 > C1, B1a: NOK. 7 8 > C13, Undoing Bracket 2 matches. Re-pairing Bracket 2, p=2. > C7, 9 6 11 12 > C6, B1a: table 1 NOK > C7, 11 6 9 12 > C6, B1a: table 1 NOK > C7, 12 6 9 11 > C6, 2 tables paired. E4 12&3 E1 6&5 > C6others: Remainder Group, Bracket 2: 9 11 > C1, B1,2 test: ok, no unpairables > C2, x=1 > C3, p=1 Homogeneous. > C4, S1 & S2: 9 & 11 > C5, ordered: 9 & 11 > C6, 1 tables paired. E4 9&11 > C6others: no non-paired players > Next, Bracket 3: 7 8 > C1, B1a: NOK. 7 8 > C13, Undoing Bracket 2 matches. Re-pairing Bracket 2, p=2. > C7, 12 9 6 11 > C6, B1a: table 2 NOK > C7, 12 11 6 9 > C6, B1a: table 2 NOK > C7, last transposition > C9, Dropping B6 for Downfloats > C4, S1 & S2: 12 6 & 3 5 11 9 > C5, ordered: 6 12 & 3 5 9 11 > C6, 2 tables paired. E1 6&3 E4 5&12 > C6others: Remainder Group, Bracket 2: 9 11 > C1, B1,2 test: ok, no unpairables > C2, x=1 > C3, p=1 Homogeneous. > C4, S1 & S2: 9 & 11 > C5, ordered: 9 & 11 > C6, 1 tables paired. E4 9&11 > C6others: no non-paired players > Next, Bracket 3: 7 8 > C1, B1a: NOK. 7 8 > C13, Undoing Bracket 2 matches. Re-pairing Bracket 2, p=2. > C7, 3 9 5 11 > C6, 2 tables paired. E1 6&3 E1 9&12 > C6others: Remainder Group, Bracket 2: 5 11 > C1, B1a: NOK. 5 11 Bracket 2. Floating 5 Down, 11 Down, [2] 11 => > [3] 11 5 7 > 8
Show quoted text
> Next, Bracket 3: 11 5 7 8 > C1, B1,2 test: ok, no unpairables > C2, x=0 > C3, p=2 Heterogeneous. > C4, S1 & S2: 11 5 & 7 8 > C5, ordered: 5 11 & 7 8 > C6, 2 tables paired. E1 7&5 E1 11&8 > C6others: no non-paired players > Pairing complete > ====
Yes, I think if it is a homogeneous group it should downfloat unpaired players rather than try to pair them. This pairing with 0.06 is different than the pairing above with 0.07.
Subject: Re: [rt.cpan.org #29073] AutoReply: Problems with C14 in FIDE.pm
Date: Tue, 4 Sep 2007 23:23:52 +0200
To: Greg Matheson via RT <bug-Games-Tournament-Swiss [...] rt.cpan.org>
From: Christian Bartolomaeus <bartolin [...] gmx.de>
Hi, * On 2007-09-04 Greg Matheson via RT (bug-Games-Tournament-Swiss@rt.cpan.org) wrote: Show quoted text
> [...]
> > > > > I'm not clear about the sequencing of the rules. C13 seems to > > > > > include a number of different steps, depending on what happens > > > > > before C13.
>
> > > > For sure, I'm even less an expert. But somehow I think one should > > > > arrive at the last part of the c13 function in FIDE.pm.
>
> > > > If (! $pprime > 0) the last two brackets should be joined (lines 1043 > > > > to 1059). It seems to me, that the algoritm doesn't get there.
> > I think if $pprime == 0, then the last 2 brackets should be > joined, but if it != 0, then they don't have to be.
i agree. If I argued otherwise it wasn't thoughtful (enough). Show quoted text
> > > Before getting to the joining of the last 2 brackets, you have to > > > try and find a different pairing in Bracket 2, ie in between your > > > step 4. and step 5.
>
> > > It looks like the FIDE.pm in 0.06 is now, at the moment, going > > > through C14, dropping p from 3 to 2, ie pairing only 2 tables in > > > Bracket 2, before downfloating the other 2 players to Bracket 3.
>
> > If I'm not mistaken, FIDE.pm doesn't downfloat those other 2 players > > straight away (as it IMHO should do, according to C6, since it is a > > homogenous group), but tries to pair them first against each other. > > Since that doesn't help for bracket 3 FIDE.pm repairs the first > > mentioned 2 tables until the remaining two players can't be paired > > against each other. Only then they are downfloated. But that means, > > the first 2 tables of Bracket 2 are unnecessarily (and maybe wrongly) > > repaired.
> > Yes, I think you are correct. I've uploaded version 0.07 after > doing some work on C6, C13 and C14. > > It seems to be downfloating them straight away, rather than > trying to pair them.
It seems to work as described (and expected). Show quoted text
> But it only gets to this point after re-pairing all 3 tables in > Bracket 2, without downfloating any players for quite a long time > > But I want to follow the same rules looking for alternative > downfloaters in C13 that are followed elsewhere.
I think, that's a sensible approach. Show quoted text
> Yes, I think if it is a homogeneous group it should downfloat > unpaired players rather than try to pair them. > > This pairing with 0.06 is different than the pairing above with > 0.07.
Again, it's working as advertised -- at least in this respect. Unfortunately, still the first two pairings (4&1, 2&3) are "forgotten". Furthermore I got the following output to standard error while running "pair" in subdirectory 3/ : ==== 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 ==== But the original problem seems to be solved. Thanks! Christian
Subject: Re: [rt.cpan.org #29073] AutoReply: Problems with C14 in FIDE.pm
Date: Tue, 4 Sep 2007 23:10:09 +0000
To: Christian Bartolomaeus via RT <bug-Games-Tournament-Swiss [...] rt.cpan.org>
From: Greg Matheson <drbean [...] freeshell.org>
On Tue, 04 Sep 2007, Christian Bartolomaeus via RT wrote: Show quoted text
> Again, it's working as advertised -- at least in this respect.
Okay, I'm going to close this bug report. Show quoted text
> Unfortunately, still the first two pairings (4&1, 2&3) are > "forgotten".
Can you open a bug report for that problem? Show quoted text
> Furthermore I got the following output to standard error > while running "pair" in subdirectory 3/ :
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. I think it is important to make that clear to the user. 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 > ====
If you want to discuss that, can you open a separate report?
Subject: Re: [rt.cpan.org #29073] AutoReply: Problems with C14 in FIDE.pm
Date: Tue, 4 Sep 2007 23:20:30 +0000
To: Greg Matheson via RT <bug-Games-Tournament-Swiss [...] rt.cpan.org>
From: Greg Matheson <drbean [...] freeshell.org>
On Tue, 04 Sep 2007, Greg Matheson via RT wrote: Show quoted text
> Okay, I'm going to close this bug report.
Show quoted text
> > Unfortunately, still the first two pairings (4&1, 2&3) are > > "forgotten".
Show quoted text
> Can you open a bug report for that problem?
On second thoughts, this was a problem you reported earlier in this discussion, so don't open a new report for this problem. 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 > > [...]
Show quoted text
> If you want to discuss that, can you open a separate report?
Open a separate report for this problem.
Subject: Re: [rt.cpan.org #29073] AutoReply: Problems with C14 in FIDE.pm
Date: Wed, 5 Sep 2007 07:03:18 +0000
To: Christian Bartolomaeus via RT <bug-Games-Tournament-Swiss [...] rt.cpan.org>
From: Greg Matheson <drbean [...] freeshell.org>
On Tue, 04 Sep 2007, Christian Bartolomaeus via RT wrote: Show quoted text
> Unfortunately, still the first two pairings (4&1, 2&3) are > "forgotten".
I figured out why it's happening. C13 was unpairing all the games in the second bracket but only repairing the players in the remainder bracket. I don't know what to do about it yet. The correct method may depend on whether it is better to re-pair only the remainder bracket or the whole bracket. I posted about that at http://www.chesschat.org/showthread.php?t=6856
Subject: Re: [rt.cpan.org #29073] AutoReply: Problems with C14 in FIDE.pm
Date: Wed, 5 Sep 2007 09:31:21 +0200
To: Greg Matheson via RT <bug-Games-Tournament-Swiss [...] rt.cpan.org>
From: Christian Bartolomaeus <bartolin [...] gmx.de>
Hi, On 2007-09-05, Greg Matheson via RT wrote: Show quoted text
> [...]
> > Unfortunately, still the first two pairings (4&1, 2&3) are > > "forgotten".
> > I figured out why it's happening. C13 was unpairing all the games > in the second bracket but only repairing the players in the > remainder bracket.
I just tried to figure it out myself. I suspected C13 (or C11) to do such a thing. Show quoted text
> I don't know what to do about it yet. The correct method may depend > on whether it is better to re-pair only the remainder bracket or > the whole bracket.
Agreed. Show quoted text
I'm curious whether Bill Gletsos (or someone else) has an answer to this question. Regarding the other problem: On 2007-09-04, Greg Matheson via RT wrote: Show quoted text
> [...]
> > Furthermore I got the following output to standard error > > while running "pair" in subdirectory 3/ :
> > 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. > > I think it is important to make that clear to the user. > [...] > If you want to discuss that, can you open a separate report?
Actually, I don't think it's important at the moment, since your explanation is quite clear. I'm inclined not to open a yet another bug report about this. Thanks! Christian
Subject: Re: [rt.cpan.org #29073] AutoReply: Problems with C14 in FIDE.pm
Date: Wed, 5 Sep 2007 07:42:57 +0000
To: Christian Bartolomaeus via RT <bug-Games-Tournament-Swiss [...] rt.cpan.org>
From: Greg Matheson <drbean [...] freeshell.org>
On Wed, 05 Sep 2007, Christian Bartolomaeus via RT wrote: Show quoted text
> I just tried to figure it out myself. I suspected C13 (or C11) to do > such a thing.
Each individual match is just added to the end of all the matches in the bracket, which is identified by $index, so delete $matches->[ $index - 1 ]; unpairs all matches in the bracket, from the remainder group AND the moved-down players.
Subject: Re: [rt.cpan.org #29073] AutoReply: Problems with C14 in FIDE.pm
Date: Wed, 5 Sep 2007 09:21:29 +0000
To: Greg Matheson via RT <bug-Games-Tournament-Swiss [...] rt.cpan.org>
From: Greg Matheson <drbean [...] freeshell.org>
As a temporary measure, which probably breaks for other tournaments, just add the pairings for remainder groups separately and pop the pairings of the last group off: === lib/Games/Tournament/Swiss/Procedure/FIDE.pm ================================================================== --- lib/Games/Tournament/Swiss/Procedure/FIDE.pm (revision 1336) +++ lib/Games/Tournament/Swiss/Procedure/FIDE.pm (local) @@ -1,6 +1,6 @@ package Games::Tournament::Swiss::Procedure::FIDE; -# Last Edit: 2007 Sep 04, 09:31:41 PM +# Last Edit: 2007 Sep 05, 04:32:09 PM # $Id$ use warnings; @@ -1113,14 +1113,13 @@ return ERROR, msg => "All joined into one bracket, but no pairings! Sorry", %args; } - # my $penultimate = $groups->[ $index - 1 ]; - # $penultimate = $penultimate->{remainderof} if $penultimate->{remainderof}; my $penultimate = $self->previousBracket; + # $penultimate = $penultimate->{remainderof} if $penultimate->{remainderof}; $group = $group->{remainderof} if $group->{remainderof}; my ( $last, $penult ) = ( $index + 1, $index ); - # my $penultpPrime = $penultimate->pprime; - delete $matches->[ $index - 1 ]; - delete $matches->[ $index ]; + delete $matches->[ - 1 ]; + # delete $matches->[ $index - 1 ]; + # delete $matches->[ $index ]; print "Undoing Bracket $penult matches. "; my @lastMemberIds = map { $_->id } @$members; my $residents = $group->residents; @@ -1432,7 +1431,7 @@ ); } print "\n"; - push @{ $allMatches->[$index] }, @bracketMatches; + push @$allMatches, \@bracketMatches; $self->previousBracket($group); return C6OTHERS, matches => $allMatches, %args; }
Subject: Re: [rt.cpan.org #29073] AutoReply: Problems with C14 in FIDE.pm
Date: Wed, 5 Sep 2007 13:45:41 +0200
To: Greg Matheson via RT <bug-Games-Tournament-Swiss [...] rt.cpan.org>
From: Christian Bartolomaeus <bartolin [...] gmx.de>
Hi, * On 2007-09-05 Greg Matheson via RT (bug-Games-Tournament-Swiss@rt.cpan.org) wrote: Show quoted text
> [...] > As a temporary measure, which probably breaks for other > tournaments, just add the pairings for remainder groups > separately and pop the pairings of the last group off: > > [patch follows]
thanks, that seemed to work fine. But I hope there'll be an ultimate solution when the question about the interpretation of C13 [1] is answered. Best regards, Christian [1] http://chesschat.org/showthread.php?t=6856
Stalled, waiting for a response to our discussion of "'penultimate bracket' ambiguous" at http://chesschat.org/showthread.php?t=6856