Skip to content

Quickstart

Build a poker bot in Python, test it against house bots on your machine, and upload it at poker.monashcoding.com.

1. Install

pip install https://poker.monashcoding.com/dl/macpoker-0.1.0-py3-none-any.whl

Or start from the scaffold, which contains a ready-to-run main.py.

2. Write

from macpoker import Bot

class MyBot(Bot):
    def act(self, state):
        if state.to_call == 0:
            return state.check()
        pot_odds = state.to_call / (state.pot + state.to_call)
        if pot_odds < 0.3:
            return state.call()
        return state.fold()

One main.py, one Bot subclass, one decision method. Everything your bot can see and do is on state.

3. Test

macpoker play main.py call random --deals 50

Your bot plays 100 hands against two house bots and you get a chip count. See testing locally.

4. Submit

Zip your folder with main.py at the root and upload it from the app. Each upload plays a validation game against the house; pick a passing upload as your main before the deadline. That is your tournament entry.

Questions go in the MAC Discord.