Auto-tap: Add a tracer to easily see what it selected#11208
Conversation
tool4ever
left a comment
There was a problem hiding this comment.
so much overhead:
we could possibly cherry pick this if you'd share a more detailed description of your general approach for the parent and how the logic flows, I don't feel comfortable complicating production code if it's for a dead end
something building out plan steps closer to how simulation works sounds like a possible direction though
but we don't need another parallel debugging route, the code is already full of DEBUG_MANA_PAYMENT - I can see how that output wouldn't be clear enough for approaching nested paying
for this IHasForgeLog.aiLog is already available and TinyLog gives you support to manage the logging levels in a cleaner fashion
There is indeed overhead for preparation for the rest (nested checks). I'll check IHasForgeLog see if I can't reuse it. |
d67aa69 to
865ce8f
Compare
|
The whole plan is to have everything funnel through one planner, sharing the same decision path so the plan and execution match.
The plan
The final payment loop will look like Edge casesI don't know how strict you want the tests, or if you guys want to check for edge cases. (e.g. Yuna, Grand Summoner) I think it is overkill. Sorting + chaining + maximizing plays should be enough. I'll adjust in consequence. |
|
Alright, that's nice but still too much of a mixup, improving existing parts like scoring for better decisions can just be done in small steps on their own instead...
This is recursion. How will AI decide it's needed and put a viable plan together? Will it just perform brute force attempts to see if the filtering gives it the shards it needs? |
|
It all start by creating a context ( Then we go to create a screenshot of the playable mana sources (
We can pass a the actual cost of the spell/ability to
For the actual selection loop (The one in the previous comment). Let's take a {1}{R}{R} spell with a battlefield of a Wastes, and two Rakdos Signets.
There is still some brute forcing but it is limited as we sort and filter the candidates we test beforehand. |
It adds a debug trace when it enters the player's payment prompt to display the ordered steps in which it will attempt to pay for the cost. It will help with ordering, colors, and amount tracking. No logic change in this PR.
Disabled by default, enabled with the VM flag
-Dforge.debugManaPayment.plan=true.[test]is the dry run and[prod]is the actual actions.Example display:
Next will be mana source sorting +
SVar:AIManaReserve:Truesupport.