Re: Traversable Game State/Engine Code
Posted: 09 Mar 2015, 02:50
You can probably just have a new class implement PlayerController and do the passing or whatever to make things work. I don't think this exists already.excessum wrote:Thanks for the detailed replies!
I understand that simulating sequences allows new and possibly better decisions to appear, my concern is the cost, especially with recursion depths greater than two. Any response the opponent makes, however irrelevant (ie. Think Twice), will invalidate the previously (costly) sequence and start a new (costly) sequence.
The issue with carrying decisions to PlayerControllerAI is known (and annoying) and adding recursion adds to the hassle. I think I will stay off such effects for now to go for the low hanging fruit.
Is there any way to mock a PlayerController that only passes? I am looking to simulate a single creature attacking for multiple turns to capture effects like Goblin Rabblemaster and Master of the Feast where the benefit/cost is not apparent immediately.
By the way, I've landed an improvement to the simulation AI so that it actually tries to simulate the next combat each turn, which it uses to decide whether temp P/T boost effects change the score or not. (It can be smarter still... but for now this is better than before.)
By the way, here's an example of the kind of cool stuff this AI currently is able to figure out on its own: With Liliana and Ajani both in play, AI figured out (looking 3 moves deep) that it could use Liliana to search for a Siege Rhino* and put it on top of the library, then use Ajani to look at the top 4 cards of the library and choose one from among them (Seige Rhino*) and then play Seige Rhino for great results.
Of course, the above has a lot of caveats currently. For one, the AI currently cheats since there's no concept of "hidden information" - so it knew that using Ajani's ability without Lili wouldn't be as good due to having access to the information about its library. This can be fixed by keeping track of what's hidden to the AI - but ideally AI would also have some prediction - else AI would never using Ajani's top4 ability. But for now, there are bigger fish to fry.
*These choices were made by existing AI code, not using simulation. Possibly could be improved, but maybe good enough.