Autotap - Add support for filter abilities#11173
Conversation
tool4ever
left a comment
There was a problem hiding this comment.
Hopefully this'll work better than the last AI attempt 🤔
Anyway this is huge and the highlighting part is already a separate feature: #5112
Please extract that into its own PR first, it'll certainly be useful for testing the rest of this 👍
|
|
||
| addCard("Mountain", p); | ||
| addCard("Plains", p); | ||
| addCard("Boros Signet", p); |
There was a problem hiding this comment.
after we're done with most code concerns need to remove AI:RemoveDeck:All from all applicable cards so I can batch fuzz random generated decks for crashes
| SVar:ETBTapped:DB$ Tap | Defined$ Self | ETB$ True | ||
| A:AB$ Mana | Cost$ T | Produced$ Combo W U | SpellDescription$ Add {W} or {U}. | ||
| A:AB$ Animate | Cost$ 3 W U | Defined$ Self | Power$ 4 | Toughness$ 4 | Types$ Creature,Elemental | Colors$ White,Blue | OverwriteColors$ True | Keywords$ Flying & Vigilance | SpellDescription$ Until end of turn, this land becomes a 4/4 white and blue Elemental creature with flying and vigilance. It's still a land. | ||
| SVar:AIManaReserve:True |
There was a problem hiding this comment.
please try to solve only one problem with this PR
this size is completely unreasonable besides manlands being something that shouldn't need manual tagging
There was a problem hiding this comment.
I will separate them more cleanly.
| simulator.setInterceptor(choicesIterator); | ||
| // I feel like something here is making a wrong assumption about what the target is | ||
| lastScore = simulator.simulateSpellAbility(sa); | ||
| final int castBonus = ComputerUtilMana.estimateCastBonusForSpell(sa, player); |
There was a problem hiding this comment.
are you having a LLM go wild?
this is completely out of scope
What's new?
The auto-tapper is now an intelligent planner. This should hopefully avoid obvious mistakes and allow a better use of utility lands.
Prioritize permanent sources rather than disposable ones (e.g. Lotus Petal).
Prioritize colorless mana for generic mana, unless you have a {C} heavy hand. (e.g. Eldrazi)
Added support for filter abilities with generic cost (e.g. {1}: Add {R}.), and filter lands (e.g. Cascade Bluffs). Prevents chaining if not needed, and should avoid obvious pitfalls (e.g. uselessly activate Initiates of the Ebon Hand).
Added support for Mana Flare and Utopia Sprawl effects.
Added support for SVar:AIManaReserve:True for utility lands. This makes them less likely to be chosen by the auto-tapper. (Need to add it to more card rules)
Castability probe: Detection of remaining cards in hand/command zones to select which assets to use first to try and maximize plays. This is toggleable for performance in options (Desktop and mobile). Default is on.
Added multiple tests for edge cases.
Debugging
You can add the VM option
-Dforge.debugManaPayment=trueto help visualize what it attempts to use, or-Dforge.debugManaPayment=truefor an easier to read plan (recommended).Let me know if there are edge cases it misses.