AI: Playing cards
Continuing from the previous post I’d like to write something about how we got the AI to play the best card from its hand.
The logic behind this is to give each playable card (and possible action) a value. Each value needs to be in the same scale so you can compare each card’s value, so the higher the better.
This technique is comparable to the one artificial chess players use: each piece has a given value, but it also depends on its position on the board and the game’s context. Luckily for me our card game is not that deep, but this kind of logic still applies.
Mini closing rant: The beauty of the lost art of reading technical books is that you can get ideas of how to do stuff. That’s something copy-paste coders will never do. Understanding how things get done gives you leverage on how to make a better game.
Posted in Game Programming