# Texas Holdem game for learning purposes.

Learn Texas Holdem Video Source & Info:

GENERAL
Computer player have all the time probability table for other players possible card combinations and can thus check own probability to win anytime (win probability is calculated by “Monte Carlo method” supposing that all players don’t fold in any phase).
You as a human player can as well check your win probability anytime (computer supposes that you play with the same strategy as computer player itself).
Game is simplified so that raise is constantly 0.75 * pot
– for example if pot is 100\$, the raise will be 75\$ (thus after raise the pot will be 175\$)

CURRENT COMPUTER PLAYER STRATEGY
Every computer player can be given an own strategy,
current strategy for computer player is following (heads-up i.e. 2 player game):

RULE TO FOLD
On the river (5 cards in table) computer will fold if her probability to win is less than 100% / (pot / potdebt + 1)
[example on the river: pot=10\$, pot debt=4\$, then computer will fold if its probability to win is less than 29% (=100%/(10\$/4\$+1))].
On the turn computer will fold if its probability to win is less than 1.2 * 100% / (pot / potdebt + 1),
on the flop 1.4 * 100% / (pot / potdebt + 1) and on the pre-flop 1.5 * 100% / (pot / potdebt + 1).

RULE TO CHECK/CALL OR RAISE
If computer player don’t fold, it will check/call or raise by following rules:
– if probability to win is more than 55%, computer player will raise by 60% probability and check/call by 40% probability
– if probability to win is between 50% – 55%, computer player will raise by 55% probability and check/call by 45% probability
– if probability to win is between 45% – 50%, computer player will raise by 35% probability and check/call by 65% probability
– if probability to win is between 40% – 45%, computer player will raise by 25% probability and check/call by 75% probability
– if probability to win is between 35% – 40%, computer player will raise by 20% probability and check/call by 80% probability
– if probability to win is less than 35%, computer player will raise by 15% probability and check/call by 85% probability

PROGRAM FURTHER DEVELOPMENT
The program can relative easily be developed to play better.
For example to calculate probability to win in more reasonable way:
– if you raise, first is calculated the probability that all opponents fold, probability than exactly one opponent don’t fold, probability than exactly two opponents don’t fold etc. and probability to win is calculated based on that