Skip Menu |

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

Report information
The Basics
Id: 29258
Status: resolved
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: Problem with exchanges in C8
Date: Sun, 9 Sep 2007 16:17:27 +0200
To: bug-Games-Tournament-Swiss [...] rt.cpan.org
From: Christian Bartolomaeus <bartolin [...] gmx.de>
Hi, I found a problem with the exchange procedure in C8. Take the following pairing table: Round 4 Pairing Groups ------------------------------------------------------------------------- Place No Opponents Roles Float Score 1 8 18,5,3 BWB D 3 2 1 11,10,6 WBW u 2.5 3-8 2 12,7,9 BWB 2 4 14,9,7 BWB 2 5 15,8,13 WBW 2 7 17,2,4 WBW 2 9 19,4,2 WBW 2 17 7,14,12 BWB D 2 9-14 3 13,6,8 WBW U 1.5 6 16,3,1 BWB 1.5 10 20,1,15 BWB 1.5 11 1,12,16 BWB d 1.5 15 5,20,10 BWW 1.5 16 6,19,11 WBW 1.5 15-17 13 3,18,5 BWB 1 19 9,16,14 BWB 1 20 10,15,18 WBB 1 18 12 2,11,17 WBW U 0.5 19-20 14 4,17,19 WBW 0 18 8,13,20 WBW 0 Here is the output from 'pair': Show quoted text
> Round 4: 8 (3), 1 (2.5), 2 4 5 7 9 17 (2), 3 6 10 11 15 16 (1.5), 13 19 20 (1), 12 (0.5), 14 18 (0), > Next, Bracket 1: 8 > C1, Bracket 1. Floating 8 Down, [1] 8 => [2] 8 1 > > Next, Bracket 2: 8 1 > C1, B1,2 test: ok, no unpairables > C2, x=0 > C3, p=1 Homogeneous. > C4, S1 & S2: 8 & 1 > C5, ordered: 8 & > 1 > C6, Bracket tables 1 paired. E1 8&1
It's okay up to here. Now the next score bracket starts, where we have 2,4,5,7,9,17. Show quoted text
> C6others: no non-paired players > Next, Bracket 3: 2 4 5 7 9 17 > C1, B1,2 test: ok, no unpairables > C2, x=0 > C3, p=3 Homogeneous. > C4, S1 & S2: 2 4 5 & 7 9 17
Now one needs one exchange according to C8, because 2 and 4 already played against 7 and 9, respectively. Show quoted text
> C5, ordered: 2 4 5 & > 7 9 17 > C6, B1a: table 1 2 NOK > C7, 9 7 17 > C6, B1a: table 1 2 NOK > C7, 17 7 9 > C6, B1a: table 2 NOK > C7, 17 9 7 > C6, B1a: table 2 NOK > C7, last transposition
But now: Show quoted text
> C8, exchange 0: 2 4 17, 5 9 7 > C5, ordered: 2 4 17 & > 5 7 9
What's that? It seems, 5 is exchanged for 17. But according to D2 the difference between the numbers exchanged shall be as small as possible. The algorithm should exchange 5 and 7 first, then 4 and 7, afterwards 5 and 9 and so on. I think, it's a bug in "sub c8iterator" in Tournament/Swiss/Bracket.pm. What do you think? This is a real tournament [1] which I use to test your module with. Round 1 to 3 were paired identically. You find league.yaml and the score files 1.yaml to 3.yaml attached. Best regards Christian [1] http://www.lsvmv.de/turniere/erg/eon_2007a_paar.htm

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

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

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

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

