From ca44c25695c28d462f029c5dc368d238198ba469 Mon Sep 17 00:00:00 2001 From: autocommit Date: Thu, 16 Apr 2026 00:19:22 -0700 Subject: [PATCH] =?UTF-8?q?feat(ai):=20=E2=9C=A8=20Implement=20early-game?= =?UTF-8?q?=20AI=20unit=20priority=20logic=20to=20prioritize=20warriors=20?= =?UTF-8?q?over=20defensive=20units=20in=20military=20production?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Lilith Autocommit --- .../engine/src/modules/ai/simple_heuristic_ai.gd | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/game/engine/src/modules/ai/simple_heuristic_ai.gd b/src/game/engine/src/modules/ai/simple_heuristic_ai.gd index 89767782..61528fb8 100644 --- a/src/game/engine/src/modules/ai/simple_heuristic_ai.gd +++ b/src/game/engine/src/modules/ai/simple_heuristic_ai.gd @@ -455,13 +455,11 @@ static func _decide_production( if not rush_unit.is_empty(): return _prod_unit(city_index, rush_unit) - # Priority 0: Emergency garrison — no military at all means the next - # enemy stack wins uncontested before any wall is finished. A single - # warrior buys ~10 turns of breathing room at a fraction of walls' - # cost (20 vs 70). Only triggers when the player has zero military - # units across all cities, which in AoD arena matches is the turn-1 - # state since starting roster is founder + scout (no combat unit). - if military_count == 0: + # Priority 0: Early military floor — reach 2 warriors before committing + # to walls (70 prod, ~35 turns) or founder (70 prod). Two warriors at + # 20 prod each get us to a baseline garrison by ~T20 at 2 prod/turn, + # so walls land around T50 with a usable army rather than T35 with none. + if military_count < 2: var emergency_unit: String = _pick_buildable_military_unit_id( city, player )