# How to do inference in a card game?

In the game there are 5 players, each with 8 cards in hand. No other card is present.

Using Monte Carlo (MCTS) I run many simulations of the game from the current state to the end of the match. In those simulations adversaries play with very simple dumb rules. When generating a new simulation I assign to them unknown cards with a uniform random distribution. I say a card is unknown if it is not in my hand, it is not on the table and it has not been discarded before, then it must be in someone other's hand.

However, uniform random distribution it's not the best way to distribute cards. In fact, sometimes it's straightforward to a human player a reasoning like this:

If he had 3♥ he probably would have discarded it the previous turn as it was a very good move. Then, it's very unlikely that he'll discard 3♥ in hand hereinafter.

Well, before discarding, before generating the Monte Carlo simulations, I would assign to each adversary the set of unknown cards with their probability distribution:

{ (3♥, 0.20) , (4♥, 0.12) , (5♥, 0.03) ...}.

How can I calculate those probabilities? Is there some paper or some ideas where to start from?

EDIT: An idea: Computationally talking, would it be a good idea to run a simple Monte Carlo simulation when chosing adversaries' strategy? With simple I mean a rough, fast, simulation which ends in a small time like a second. In this way, the next turn I would have a measure of the goodness of adversaries moves and I can start doing inference from there.

-
Help me understand. You want to be able to start from likely hand configurations from players who play intelligently? Wouldn't it be simpler to simply write an intelligent AI and start from the beginning? – Neil Jan 9 '14 at 9:42
@Neil Do you mean using minimax? I've tried it at it is too much time consuming. – HAL9000 Jan 9 '14 at 9:46
Oh, I think I understand now. You mean to determine the probabilities of cards that a player would have prior to each play of an AI, right? – Neil Jan 9 '14 at 9:51
Answering your EDIT: if you want to develop simple but effective heuristics for playing the game, you can try the genetic approach. Basically let your AIs play against eachother and evolve (by mutating the parameters randomly). An example of Tetris-playing AI: luckytoilet.wordpress.com/2011/05/27/… – Konrad Morawski Jan 9 '14 at 9:51
@Neil exactly, it's a way of improving efficiency of Monte-Carlo. I want to generate simulations which are more likely to be coherent with the current state. – HAL9000 Jan 9 '14 at 9:54