Skip to main content

Maverick banner

Documentation Status Code Coverage Code Quality Code Style License

Documentation Coding Agents Guide

BuyMeACoffee

A Python library for simulating poker games with custom player strategies.


🤖 Build with Coding Agents

Using Claude Code, Cursor, Copilot, Windsurf or ChatGPT?
Teach your AI assistant Maverick's API and let it write bots, strategies and simulations for you.

llms.txt  •  llms-full.txt  •  per-page Markdown  •  Claude Code plugin & skills

Read the Coding Agents Guide

Poker is a great sandbox for decision-making systems: hidden information, imperfect opponents, probabilistic outcomes, and lots of room for experimentation.

Maverick is a Python library for simulating poker games with custom player strategies. It gives you a complete poker game loop (dealing, betting rounds, showdown, pot distribution) plus a clean player interface so you can swap strategies in and out.

Highlights

Maverick is designed for building and testing strategies:

  • Composable API: build your own players by implementing a single method.
  • State-machine engine: clear phases and transitions, easier to reason about.
  • Event stream: observe what happens (for logging, analytics, replay, debugging).
  • Hand evaluation utilities: score hands and compare outcomes.

If you’ve ever wanted to:

  • benchmark bots against each other,
  • run repeatable simulations,
  • prototype an agent that makes betting decisions,

…Maverick is meant to make that workflow straightforward.

Installation

You can install Maverick from PyPI

pip install maverick

Your first game (minimal example)

Here’s an end-to-end example using built-in bots:

from maverick import Game, PlayerLike, PlayerState
from maverick.players import FoldBot, CallBot, AggressiveBot

# Create a game with blinds and a stop condition
game = Game(small_blind=10, big_blind=20, max_hands=10)

# Create players
players: list[PlayerLike] = [
    CallBot(name="CallBot"),
    AggressiveBot(name="AggroBot"),
    FoldBot(name="FoldBot"),
]

for player in players:
    game.add_player(player, state=PlayerState(stack=1000))

game.start()

# Inspect results — all players (including eliminated) are retained
for snapshot in game.state.players:
    print(f"{snapshot.name} - Stack: {snapshot.state.stack} ({snapshot.state.state_type})")

# Active players only (excludes eliminated)
for snapshot in game.state.get_active_players():
    print(f"{snapshot.name} is still in the game with {snapshot.state.stack} chips")

(See the documentation for more examples and APIs.)

Documentation

The project has extensive documentation hosted on ReadTheDocs. Most library information is documented there, with only the essentials kept here.

Changes and Versioning

The changelog is maintained in CHANGELOG.md. The project adheres to semantic versioning.

Contributing

Contributions are currently expected in any the following ways:

  • finding bugs If you run into trouble when using the library and you think it is a bug, feel free to raise an issue.
  • feedback All kinds of ideas are welcome. For instance if you feel like something is still shady (after reading the user guide), we want to know. Be gentle though, the development of the library is financially not supported yet.
  • feature requests Tell us what you think is missing (with realistic expectations).
  • examples If you've done something with the library and you think that it would make for a good example, get in touch with the developers and we will happily inlude it in the documention.
  • funding Use one of the supported funding channels. Any amount you can afford is appreciated.
  • sharing is caring If you like the library, share it with your friends or colleagues so they can like it too.

In all cases, read the contributing guidelines before you do anything.

License

This package is licensed under the MIT license.

Metadata

Release files for maverick 0.8.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for maverick 0.8.0
File Size Uploaded Provenance Actions
maverick-0.8.0.tar.gz 73.8 kB Without provenance Details for maverick-0.8.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for maverick 0.8.0
File Interpreter ABI Platform Actions
maverick-0.8.0-py3-none-any.whl Python 3 none any Details for maverick-0.8.0-py3-none-any.whl

Total release size: 172.5 kB

Release files / maverick-0.8.0.tar.gz

Download URL maverick-0.8.0.tar.gz
Size 73.8 kB
Tags Source
SHA-256 checksum
How to use checksums
1f18e08122fdbbe007622216b4e3e12d5903ed9313614bbc6925e6d5628639a9
BLAKE2b-256 checksum
How to use checksums
d2c909cbdfadee16262568730c98ce9c3871165bd4781612400d1b61a2cc5558
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release files / maverick-0.8.0-py3-none-any.whl

Download URL maverick-0.8.0-py3-none-any.whl
Size 98.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c3568685f7ee78a9aa9c9b4cfd42edc261d1d1063ab859edeef2834aae751474
BLAKE2b-256 checksum
How to use checksums
cdfe2b0ba081cead5505d9d92fd9f963b000646c728eab14977d47596d72cc06
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Security for maverick 0.8.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page