Python Documentation


For Java 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.

Getting Started

Basics

The function called 'act' has to return either:

If your program raises an exception it will be the equivalent to returning 0.

Get current cards

This will put the bots current hand, with the table taken into account, into a variable called current_bot_hand:

current_bot_hand = obs.get_my_hand_type()

This will put the boards hand type, with the bots hand excluded:

current_board_hand = obs.get_board_hand_type()

Both variables will be of type HandType (enum), which looks like this:

If you want to match the current handtype to a specific hand type, you can do it like this:

if current_bot_hand == HandType.STRAIGHTFLUSH:
    some_action()

Or you can check if the current hand is better than a specific handtype:


if current_bot_hand >= HandType.PAIR:
    some_action()

If you want to match the hand type to specific hands, you can do it like this:


if (Range("77+, A8s+, K9s+, QTs+, AJo+, KQo").is_hand_in_range(obs.my_hand)):
    some_action()

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.


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.current_round == 2:
    some_action()

The current round is an int and can be interpreted like this:

Testing your bot


If you have any questions just ask us at the event.
Good luck with your bot and have fun!