Subject: Re: [rt.cpan.org #29258] Problem with exchanges in C8
Date: Sun, 9 Sep 2007 15:14:53 +0000
To: bug-Games-Tournament-Swiss [...] rt.cpan.org
From: Greg Matheson <drbean [...] freeshell.org>
On Sun, 09 Sep 2007, Christian Bartolomaeus via RT wrote: Show quoted text
> > C5, ordered: 2 4 5 & > > 7 9 17 > > C6, B1a: table 1 2 NOK > > C7, 9 7 17 > > C6, B1a: table 1 2 NOK > > C7, 17 7 9 > > C6, B1a: table 2 NOK > > C7, 17 9 7 > > C6, B1a: table 2 NOK > > C7, last transposition
Show quoted text
> But now:
Show quoted text
> > C8, exchange 0: 2 4 17, 5 9 7 > > C5, ordered: 2 4 17 & > > 5 7 9
Show quoted text
> What's that? It seems, 5 is exchanged for 17. But according to D2 the > difference between the numbers exchanged shall be as small as > possible. The algorithm should exchange 5 and 7 first, then 4 and 7, > afterwards 5 and 9 and so on.
I think the numbers in D2 are the ranks of the players in the bracket, the highest 1..p in S1 and the lowest p+1..2p in S2, not the pairing numbers. So they're talking about exchanging the pth and p+1th players first, ie in this case, the 3rd and 4th, whose pairing numbers are 17 and 5.
Subject: Re: [rt.cpan.org #29258] Problem with exchanges in C8
Date: Sun, 9 Sep 2007 18:59:31 +0200
To: Greg Matheson via RT <bug-Games-Tournament-Swiss [...] rt.cpan.org>
From: Christian Bartolomaeus <bartolin [...] gmx.de>
* On 2007-09-09 Greg Matheson via RT (bug-Games-Tournament-Swiss@rt.cpan.org) wrote: Show quoted text
> [...]
> > > C5, ordered: 2 4 5 & > > > 7 9 17 > > > C6, B1a: table 1 2 NOK > > > C7, 9 7 17 > > > C6, B1a: table 1 2 NOK > > > C7, 17 7 9 > > > C6, B1a: table 2 NOK > > > C7, 17 9 7 > > > C6, B1a: table 2 NOK > > > C7, last transposition
>
> > But now:
>
> > > C8, exchange 0: 2 4 17, 5 9 7 > > > C5, ordered: 2 4 17 & > > > 5 7 9
>
> > What's that? It seems, 5 is exchanged for 17. But according to D2 the > > difference between the numbers exchanged shall be as small as > > possible. The algorithm should exchange 5 and 7 first, then 4 and 7, > > afterwards 5 and 9 and so on.
> > I think the numbers in D2 are the ranks of the players in the > bracket, the highest 1..p in S1 and the lowest p+1..2p in S2, not > the pairing numbers. > > So they're talking about exchanging the pth and p+1th players > first, ie in this case, the 3rd and 4th, whose pairing numbers > are 17 and 5.
Well, I think you are right that the numbers in D2 are the ranks of the players in the bracket. So my comment above (that 5 and 7 are to be exchanged first, then 4 and 7 and so on) was misleading. I guess you are thinking along the same lines as I do (see below), but you are just overlooking something. If not, take a look at my thoughts below. The problem is that the original order of S1 and S2 was Show quoted text
> C5, ordered: 2 4 5 & > 7 9 17
Exchanging the third and the forth player would mean to exchange pairing number 5 and pairing number 7. I guess you looked at Show quoted text
> C8, exchange 0: 2 4 17, 5 9 7 > C5, ordered: 2 4 17 & > 5 7 9
But that was after the first exchange! In case I missunderstood, here are my thoughts: C5 states that the players in S1 and S2 shall be ordered according to A2. Since in a homogenous score bracket (and only here exchanges are allowed by C8) all players (usually) have the same score, they are ordered by their rating. And that's the same criterion used for ordering before the first round -- that means for assigning pairing numbers. Therefore the players within S2 (and S1) must be ordered according to their pairing number. So, in the end the numbers mentioned in D2 correspond with the pairing numbers. Back to the example above: Show quoted text
> C5, ordered: 2 4 5 & > 7 9 17
Here I would argue we have the following numbering: 1 -> player 2 2 -> player 4 3 -> player 5 4 -> player 7 5 -> player 9 6 -> player 17 Sow the above could (using the ranks) be written as Show quoted text
> C5, ordered: 1 2 3 & > 4 5 6
But now the first exchange should be between 3 and 4 (that is player 5 and player 7). Exchanging player 5 and player 17 seems wrong to me. My interpretation seems to be supported by Bill Gletsos's post at http://www.chesschat.org/showthread.php?t=1590&page=21 (search for D2). Best regards Christian
Subject: Re: [rt.cpan.org #29258] Problem with exchanges in C8
Date: Mon, 10 Sep 2007 01:11:05 +0000
To: Christian Bartolomaeus via RT <bug-Games-Tournament-Swiss [...] rt.cpan.org>
From: Greg Matheson <drbean [...] freeshell.org>
On Sun, 09 Sep 2007, Christian Bartolomaeus via RT wrote: Show quoted text
> > > > C5, ordered: 2 4 5 & > > > > 7 9 17 > > > > C6, B1a: table 1 2 NOK > > > > C7, 9 7 17 > > > > C6, B1a: table 1 2 NOK > > > > C7, 17 7 9 > > > > C6, B1a: table 2 NOK > > > > C7, 17 9 7 > > > > C6, B1a: table 2 NOK > > > > C7, last transposition
Show quoted text
> > > But now:
Show quoted text
> > > > C8, exchange 0: 2 4 17, 5 9 7 > > > > C5, ordered: 2 4 17 & > > > > 5 7 9
Show quoted text
> The problem is that the original order of S1 and S2 was
Show quoted text
> > C5, ordered: 2 4 5 & > > 7 9 17
Show quoted text
> Exchanging the third and the forth player would mean to exchange > pairing number 5 and pairing number 7.
Okay. I was applying D2 to the last C7 ordering reached, rather than the original ordering. Show quoted text
> Since in a homogenous score bracket (and only here exchanges are > allowed by C8) all players (usually) have the same score, they are > ordered by their rating. And that's the same criterion used for > ordering before the first round -- that means for assigning pairing > numbers.
I never thought about that. They will usually be in pairing number order. Okay. Your explanation was very clear. Show quoted text
> My interpretation seems to be supported by Bill Gletsos's post at > http://www.chesschat.org/showthread.php?t=1590&page=21 (search for > D2).
That seems to be the case. There is nothing in the FIDE rules which suggests my interpretation was wrong, I think, but I guess your interpretation is the usual one. I will change it to applying D2 to the ordered S2 in the next version.
Subject: Re: [rt.cpan.org #29258] Problem with exchanges in C8
Date: Mon, 17 Sep 2007 21:09:57 +0200
To: Greg Matheson via RT <bug-Games-Tournament-Swiss [...] rt.cpan.org>
From: Christian Bartolomaeus <bartolin [...] gmx.de>
Hi, * On 2007-09-09 Greg Matheson via RT (bug-Games-Tournament-Swiss@rt.cpan.org) wrote: Show quoted text
> [...] > Okay. I was applying D2 to the last C7 ordering reached, rather > than the original ordering. > [...] > I will change it to applying D2 to the ordered S2 in the next > version.
I just wanted to report that the problem reported went away with verion 0.08. D2 seems to be applied to the ordered S2 now. Thanks for the fix. I think, this bug report could be closed. Best regards Christian
Download signature.asc
application/pgp-signature 189b

Message body not shown because it is not plain text.

Fixed in 0.08 by revision 1360