How august0362/btl_ai works
Chess AI Tournament is a desktop chess game where a person can play an AI or run bot-versus-bot matches, then inspect game history and player rankings. The main path is GUI input → controller → match runner → player move selection and game-state updates → recorded result, with history and Elo statistics available afterward. The README names four AI approaches; their modules are represented, but unsampled implementation details and wiring are not asserted. Edges reflect shown excerpts, SOURCE INDEX references, or README statements; uncertain links are omitted or dashed.
Main entry points: app.py Screen manager · controller.py Game controller · base_bot.py Bot interface · match_runner.py Match runner
Components 24
Desktop interface
- Application launch
main.py - Screen manager
frontend/gui/app.py - Game and menu screens
frontend/gui/screens - Game controller
frontend/gui/controller.py - Board view
frontend/gui/widgets/board_view.py - GUI renderer
frontend/gui/render.py - Themes and styling
frontend/gui/theme.py
Match runtime
- Match runner
backend/tournament/match_runner.py - Player interface
backend/tournament/players.py - Chess game state
backend/core/game_state.py - Game and move types
backend/core/types.py
AI players
- Bot registry
backend/ai/registry.py - Bot interface
backend/ai/base_bot.py - Regression alpha-beta
backend/ai/alphabeta_regression/bot.py - Genetic alpha-beta
backend/ai/genetic_alphabeta - Pure MCTS
backend/ai/mcts/bot.py - Random bot
backend/ai/random_bot/bot.py
Records and rankings
- Game records
backend/tournament/records.py - Game history
backend/tournament/history.py - Elo ranking
backend/tournament/ranking.py - Match series
backend/tournament/series.py
DQN learning
- Deep RL bot
backend/ai/deep_rl/bot.py - DQN training and evaluation
backend/ai/deep_rl/user
Other components
- Player
Connections 32
- Player → Game and menu screens: chooses moves
frontend/gui/screens/game.py - Application launch → Screen manager: launches
main.py - Screen manager → Game and menu screens: routes screens
frontend/gui/app.py - Game and menu screens → Game controller: reads snapshots
frontend/gui/screens/game.py - Game and menu screens → Board view: uses board view
frontend/gui/screens/game.py - Board view → GUI renderer: draws through
frontend/gui/widgets/board_view.py - GUI renderer → Themes and styling: uses theme
frontend/gui/widgets/button.py - Screen manager → Game controller: creates controller
frontend/gui/app.py - Game controller → Match runner: runs matches
frontend/gui/controller.py - Game controller → Player interface: wraps players
frontend/gui/controller.py - Match runner → Player interface: requests moves
backend/tournament/match_runner.py - Match runner → Chess game state: updates game
backend/tournament/match_runner.py - Match runner → Game records: builds record
backend/tournament/match_runner.py - Chess game state → Game and move types: uses game types
backend/core/game_state.py - Game records → Game and move types: stores result types
backend/tournament/records.py - Screen manager → Bot registry: lists bots
frontend/gui/app.py - Bot registry → Bot interface: uses bot interface
backend/ai/registry.py - Regression alpha-beta → Bot interface: implements interface
backend/ai/alphabeta_regression/bot.py - Genetic alpha-beta → Bot interface: implements interface
- Pure MCTS → Bot interface: implements interface
backend/ai/mcts/bot.py - Random bot → Bot interface: implements interface
backend/ai/random_bot/bot.py - Deep RL bot → Bot interface: implements interface
- DQN training and evaluation → Deep RL bot: trains policy
- Game controller → Game history: supplies history
frontend/gui/controller.py - Game controller → Elo ranking: supplies ranking
frontend/gui/controller.py - Game history → Game records: loads records
backend/tournament/history.py - Elo ranking → Game records: rates results
backend/tournament/ranking.py - Match series → Match runner: runs games
backend/tournament/series.py - Match series → Player interface: uses players
backend/tournament/series.py - Match series → Game records: collects records
backend/tournament/series.py - Screen manager → Game history: loads replay
frontend/gui/app.py - Screen manager → Elo ranking: creates ranking
frontend/gui/app.py