uoftcprg/pokerkit

An open-source Python library for poker game simulations, hand evaluations, and statistical analysis

What it solves

PokerKit provides a standardized, reliable way to simulate poker games, evaluate hands, and perform statistical analysis across a wide variety of poker variants. It removes the need for developers to manually implement complex game logic, betting rules, and hand rankings for different versions of poker.

How it works

Written in pure Python, the library uses a unified high-level API to manage game states and automate routine actions. It allows users to create game states for specific variants (such as No-Limit Texas Hold'em, Pot-Limit Omaha, or Badugi) and programmatically handle dealings, player actions (folding, calling, raising), and board runouts. The architecture is flexible enough to allow users to define their own custom game rules and parameters.

Who it’s for

  • AI Researchers: Developers building poker AI and multi-agent systems.
  • Tool Creators: Those building poker analysis tools or calculators.
  • Casino Implementers: Developers creating online poker platforms.

Highlights

  • Broad Variant Support: Includes logic for major and minor poker variants, including Short-Deck and Lowball.
  • High Performance: Features high-speed hand evaluations.
  • Reliability: Achieves 99% code coverage through extensive unit tests, doctests, and strict static type checking.
  • Customizable: Supports flexible game states and user-defined custom games.

Related

  • Project
  • Project
  • Project
  • Project
  • Project