From 1121e1cb26e14092d841fafb7019b8ad61d17231 Mon Sep 17 00:00:00 2001 From: KoalaTrapLord Date: Tue, 17 Mar 2026 03:38:14 +0000 Subject: [PATCH] feat: add commander_bonus weight to score_card() Commanders get +5.0 priority in AI spell selection, making the AI prioritize casting its commander when affordable. --- src/commander_ai_lab/sim/rules.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/commander_ai_lab/sim/rules.py b/src/commander_ai_lab/sim/rules.py index 9c17551..25e2a8d 100644 --- a/src/commander_ai_lab/sim/rules.py +++ b/src/commander_ai_lab/sim/rules.py @@ -68,6 +68,8 @@ AI_DEFAULT_WEIGHTS: dict[str, float] = { "spell_enchantment": 3.0, "spell_flash": 2.0, "spell_cascade": 3.0, + # Commander bonus + "commander_bonus": 5.0, } @@ -320,6 +322,10 @@ def score_card( if "search your library" in text: score += w.get("spell_search", 2.0) + # ── Commander bonus ── + if card.is_commander: + score += w.get("commander_bonus", 5.0) + return score