Tournament (src/tournament/)
Round-robin tournaments between a fixed list of named players. Every ordered pair (black, white) plays num_games games using the existing play_game loop. Results are aggregated per pair and exposed via a JSON-friendly status snapshot.
Types (types.jl)
Reversi.TournamentPairResult — Type
TournamentPairResultAggregated results for a single ordered pair (blackplayeridx, whiteplayeridx) in the tournament.
Reversi.TournamentSession — Type
TournamentSessionRound-robin tournament between a list of named players. Each ordered pair (i, j) (with i != j) plays num_games games as (black=i, white=j).
Session lifecycle (session.jl)
Reversi.start_tournament! — Method
start_tournament!(session::TournamentSession)Launch the tournament as a background Task. Iterates over every ordered player pair and runs num_games games per pair.
Reversi.stop_tournament! — Method
stop_tournament!(session::TournamentSession)Signal the tournament loop to stop after the current game.
Reversi.tournament_status — Method
tournament_status(session::TournamentSession) -> DictJSON-friendly status snapshot of the tournament.
Notes
Construction
players = [HeuristicPlayer(), MobilityPlayer(), MinimaxPlayer(3)]
names = ["heuristic", "mobility", "minimax-3"]
session = TournamentSession(names, players; num_games=5)
start_tournament!(session)
# poll for progress
while tournament_status(session)["is_running"]
sleep(0.5)
end
results = tournament_status(session)["results"]Pair count
For n players, the round-robin runs n * (n - 1) ordered pairs (each player plays both colours against every other player), with num_games games per pair, for a total of n * (n - 1) * num_games games.