-
Notifications
You must be signed in to change notification settings - Fork 1
Easy Level Bot AI Logic
This page explains how the easy_level_bot makes decisions. Instead of the deep "Minimax" strategy used by advanced AIs, this bot uses a simpler, faster Greedy Approach and a custom Scoring System.
The bot doesn't move entirely at random, but it also doesn't plan far into the future. It only evaluates the present moment.
- Only One Step Ahead (Depth 1) The bot simulates only one move into the future. It does not calculate future turns or how the opponent will respond.
- Immediate Reward: It tests all possible empty cells on the board and picks the move that gives the highest score for that exact moment.
- Tie-Breaker (Randomness): If multiple moves yield the same highest score, the bot randomly selects one from this list of "best moves" to avoid being completely predictable (IndexedRandom).
Because the bot can only see 1 move ahead, it uses a Score (Heuristic) system to evaluate the current state of the board and figure out who is winning.
In the Game of Y, pieces are stronger when they are grouped 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.
This easy-level bot is quite aggressive when it comes to stopping the opponent.
- The bot calculates not only its own pieces but also how good your potential moves would be for you.
- It gives blocking moves a higher priority (1.2x more value).
- Result: Because of this penalty mechanism in the scoring system, the bot might prefer to block you from making a critical move rather than building its own path.
| Component | Logic |
|---|---|
| Search Depth | Only 1 Turn |
| Decision Mechanism | Calculates the score (evaluate_board). If a new best score is found, the list resets. If there's a tie, the move is added to the list and one is chosen randomly. |
| 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