生成配对游戏的时间表

时间:2013-02-28 10:12:55

标签: algorithm scheduling

我们有8名球员。

在一张桌子上玩4名玩家(两对)。

enter image description here

因此,每个玩家都需要与其他所有7名玩家配对,让这些玩家成为对手的同等数量。

如果只是创建表并从列表中删除它,我们有:

Tour 1: (1,2) - (3,4) | (5,6) - (7,8)
Tour 2: (1,3) - (2,5) | (4,7) - (6,8)
.....................................
.....................................
Tour 7: (1,8) - (2,7) | (3,6) - (4,5)

但是有些付款人经常会遇到一些反对者。

在那个方向我需要思考?

**** **** UPDATE 在Jens Schauders解决方案的情况下,我们将有7轮。如果对手2的对手,我们将有3次对手4而只有一次对手7。

如果此架构中的拆分对

       TABLE 1 |  TABLE 2

Pair1: 1    2  |  3    4
      ------------------
Pair2: 5    6  |  7    8

哪里出错?

3 个答案:

答案 0 :(得分:3)

我认为您正在寻找的算法有一个简单的可视化:

想象一下长桌与对手坐在对面:

1    2    3    4
----------------
5    6    7    8

现在每一轮新人都会移动到他离开的地方。可能在桌子的另一边,有一个例外:玩家一个保持座位。所以下一轮看起来像这样

1    5    2    3    
----------------
6    7    8    4

如果您现在将长桌分成两部分,那么您的小桌子就会得到合适的配对。

关于更新后的问题

为了实现更均匀分布的对手,可以尝试以不同方式拆分大表,例如从第一列和第四列构建一个小表,从第二列+3列构建第二个小表

答案 1 :(得分:1)

你可以在4支球队之间进行6场独特的比赛。有7种可能的配对,因此有42种独特的游戏。

每位玩家只与其他玩家配对一次,并与其中每一位玩家完全对战6次。

列表:

Pairs 01: (1,2),(3,4),(5,6),(7,8)
PairRound 1:
GameRound 01: (1,2) - (3,4) | (5,6) - (7,8)
GameRound 02: (1,2) - (7,8) | (3,4) - (5,6)
GameRound 03: (1,2) - (5,6) | (3,4) - (7,8)

Pairs 02: (1,3),(2,4),(5,7),(6,8)
PairRound 2:
GameRound 04: (1,3) - (2,4) | (5,7) - (6,8)
GameRound 05: (1,3) - (6,8) | (2,4) - (5,7)
GameRound 06: (1,3) - (5,7) | (2,4) - (6,8)

Pairs 03: (1,4),(2,3),(5,8),(6,7)
PairRound 3:
GameRound 07: (1,4) - (2,3) | (6,7) - (5,8)
GameRound 08: (1,4) - (5,8) | (2,3) - (6,7)
GameRound 09: (1,4) - (6,7) | (2,3) - (5,8)

Pairs 04: (1,5),(2,6),(3,7),(4,8)
PairRound 4:
GameRound 10: (1,5) - (2,6) | (3,7) - (4,8)
GameRound 11: (1,5) - (4,8) | (2,6) - (3,7)
GameRound 12: (1,5) - (3,7) | (2,6) - (4,8)

Pairs 05: (1,6),(2,5),(3,8),(4,7)
PairRound 5:
GameRound 13: (1,6) - (2,5) | (3,8) - (4,7)
GameRound 14: (1,6) - (4,7) | (2,5) - (3,8)
GameRound 15: (1,6) - (3,8) | (2,5) - (4,7)

Pairs 06: (1,7),(2,8),(3,5),(4,6)
PairRound 6:
GameRound 16: (1,7) - (2,8) | (3,5) - (4,6)
GameRound 17: (1,7) - (4,6) | (2,8) - (3,5)
GameRound 18: (1,7) - (3,5) | (2,8) - (4,6)

Pairs 07: (1,8),(2,7),(3,6),(4,5)
PairRound 8:
GameRound 19: (1,8) - (2,7) | (3,6) - (4,5)
GameRound 20: (1,8) - (4,5) | (2,7) - (3,6)
GameRound 21: (1,8) - (3,6) | (2,7) - (4,5)

答案 2 :(得分:0)

以下是两个时间表。第1个时间表是2个循环固定合作伙伴时间表。这是一个平衡的2轮循环“对”时间表。或者,另一种表达方式是我们正在安排'对'的'对'。我想这就是你要找的东西?

第2个时间表是8个玩家的“平衡”2轮循环“单打”时间表(每个玩家都是一个团队)。

注意:在两个时间表上,所有玩家/团队都会轮换所有表格。没有玩家/团队在固定位置中修复,这对于大多数联赛来说都是不受欢迎的,因为它会创建不平衡的时隙分布。此线程上发布的另外两个答案在一个时隙中锁定一个团队,然后在该时间段内轮换其他7个团队。

下面的PAIRS-4时间表是固定合作伙伴时间表。我们还有8名轮换合作伙伴时间表。在每轮比赛中,所有球员都与其他7名球员合作一次,并且与其他所有球员进行两次比赛。

