-
Notifications
You must be signed in to change notification settings - Fork 1
Guide: GamerBot Ai Logic
oolga edited this page Mar 7, 2026
·
2 revisions
This page explains how the GamerBot makes decisions. We used a strategy called Minimax and a custom Scoring System to make the bot play smart.
The bot does not just move randomly. It "simulates" the game in its head.
- Looking Ahead: It looks 4 moves into the future (Depth 4).
- Best vs Best: It assumes you (the human) will play perfectly. It picks the move that results in the best possible "worst-case scenario."
- Alpha-Beta Pruning: This is a speed boost. It tells the bot: "Stop looking at this path; I already found a better move somewhere else." This makes the AI much faster.
Because the bot can't see the actual end of the game (it only looks 4 moves ahead), it uses a Score (Heuristic) to see who is winning.
In the Game of Y, pieces are stronger when they are together.
- The bot looks at the 6 neighbors around every piece.
- If a piece touches another piece of the same color, it gets +150 points.
The goal of the game is to connect all three sides of the triangle.
- Side A, B, or C: If a piece touches a side, it gets +1000 points.
- This encourages the bot to build paths that reach the edges.
The bot is very defensive.
- It calculates how good a move is for the opponent.
- It gives blocking moves a higher priority (1.2x more value).
- Result: The bot would rather stop you from winning than help itself.
| Component | Logic |
|---|---|
| Search Depth | 4 Turns. |
| Win/Loss | A win is worth 1,000,000 points. A loss is -1,000,000. |
| Virtual Board | The bot uses board.clone() to test moves without changing the real game. |
YOVI en1a • © 2026 • Escuela de Ingeniería Informática
🏠 Home │
📂 Documentation │
🎮 Play now!
Sprint 0 (v0.1)
Sprint 1 (v0.1 Prototype)
Sprint 2 (v1.0)
Sprint 3 (v2.0)
- ADR: MongoDB
- ADR: Azure Host
- ADR: JWT
- ADR: Gatling
- ADR: bcrypt
- ADR: i18n
- ADR: Cucumber
- ADR: Playwright
- ADR: API REST - gameyapi