Heads up no-limit Texas Hold 'em

This game is a heads up no-limit Texas Hold 'em poker variation. Heads up meaning of course two bots play against each other. No-limit Texas Hold 'em is probably the most played game type both online and in real life. A lot of research has also been dedicated to this poker variation, but that does not mean it's now easy to create a good bot! Below, the rules of the game are explained.

Structure of the game

Each round begins with the players getting dealt two cards face down, called the hole cards. The small blind is posted by one of the players and the big blind by the other player. A blind is the bet amount the player always has the pay at the start of a round no matter what. More on blinds in the section below. The player with the small blind starts with the first betting round, called the pre-flop. There are four things a bot can do when betting. These are fold, check, call and raise. Fold means giving up and everything that is in the pot goes to the other bot; the next round starts. Checking can be performed when both bots' bets are equal and no raise has been done that betting round. If both bots check, the game continues to the next betting round. Calling means a bot matches the bet of its opponent. If both bots have made a bet move atleast once, the next betting round starts after a call. Finally raising means you increase the bet amount. This amount must always be at least twice the big blind. When a raise is performed, the total amount your bot will put extra in the pot is the the call amount (so the bets are equal) plus the raise amount. After a raise, the opponent has to react to the raise by calling, re-raising or folding. Because this game is no-limit, there is no limit on the raise amount or the amount of re-raises.

The bot with small blind starts the first betting round and it can fold, raise or call (match the big blind). The bot with the big blind then either reacts to a raise, or if the first bot called, it can check, raise or fold. Then the second betting round starts and the cards on the table, or community cards, come in to play. In the second betting round, the flop is dealt. In the third, the turn is dealt, and in the fourth, the river. When the flop is dealt, three face up community cards are placed on the table. With the turn, the fourth is added, and with the river the final fifth card is added. After the first betting round, the bot with the big blind starts with betting, instead of the bot with the small blind. Finally, if both bots remain after the final betting round, a showdown occurs. On the showdown, each bot plays the best five-card poker hand they can make from the two hole cards and the five community cards. The bot can use two hole cards, one, or even none of the hole cards for his hand. The bot with the highest hand takes everything that is in the pot. If both bots have the same hand, the pot is split.

The final thing left to explain about the game structure is the possibility of a sub-pot. When a bot calls or raises and with that move bets all of his remaining chips, it is said to go all in. When a bot calls but the call amount is higher than what the bot actually still has, it will still go all in. But then the difference will be taken off of the opponents bet and will be placed in the sub pot. This sub pot will always be for the opponent, because that is what it has bet too much.

List of poker hands

Below you will find a list of possible hands in poker, ranked from highest to lowest. If two hands are the same, the one with the higher value cards in that hand wins. For example, a pair of aces wins over a pair of fives.
1. Royal flush
2. Straight flush
3. Four of a kind
4. Full house
5. Flush
6. Straight
7. Three of a kind
8. Two pair
9. One pair
10. High card

Blind levels

In each match the blinds are small at the start of the match: 10 for the small blind and 20 for the big blind. The blinds are increased each time 10 hands have been played. This keeps the game dynamic and gives your bot more strategic possibilities. It also ensures that matches will not go on endlessly, since the blinds eventually will become so high that the bots are forced to go all in by paying the blinds. But of course there are enough hands to play before the luck factor becomes too high.

Winning

In this game type your bot plays against one other bot. Your bot will not know which other bot it's playing against at the start of the game, so your bot cannot use predefined strategies based on opponent's identities. (By the way, this is not allowed at all on this site.) This does not mean your bot can't gather information about the strategies of your opponent during the game! Then use this information against him to win the match. When the bot gets all its opponent's chips, it wins the game.

Technical details

During a match, bots are asked to make moves. Each bot starts a new match with a time bank. The time that your bot takes to return its next action is deducted from the time bank. But the time bank is increased with a small amount for each action your bot has to make. For example, the initial time bank could be 5 seconds and the time added per move half a second. That would mean that your bot should on average react in half a second. If your bot keeps reacting within half a second, then your time bank will stay at the maximum amount, giving your bot the opportunity to perform larger calculations when needed. If your bot then once uses 4 seconds to return its move, then it has only 1 second of its time bank left, which together with the added time brings the time bank for the next move down to 1.5 seconds. So bots should decide on their moves quite fast, but the time bank gives your bot the flexibility to think a little longer now and then. The amount of time per action and the maximal time bank are given to the bot at the start of a match. Currently we start with a time bank of 10 seconds and 0.5 seconds added time per move.

Besides the time bank, there is also another measures against bad bots, that could keep our game server occupied. If your bot returns nothing more than twice in a row, all it's following moves are automatically a check. To avoid this happening to your bot, make sure it returns at least something in time, like a check or a fold.

Game viewer hotkeys

hotkeys-headsupomaha