How dimitrijevvv/cheese-engine works
Cheese Engine is a single-file C++ chess program for human-versus-engine play. A player selects a starting position and color, enters UCI moves, and sees game status while the engine searches for replies; the README documents minimax with alpha-beta pruning and material plus piece-square evaluation. The source excerpt shows startup dispatch to FEN input or board initialization, and implements bitboard state, attack detection, and move-generation logic. Other documented capabilities are included, but their internal call paths are not visible in the sampled excerpts.
Main entry points: cheese_vol1.cpp Game session
Components 13
Game interface
- Game session
cheese_vol1.cpp - Position setup
cheese_vol1.cpp - Move input
cheese_vol1.cpp - Game status
cheese_vol1.cpp
Chess rules
- Bitboard state
cheese_vol1.cpp - Attack detection
cheese_vol1.cpp - Legal moves
cheese_vol1.cpp - Move execution
cheese_vol1.cpp - Move undo
cheese_vol1.cpp - Game outcome
cheese_vol1.cpp
Engine
- Minimax search
cheese_vol1.cpp - Position evaluation
cheese_vol1.cpp
Other components
- Player
Connections 17
- Player → Game session: plays
README.md - Game session → Position setup: chooses position
cheese_vol1.cpp - Player → Move input: enters moves
README.md - Game session → Move input: accepts turns
cheese_vol1.cpp - Game session → Minimax search: requests reply
cheese_vol1.cpp - Game session → Game status: shows status
README.md - Game session → Game outcome: ends on result
cheese_vol1.cpp - Position setup → Bitboard state: initializes board
cheese_vol1.cpp - Position setup → Bitboard state: loads FEN
cheese_vol1.cpp - Legal moves → Attack detection: checks attacks
cheese_vol1.cpp - Move execution → Bitboard state: updates position
cheese_vol1.cpp - Move undo → Bitboard state: restores position
cheese_vol1.cpp - Minimax search → Position evaluation: scores positions
cheese_vol1.cpp - Minimax search → Legal moves: considers moves
cheese_vol1.cpp - Minimax search → Move execution: explores moves
cheese_vol1.cpp - Minimax search → Move undo: reverts moves
cheese_vol1.cpp - Game status → Game outcome: reports termination
cheese_vol1.cpp