Java – AI algorithm design: card game
At present, I am developing a product called briscas or briscola, http://en.wikipedia.org/wiki/Briscola Spanish card game
In short, this is a card game in which two players of two teams play against each other (they can't see each other's hands or even the players), only shuffle the cards at the beginning, and then give three cards to each player Clockwise, everyone throws a card to try to win that round Who won the turning point Then, still clockwise, the player who wins the last round takes a card from the top of the deck, takes the player from his / her left, and so on Then you will continue to play until the deck is empty Who has ever had more points
Details: Deck size: 40 players: 4 people (2 teams, 2 people) cards have specific value (from 0 to 11)
problem
thank you
Solution
It depends on how ambitious you want to be, but as a start, you need a fast engine to simulate the game
Then you need a fast, and possibly simple, model player
The model player has no time to calculate the forward It can only react to predefined states So your first step is to build a good enough game state The game status should include historical statistics of your cards and some discarded cards, as well as how players play cards
Next, you will build a model player that acts on the state or
A) handwriting, play according to some heuristics you define But remember – there are no heavy calculations yet!
B) Write an ordinary player, but omit constants and cutoff values Use your simulation engine and genetic algorithm with tournament selection to evolve good parameters for the values For bonus points, evolve your players in pairs so that they complement each other well
C) Using more artificial intelligence, let a gene programming system (there are several mature systems. Find someone who can make a championship. You can even implement one yourself, but don't forget:) write the whole player for you with your status as input
next step:
Either you already have a great player, you can think you've done it, or you want to make it better If you want to make it better, your luck!
Use Monte Carlo simulation to play a large number of cards. In some cases, you have every choice (if I understand correctly, there will always be three choices) Let your model player make a decision at each choice and let your Monte Carlo simulation move randomly between your simulations
Now you should have a great card player!