Java Documentation
For Python documentation
This is the the stripped down version of the full documentation that will help you get started with your first Poker Bot Battle script. If you want the full overview of the documentation you can follow this link. Keep in mind that the full documentation is for Python.
Getting Started
Basics
Your program can return the following options:
- 0 is to fold, or check if no previous bot has raised
- 1 is to call, or check if no previous bot has raised
- >1 is for raising a specific amount
Get current cards
This will put the bots current hand type, with the table taken into account, into a variable called currentBotHand:
HandType currentBotHand = obs.getMyHandType();
This will put the boards hand type, with the bots hand excluded:
HandType currentBoardHand = obs.getBoardHandType()
Both variables will be of type HandType (enum), which looks like this:
- STRAIGHTFLUSH = 9
- FOUROFAKIND = 8
- FULLHOUSE = 7
- FLUSH = 6
- STRAIGHT = 5
- THREEOFAKIND = 4
- TWOPAIR = 3
- PAIR = 2
- HIGHCARD = 1
- ERROR = 0
if (currentBotHand == HandType.STRAIGHTFLUSH) {
someAction();
}
Or you can check if the current hand is better than a specific handtype:
if (currentBotHand.getValue() >= HandType.PAIR.getValue()) {
someAction();
}
If you want to match your hand to a specific range, you can do it like this:
if (new Range("77+, A8s+, K9s+, QTs+, AJo+, KQo").isHandInRange(obs.getMyHand())) {
someAction();
}
The list above is a list of hands that are generated with the help of the site below:
When you have created the wanted hand range you can copy the range string into your script.
- Manually copy it into your script
- Inspect the site to copy paste it into your script
Get current round
If you want to base some action on the specific round of the current game, you can do it like this:
if (obs.getCurrentRound() == 2) {
someAction();
}
The current round is an int and can be interpreted like this:
- 0 = Preflop (no cards on board)
- 1 = Flop (three cards on board)
- 2 = Turn (four cards on board)
- 3 = River (five cards on board)
- 4 = Showdown (last chance to raise)
Testing your bot
If you have any questions just ask us at the event.
Good luck with your bot and have fun!