How basilbarakat15/tic-tac-toe-ai-with-alpha-beta-and-evaluation-modes works
This is a desktop Tic-Tac-Toe game with a human-facing Tkinter GUI and an AI opponent. The principal workflow is selecting a side, difficulty, and evaluation mode, then playing moves against the AI and seeing move scores. The AI supports random easy moves or alpha-beta search with heuristic or ML evaluation; the README also describes dataset-based RandomForest training. The tree lists test2.py as the core module, although the README says to run test.py. The app is monolithic; some GUI-to-AI and ML-training wiring is documented but not visible in the excerpts.
Main entry points: test2.py Game GUI
Components 9
Game interaction
- Game GUI
test2.py - Board state
test2.py
AI strategy
- AI move selection
test2.py - Alpha-beta search
test2.py
Evaluation
- Heuristic evaluation
test2.py - ML features
test2.py - RandomForest model
test2.py - Training dataset
Other components
- Human player
Connections 9
- Human player → Game GUI: selects and plays
README.md - Game GUI → Board state: records moves
test2.py - Game GUI → AI move selection: requests AI move
test2.py - AI move selection → Alpha-beta search: searches moves
test2.py - Alpha-beta search → Heuristic evaluation: evaluates states
test2.py - Alpha-beta search → RandomForest model: evaluates states
test2.py - RandomForest model → ML features: predicts from
test2.py - ML features → Board state: reads position
test2.py - Training dataset → RandomForest model: trains model
README.md