Improve AI draw-punisher avoidance heuristics#10576
Improve AI draw-punisher avoidance heuristics#10576Madwand99 wants to merge 3 commits intoCard-Forge:masterfrom
Conversation
| return ComputerUtilCombat.attackerWouldBeDestroyed(ai, attacker, combat); | ||
| } | ||
|
|
||
| public static boolean shouldAvoidDrawPunisher(final Player ai, final SpellAbility sa) { |
There was a problem hiding this comment.
hmn, I'll have to think on this:
we usually don't attempt guessing this sort of two level deep
(e.g. we have helpers for direct damage from etb/casting but this is more "I might draw from it" + "then I might lose life from drawing")
I'm not convinced that while at first this might look good for a few specific cases it doesn't end up causing just as much problems at other times, especially when it's hooked up this high in the chain 🤔
There was a problem hiding this comment.
Makes sense. This heuristic is intentionally trying to catch cases that are one step beyond direct “this spell hurts me”: “this play causes me to draw a lot” plus “an opponent has an active draw punisher.” That is why it catches things like Wheel effects into Nekusar/Xyris, but also why it is riskier than the usual direct ETB/cast damage checks.
I think there are a few possible directions:
- Keep the current high-level hook. This catches the broadest set of cases, including future draw-engine permanents like Mindmoil, Teferi’s Puzzle Box, and Arjun. The downside is exactly what you pointed out: false positives are expensive because this blocks the play before normal AI evaluation can consider context.
- Move the heuristic into narrower ability logic, e.g. ChangeZoneAllAi / wheel-style effects only. This is much safer and easier to reason about, but it would no longer catch permanents like Mindmoil/Puzzle Box/Arjun being cast into Xyris/Nekusar/Kederekt.
- Split the heuristic into narrower cases: immediate wheel-style draw effects in the relevant ability AI, plus a separate permanent-spell check only when the card being cast has its own large self-draw trigger. That would still catch Mindmoil/Puzzle Box/Arjun, but avoid using this as a broad “before any spell” gate.
Happy to go with any of these options.
This narrows the previous AI decision work (#10559) to a lightweight heuristic for avoiding dangerous draw effects into opposing draw-punishers.
Changes include: