So recently I've been playing some Hearthstone - a free online card game by Blizzard, and it made me wonder how you would program an AI to win the game. Ignoring the big hurdles of computer vision to understand the game state, and effectively re-writing the game to model all of the rules, just the logic is still a major problem.
You can read the rules on the wikipedia page, or watch a few matches. But it brings up many interesting problems:
- Predicting what the opponent will play:
This could be done by having priors on the different types of decks for each class (or in arena mode, where one builds a deck from random given cards, for each card based on it' place in published ranking lists). Then update this by a Bayesian method, this would then inform the posterior on what the opponent has in the hand (though this is complicated, how do you produce a posterior for a (somewhat random) sample of 5 cards, from a MAP estimate for 30 cards?).
- Holding back for better potential
For example, there is a card which deals 3 damage spread over random enemies. Some early players will use this on the first turn to deal 3 damage directly to the enemy hero (killing the enemy hero is how you win), but this is stupid, because it is incredibly unlikely that you'll be in a situation where you'd have won if you'd used the card early but are then able to do so.
However, getting the AI to understand this is difficult, since if you just used a simple search over gamestates, then one where you did 3 damage is better than one where you don't. Of course you could add some cost to using cards, etc. but it seems a bit messy for something which seems so logical.
- Weakly informative situations:
For example, if you play a very strong minion, and the enemy doesn't use a kill card (like polymorph, etc.) on it in their turn, then you can be certain that they don't have that card in their hand. This is another tricky thing to make use of.
Anyway, I thought it was an interesting problem, I realise this probably makes no sense whatsoever if you haven't played the game.
[link][5 comments]