Are you ready to start coding?

Want to give this Omaha poker competition a try and have a go at some of the prize money? Getting started is really easy if you download one of our starter bots. Just change the default (dumb) behavior and upload the source code to the site.

Is the language you’re looking for not listed or do you want to start from scratch? No problem! Look at the Languages page for a list of all available languages to code your bot in.

All communication between your bot and the engine works through the standard input and output channels. In the section "Communicating with the game engine" you can find a detailed explanation regarding the protocol all bots should implement to communicate with the game server.

We've made the engine source code available for you! Use this to test your bot locally or in any other way you like. Source code can be found on Github

Starter bots

C#Created by Trogatog
C++Created by MasterJos
Java
JavaScriptCreated by SgtPooki
Python

A simple example

import java.util.Scanner;

public class MyBot {

    private Scanner scan = new Scanner(System.in);

    public void run()
    {
        while(scan.hasNextLine()) {
            String line = scan.nextLine();

            if(line.length() == 0) {
                continue;
            }

            String[] parts = line.split(" ");

            if( parts.length == 3 && parts[0].equals("Action") ) { // A move is requested
                System.out.println("check 0");
                System.out.flush();
            }
            else { // Game settings, round information and opponent moves are also given
                // Store it or something
            }
        }
    }

    public static void main(String[] args) {
        (new MyBot()).run();
    }
}

This is a very simple example of a working bot in Java. It reads the engines output and only does something when a move is requested by the engine: it will do a 'check'. Sometimes this is not an appropriate move, because checks are only allowed when both players bet the same. The engine will then automatically change it to a fold in that case.

Communicating with the game engine

The communication between the poker engine and your bot goes via the standard input and output channels. Every line of output the engine gives to your bot contains exactly 3 words, separated by spaces. This is done to make the parsing easy for you. Lines start with one of the following words:

  • Settings given only at the start of a match and gives general information about the settings of the game.
  • Match indicating information about the current state of the match, such as the pot size or the blind heights.
  • Action this means the engine wants your next move.
  • [botname] information about a certain bot, where [botname] can be either player1 or player2. This includes bot actions, hands and winnings.

Below you find two tables containing all possible communication between the engine and the bot, together with their meaning.

`
Output from engineDescription
Settings timeBank iMaximum time in milliseconds that your bot has in its time bank
Settings timePerMove iTime in milliseconds that is added to your bot's time bank each move
Settings handsPerLevel iNumber of hands that is played within each blind level
Settings startingStack iAmount of chips that each bot starts the tournament with
Settings yourBot bThe name of your bot during this match
Match round iThe number of the currently played hand, counting starts at 1
Match smallBlind iThe current size of the small blind
Match bigBlind iThe current size of the big blind
Match onButton bThe name of the bot that currently has the dealer button
Match table [c,c,c,...]The cards that are currently on the table
Match maxWinPot iTotal amount of chips currently in the pot (plus sidepot)
Match amountToCall iThe amount of chips your bot has to put in to call
Action b tRequest for the bot's next action within given timespan
b stack iThe amount of chips that the given bot has left in his stack
b post iThe given bot pays a blind of the given size
b hand [c,c,c,c]The hand that the given bot has
b fold 0The given bot folds, always followed by the number zero
b check 0The given bot checks, always followed by the number zero
b call iThe given bot calls with the given amount of chips
b raise iThe given bot raises with the given amount of chips
b wins iThe given bot wins an amount of chips at the end of a hand
Output from botDescription
fold 0Your bot folds. This is also the default action on wrong outputs
check 0Your bot checks. This is also the default action on no response
call 0Your bot calls, automatically with the correct amount
raise iYour bot raises with the given amount of chips

Each "i" can be any positive integer. Each "b" is represents the name of a bot (as far as the engine is concerned) and can be either player1 or player2. "t" represents the time in milliseconds that the bot has to respond to the engine. A "c" represents a card, either in the hand or on the table. This is always two characters: The first represents the card height and can be any number 2-9. T, J, Q, K, A are 10, Jack, Queen, King and Ace respectively. The second character represents the suit and can be d, c, h or s. For Diamonds, Clubs, Hearts and Spades respectively.

The engine will always try to perform the action given by the output of your bot. In case the action is not valid in the current game situation, the engine will change it automatically to a logical alternative. In such cases the engine will print a warning, so you can see what happened.

Input and output between the bot and the engine go via the standard input and output channels, but you can use the error output channel to print stuff in the error dump of your game. This will not be read by the engine and can be used for debugging.

By example

Below you find an example of a played game, you can find this in the output of any of your own games as well. It should make a bit more clear what output is provided to your bot and how to respond.

Settings timeBank 5000
Settings timePerMove 500
Settings handsPerLevel 10
Settings startingStack 1500
Settings yourBot player1

These are the settings of this game. This information is sent at the start of a match only. Your bot is informed about the number of hands per blind level, starting stacks and what name it has during this match. Continuing with the rest of the input/output:

Match round 1
Match smallBlind 15
Match bigBlind 30
Match onButton player1

This is given at the start of each round. We're in round 1, small blind is 15, big blind is 30 and player1 (our bot) has the dealer button. Continuing.

player1 stack 1500
player2 stack 1500
player1 post 15
player2 post 30
player1 hand [2d,Ts,8s,7h]

This is the information about the players at the start of each round. Namely the current stack, amount paid for the blinds and the hand of our bot. Our bot has the button, so it can do the first move:

Match maxWinPot 45
Match amountToCall 15
Action player1 5000

The first two lines are given each time the engine is about to ask for a response, they give the total amount our bot can win and what it has to put in for a call. Then the engine asks the bot for a move, with a time limit of 5 seconds. This is the first round, so our time bank is still full. Let's say our bot takes 1000ms to respond, the time bank has 4000ms left. Each move we get 500ms extra in the time bank, so next time the engine asks for a move it will say "Action player1 4500". Continuing.

call 0 //output from bot
player1 call 15
player2 check 0

Our bot has done a legal move by calling and the engine outputs it's own move back, plus the move the opponent did. Now we move to the flop.

Match table [7s,Js,3h]
player2 check 0
Match maxWinPot 60
Match amountToCall 0
Action player1 4800

We get the flop that is on the table, nice, we have a pair of 7's. After the first move, the player that does not have the dealer button will start, which is our opponent. He checks. Then the engine asks our bot for a move again, it responds:

call 0 //output from bot
player1 check 0

Our bot called, but the opponent did a check, so the engine changes it to a check as well. Now the turn

Match table [7s,Js,3h,5d]
player2 check 0
Match maxWinPot 60
Match amountToCall 0
Action player1 5000
raise 30 //output from bot
player1 raise 30
player2 call 30

Still our best hand is a pair of 7's. player2 checks again, but we do a raise. player2 now has to call or fold, but he calls. Next, the river.

Match table [7s,Js,3h,5d,9s]
player2 check 0
Match maxWinPot 120
Match amountToCall 0
Action player1 5000
raise 200 //output from bot
player1 raise 120
player2 call 120

The river is on the table and we have a straight flush! Our bot raises by 200, but the pot is 120, so the maximum amount to raise is also 120. player2 calls again so we have a showdown:

player1 hand [2d,Ts,8s,7h]
player2 hand [Jd,Th,Ad,5c]
player1 wins 360

player2 only has a pair of Jacks, so our bot won! On to the next round.