How massa7ca/tic-tac-toe-minimax-alpha-beta works
This is a Java Swing tic-tac-toe game with configurable board and win length, where a player interacts with the board and the game asks a minimax alpha-beta AI to choose moves. The Game component builds winning combinations, tracks and draws the board, and dispatches moves to the AI; the AI evaluates positions using Score and caches states with ByteArray keys. The README gives no further capability details. Relationships shown are limited to calls and construction visible in the supplied source excerpts.
Main entry points: Ai.java Minimax search · Game.java Board and input · Main.java Launcher · Utils.java Array helpers
Components 7
Game application
- Launcher
src/com/company/Main.java - Board and input
src/com/company/Game.java
AI search
- Minimax search
src/com/company/Ai.java - Position scoring
src/com/company/Score.java
Search support
- State key
src/com/company/ByteArray.java - Array helpers
src/com/company/Utils.java
Other components
- Player
Connections 8
- Player → Launcher: starts game
src/com/company/Main.java - Player → Board and input: clicks board
src/com/company/Game.java - Launcher → Board and input: creates
src/com/company/Main.java - Board and input → Minimax search: requests move
src/com/company/Game.java - Board and input → Array helpers: converts combinations
src/com/company/Game.java - Minimax search → Position scoring: evaluates positions
src/com/company/Ai.java - Minimax search → State key: wraps board state
src/com/company/Ai.java - Minimax search → Array helpers: removes rows
src/com/company/Ai.java