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.