How to Play Texas Hold'em

A hand of Texas Hold'em begins with the pre-flop. Each player is dealt two hole cards face down, followed by the first round of betting which is started with two forced bets called the small blind and the big blind. Three community cards, collectively called the flop, are then dealt face up on the table, and the second round of betting occurs. On the turn, a fourth community card is dealt face up and another round of betting ensues. Finally, on the river, a fifth community card is dealt face up and the final round of betting occurs. The players still active in the game at that time reveal their two hole cards for the showdown. The best five-card poker hand formed from each player's two private hole cards and the five public community cards wins the pot. If a tie occurs, the pot is split.

Texas Hold'em is typically played with 8 to 10 players. Limit Texas Hold'em uses a structured betting system, where the amount of each bet is strictly controlled in each betting round (In Open or No-limit Texas Hold'em, there are no restrictions on the size of bets; a player may wager any amount, up to their entire stack, at any time.) There are two denominations of bets, called a small bet and a big bet, which in this program is $10 and $20 by default. In the first two betting rounds, all bets and raises are $10, while in the last two rounds, they are always $20. In general, when it is a player's turn to act, one of three betting options is available: fold, check/call, or bet/raise.

A check and a call are logically equivalent, in that the betting level is not increased. The term check is used when the current betting level is zero, and call when there has been a wager in the current betting round. Similarly, a bet and a raise are logically equivalent, but the term bet is used for the first wager of a betting round.

There is a maximum of three raises allowed per betting round. The betting option rotates clockwise until each player has matched the current bet, or folded. If there is only one player remaining (all others having folded) that player is the winner and is awarded the pot without having to reveal their cards.

Adapted from:

Darse Billings, Aaron Davidson, Jonathan Schaeffer, Duane Szafron. The Challenge of Poker, Artificial Intelligence, 2001.
http://www.cs.ualberta.ca/~darse/Papers/AIJ02.html