Skip to content

Commit de5c287

Browse files
skiminkiAloril
authored andcommitted
Add swiss-tcec tournament mode
Add the TCEC Swiss tournament mode. (See https://wiki.chessdom.org/TCEC_Swiss_Tournament_System ) This mode supports -bergerSchedule and -resume.
1 parent ccba69a commit de5c287

File tree

8 files changed

+682
-5
lines changed

8 files changed

+682
-5
lines changed

AUTHORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ basil00
1212
Guy Vreuls (gvreuls)
1313
Олег Смирнов (sovaz1997)
1414
Daniel Dugovic (ddugovic)
15+
Sami Kiminki
1516

1617
# Piece graphics:
1718

projects/cli/res/doc/help.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ Options:
9292
'gauntlet': First engine plays against the rest
9393
'knockout': Single-elimination tournament.
9494
'pyramid': Every engine plays against all predecessors
95+
'swiss-tcec': Swiss tournament, TCEC style pairings
9596
-event EVENT Set the event/tournament name to EVENT
9697
-games N Play N games per encounter. This value should be set to
9798
an even number in tournaments with more than two players

projects/lib/src/graph_blossom.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -308,10 +308,10 @@ class MaximumCardinalityMatcher
308308
if (prevVertex != -1 && nextVertex != -1)
309309
{
310310
GRAPH_BLOSSOM_DEBUG_PRINTF("%s:%d %d-%d=%d %d-%d=%d %d-%d=%d %d-%d=%d\n", __FILE__, __LINE__,
311-
prevVertex, blossomPath[0], graph.containsEdge(Edge { prevVertex, blossomPath[0] }),
312-
prevVertex, blossomPath[k], graph.containsEdge(Edge { prevVertex, blossomPath[k] }),
313-
blossomPath[0], nextVertex, graph.containsEdge(Edge { nextVertex, blossomPath[0] }),
314-
blossomPath[k], nextVertex, graph.containsEdge(Edge { nextVertex, blossomPath[k] }));
311+
prevVertex, blossomPath[0], graph.containsEdge(prevVertex, blossomPath[0]),
312+
prevVertex, blossomPath[k], graph.containsEdge(prevVertex, blossomPath[k]),
313+
blossomPath[0], nextVertex, graph.containsEdge(nextVertex, blossomPath[0]),
314+
blossomPath[k], nextVertex, graph.containsEdge(nextVertex, blossomPath[k]));
315315

316316
// blossom within path
317317
if ((i % 2) == 0)

projects/lib/src/src.pri

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ HEADERS += $$PWD/chessengine.h \
3434
$$PWD/roundrobintournament.h \
3535
$$PWD/tournamentfactory.h \
3636
$$PWD/gauntlettournament.h \
37+
$$PWD/swisstournament.h \
3738
$$PWD/epdrecord.h \
3839
$$PWD/openingsuite.h \
3940
$$PWD/econode.h \
@@ -77,6 +78,7 @@ SOURCES += $$PWD/chessengine.cpp \
7778
$$PWD/pgngamefilter.cpp \
7879
$$PWD/tournament.cpp \
7980
$$PWD/roundrobintournament.cpp \
81+
$$PWD/swisstournament.cpp \
8082
$$PWD/tournamentfactory.cpp \
8183
$$PWD/gauntlettournament.cpp \
8284
$$PWD/epdrecord.cpp \

0 commit comments

Comments
 (0)