So the AI cheats? It plays a few turns ahead and makes decisions based on that?
Not really? I mean, it doesn't know exactly what shuffle it's going to get. It just simulates a bunch of potential shuffles based on what happens if it makes certain moves and then picks ones that made it win more in those simulations.
OK, that's fine for shuffles. But say it plays Wishing Well, or decides whether it's going to play Wishing Well. What then?
I guess I don't really understand what cheating you think could be happening. It plays Wishing Well, it runs some search, it guesses the card it thinks will give more win rate.
I think the confusion here is LastFootnote thinking you're referring only to future shuffles, while I assume you mean to also re-randomize the shuffles that already happened (which, practically, would mean re-shuffling the deck before each simulation).
IMO, though, properly re-randomizing unknown info is subtly difficult, both from an algorithmic perspective and to code it without bugs.
At first it seems simple enough to just randomize everything it doesn't know before each simulation: the order of its deck, the contents & order of its opponent's hand, deck, and discard (and possibly other things I'm not thinking of). But actually it can know something about these:
- The top few cards of the decks may have been revealed for various reasons.
- The opponent may have revealed their hand at some point.
- etc.
Even trickier: it's possible to make inferences from the opponent's play about certain things that aren't actually known. e.g. If the opponent didn't play an action last turn, they probably didn't have their Smithy in hand; but this is just because we're assuming something about the opponent's strategy, because it would have been legal for them to not play it.
To do this all optimally is (I think) comparable to playing poker, and having it mixed in with all the other parts of Dominion makes it extra hard.
And it would be really easy, when programming this, to accidentally leak info that the AI is not supposed to have. The safest way might be a sort of clean-room approach: only provide the AI with public info, from which it would create a new game state. (The easier and more bug-prone approach is to copy the game state and try to scrub hidden info out of it.)
That said, if the objective is just to make a fun AI opponent for an app, none of this is too important. I mean, if it's just playing strategies like BM+Smithy, then whether it plays Wishing Well optimally or legally doesn't even matter.