Using MDP model and Value Iteration to solve for decisions in the card game "Hearts". If you're an experienced Hearts player, you'll notice in the code that we omit some rules (leading with 2 of clubs, not leading with Hearts unless they've been played, trading cards, shooting the moon, etc), but we decided they just added unnecessary complexity for this amateur project. We kept the essence of the game, i.e. playing tricks and avoiding hearts / queen of spades.
Code: [ Ссылка ]
![](https://s2.save4k.ru/pic/0AItpwiVFnU/mqdefault.jpg)