PAIRS-4 SCHEDULE                     Date 8/4/14            
-    
DATE   DAY  TIME   LOCATION     GM#   HOME  v  AWAY
Week 1         
AUG  4 MON  6:00pm Table-1       1  #1 & #2 v #7 & #8
AUG  4 MON  6:00pm Table-2       1  #3 & #4 v #5 & #6
Week 2
AUG 11 MON  6:00pm Table-1       2  #7 & #8 v #3 & #4
AUG 11 MON  6:00pm Table-2       2  #5 & #6 v #1 & #2
Week 3    
AUG 18 MON  6:00pm Table-1       3  #1 & #2 v #3 & #4
AUG 18 MON  6:00pm Table-2       3  #5 & #6 v #7 & #8
Week 4
AUG 25 MON  6:00pm Table-1       4  #5 & #6 v #3 & #4
AUG 25 MON  6:00pm Table-2       4  #7 & #8 v #1 & #2
Week 5        
SEP  1 MON  6:00pm Table-1       5  #1 & #2 v #5 & #6
SEP  1 MON  6:00pm Table-2       5  #3 & #4 v #7 & #8
Week 6    
SEP  8 MON  6:00pm Table-1       6  #7 & #8 v #5 & #6
SEP  8 MON  6:00pm Table-2       6  #3 & #4 v #1 & #2
-    
========================================================
-
SINGLES-8 SCHEDULE               Date 8/5/14 
-
DATE   DAY  TIME    LOCATION   GM#  HOME v AWAY
Week 1
AUG  5 TUE  6:00pm  Table-1     1   #1 v #8
AUG  5 TUE  6:00pm  Table-2     1   #2 v #7
AUG  5 TUE  6:00pm  Table-3     1   #3 v #6
AUG  5 TUE  6:00pm  Table-4     1   #4 v #5
Week 2    
AUG 12 TUE  6:00pm  Table-1     2   #5 v #2
AUG 12 TUE  6:00pm  Table-2     2   #8 v #6
AUG 12 TUE  6:00pm  Table-3     2   #7 v #1
AUG 12 TUE  6:00pm  Table-4     2   #3 v #4
Week 3
AUG 19 TUE  6:00pm  Table-1     3   #2 v #3
AUG 19 TUE  6:00pm  Table-2     3   #5 v #7
AUG 19 TUE  6:00pm  Table-3     3   #4 v #8
AUG 19 TUE  6:00pm  Table-4     3   #6 v #1
Week 4
AUG 26 TUE  6:00pm  Table-1     4   #6 v #4
AUG 26 TUE  6:00pm  Table-2     4   #1 v #5
AUG 26 TUE  6:00pm  Table-3     4   #7 v #3
AUG 26 TUE  6:00pm  Table-4     4   #8 v #2
Week 5
SEP  2 TUE  6:00pm  Table-1     5   #3 v #5
SEP  2 TUE  6:00pm  Table-2     5   #4 v #1
SEP  2 TUE  6:00pm  Table-3     5   #2 v #6
SEP  2 TUE  6:00pm  Table-4     5   #7 v #8
Week 6
SEP  9 TUE  6:00pm  Table-1     6   #6 v #7
SEP  9 TUE  6:00pm  Table-2     6   #4 v #2
SEP  9 TUE  6:00pm  Table-3     6   #5 v #8
SEP  9 TUE  6:00pm  Table-4     6   #1 v #3
Week 7
SEP 16 TUE  6:00pm  Table-1     7   #7 v #4
SEP 16 TUE  6:00pm  Table-2     7   #8 v #3
SEP 16 TUE  6:00pm  Table-3     7   #2 v #1
SEP 16 TUE  6:00pm  Table-4     7   #5 v #6
Week 8
SEP 23 TUE  6:00pm  Table-1     8   #7 v #2
SEP 23 TUE  6:00pm  Table-2     8   #6 v #3
SEP 23 TUE  6:00pm  Table-3     8   #5 v #4
SEP 23 TUE  6:00pm  Table-4     8   #8 v #1
Week 9
SEP 30 TUE  6:00pm  Table-1     9   #6 v #8
SEP 30 TUE  6:00pm  Table-2     9   #1 v #7
SEP 30 TUE  6:00pm  Table-3     9   #4 v #3
SEP 30 TUE  6:00pm  Table-4     9   #2 v #5
Week 10
OCT  7 TUE  6:00pm  Table-1    10   #7 v #5
OCT  7 TUE  6:00pm  Table-2    10   #8 v #4
OCT  7 TUE  6:00pm  Table-3    10   #1 v #6
OCT  7 TUE  6:00pm  Table-4    10   #3 v #2
Week 11
OCT 14 TUE  6:00pm  Table-1    11   #5 v #1
OCT 14 TUE  6:00pm  Table-2    11   #3 v #7
OCT 14 TUE  6:00pm  Table-3    11   #2 v #8
OCT 14 TUE  6:00pm  Table-4    11   #4 v #6
Week 12
OCT 21 TUE  6:00pm  Table-1    12   #1 v #4
OCT 21 TUE  6:00pm  Table-2    12   #6 v #2
OCT 21 TUE  6:00pm  Table-3    12   #8 v #7
OCT 21 TUE  6:00pm  Table-4    12   #5 v #3
Week 13
OCT 28 TUE  6:00pm  Table-1    13   #2 v #4
OCT 28 TUE  6:00pm  Table-2    13   #8 v #5
OCT 28 TUE  6:00pm  Table-3    13   #3 v #1
OCT 28 TUE  6:00pm  Table-4    13   #7 v #6
Week 14
NOV  4 TUE  6:00pm  Table-1    14   #3 v #8
NOV  4 TUE  6:00pm  Table-2    14   #1 v #2
NOV  4 TUE  6:00pm  Table-3    14   #6 v #5
NOV  4 TUE  6:00pm  Table-4    14   #4 v #7
-               
-                 # # # # #    
-

你可以复制&将上面的日程表粘贴到文字处理器中并使用 搜索&替换以用真实姓名替换球员号码。你也可以 编辑时间表,即更改日期和时间次,添加备注,图形,联系 每个球员的信息等。