0 votes
1 view
in AI and Deep Learning by (48.7k points)

Ok, so I am making a Texas Hold'em AI for my senior project. I've created the GUI and betting/dealing procedures, but I have reached the part where I need to determine who won the hand, and I do not know the best way to approach this. I am using python btw. ATM I have 2 lists, one for the 7 player cards, one for the 7 computer cards. Currently, all cards are stored as a struct in the list as {'Number': XX, 'Suit': x}, where number is 2-14, the suit is 1-4. The way I was going to approach this, is to make a function for each hand type, starting with the highest. Eg. self.CheckRoyal(player cards), and manually go through the list and evaluate if a royal flush was achieved. There has to be a better, numerically way to do this.

1 Answer

0 votes
by (105k points)

The current hand odds algorithm calculates the probability of a player hand is better than the opponents’ hands, considering that the opponents can have any remaining non-visible cards and that they won’t fold until the showdown.

For a better understanding of the Estimating the Probability of Winning for Texas Hold’em Poker Agents, refer the following link:


If you are looking to learn more about Artificial Intelligence then you visit Artificial Intelligence(AI) Tutorial. Also, if you are appearing for job profiles of AI Engineer or AI Expert then you can prepare for the interviews on Artificial Intelligence Interview Questions.

Welcome to Intellipaat Community. Get your technical queries answered by top developers !