How kenmangubat/chessiq works
Chess Ken is a desktop chess game centered on choosing an opponent, playing a timed or untimed match, and receiving bot reactions and audio feedback. Its runtime flow runs from the application screen manager through the game screen to chess rules and bot move selection, with Stockfish analysis and learned style informing the bot. Separate calibration modules build opening-book and style data from archived games. Source excerpts establish the main runtime components; unsampled calibration and screen details are represented only where the source index or file tree supports them.
Main entry points: game.py Game Screen · main.py Screen Manager · ken_bot.py Ken Bot · style_analyzer.py Style Analyzer
Components 22
Application UI
- Screen Manager
main.py - Dashboard
screens/dashboard.py - Opponent Selection
screens/opponent_select.py - Settings
screens/settings.py - Screen Base
screens/base_screen.py
Chess Gameplay
- Game Screen
screens/game.py - Chess Rules
chess_logic/chess_game.py - Animated Board
ui/animated_board.py
Bot Intelligence
- Ken Bot
bots/ken_bot.py - Stockfish Wrapper
engine/stockfish_engine.py
Bot Calibration
- Style Analyzer
calibration/style_analyzer.py - Opening Book Builder
calibration/build_book.py - Bot Calibration
calibration/calibrate_bots.py - Game Archives
data - Opening Book
data/ken_book.db - Style Profile
data/ken_style_profile.json
Game Presentation
- Buttons
ui/button.py - Sound Manager
ui/sound_manager.py - Speech Bubble
ui/speech_bubble.py - Audio Assets
assets/sounds
Other components
- Player
- Stockfish Engine
Connections 26
- Player → Screen Manager: uses
main.py - Screen Manager → Dashboard: routes to
main.py - Screen Manager → Game Screen: routes to
main.py - Screen Manager → Opponent Selection: routes to
main.py - Screen Manager → Settings: routes to
main.py - Dashboard → Buttons: renders
screens/dashboard.py - Opponent Selection → Buttons: renders
screens/opponent_select.py - Settings → Buttons: renders
screens/settings.py - Game Screen → Chess Rules: updates game
screens/game.py - Game Screen → Ken Bot: requests moves
screens/game.py - Game Screen → Animated Board: renders position
screens/game.py - Game Screen → Sound Manager: plays effects
screens/game.py - Game Screen → Speech Bubble: shows reactions
screens/game.py - Animated Board → Chess Rules: reads position
ui/animated_board.py - Ken Bot → Stockfish Wrapper: analyzes moves
bots/ken_bot.py - Stockfish Wrapper → Stockfish Engine: sends UCI
engine/stockfish_engine.py - Ken Bot → Style Analyzer: uses profile
bots/ken_bot.py - Ken Bot → Opening Book: reads book
bots/ken_bot.py - Style Analyzer → Opening Book: reads game data
calibration/style_analyzer.py - Opening Book Builder → Game Archives: ingests games
calibration/build_book.py - Opening Book Builder → Style Analyzer: uses analysis
calibration/build_book.py - Style Analyzer → Style Profile: writes profile
- Bot Calibration → Ken Bot: benchmarks
calibration/calibrate_bots.py - Bot Calibration → Stockfish Wrapper: evaluates against
calibration/calibrate_bots.py - Sound Manager → Audio Assets: loads audio
ui/sound_manager.py - Speech Bubble → Sound Manager: syncs voice