-
Notifications
You must be signed in to change notification settings - Fork 2
AI Algorithms
Infrared Reactive edited this page Jan 23, 2026
·
3 revisions
### ### ## ## # 🧠 AI Algorithms: The Cyber Mind
The AI in Cyber Chess uses a classic game-theory approach optimized for real-time web performance.
We use the Minimax Algorithm with Alpha-Beta Pruning. This allows the AI to "see" into the future by simulating possible moves and discarding paths that lead to a disadvantage.
The AI calculates the "score" of a board state based on:
- Material Value: Pawns (100), Knights (320), etc.
- Positioning: Using Piece-Square Tables (PSQT) to reward center control.
| Level | Depth | Features |
|---|---|---|
| Easy | 1 Ply | Material count only |
| Hard | 5 Ply | Alpha-beta + Move ordering |
graph TD
A[Start AI Turn] --> B{Check Difficulty}
B -- Level 1 --> C[Random Move Selection]
B -- Level 3 --> D[Minimax Depth 3]
B -- Level 5 --> E[Alpha-Beta Depth 5]
D --> F[Evaluate Board State]
E --> F
F --> G[Move Ordering - MVV/LVA]
G --> H[Select Optimal Move]
C --> H
H --> I[Execute Move in UI]
I --> J[Neon Pulse Animation]