public class DeckModel extends Object
Takes in observations of cards including partial observations (information told about a card) and calculates probabilities for remaining cards.
We see many cards, each of which improves the accuracy of the model.
Start off with list of all cards. Provide observations about what we see - crossing them off.
What happens to information we are told? It can make certain cards more likely to be something.
To do this we need to - for each card in our hand store information about what it could be.
If we know its colour - we can choose cards from the deck that match. Likewise for the number.
It can improve statistics about what is in the deck. Knowing there is a red in the hand reduces chance of a red in the deck.
By how much?
we know there are 6 reds in the deck somewhere.
We are then told there is a red in our hand.
That means there are 5 reds in the deck.
How to store that?
N cards in hand, 50 - (N*M) - T - P cards in deck.
Store an array of probabilities for each card.
Probability that it is in the deck and that it is in the hand.
If we know nothing about that card - it is equal probability equal to 1/remaining cards
Adjust for knowledge.
|Constructor and Description|
|Modifier and Type||Method and Description|
Provide the model with a list of cards that are visible at the start of the game.
Copyright © 2017 FOSS Galaxy. All rights reserved.