Skip to main content

PokerKit Plus — fork-free capability extensions on top of PokerKit; a drop-in superset of pokerkit.

Project description

PokerKit Plus

Fork-free capability extensions on top of PokerKit.

pokerkit_plus is a drop-in superset of pokerkit: it re-exports the entire upstream surface unchanged and adds new capabilities on top via subclasses, free functions, and thin wrappers. The upstream package is never modified, so PokerKit Plus keeps riding upstream's maintenance (correctness fixes, new parsers, etc.).

# Anywhere you used pokerkit, you can use pokerkit_plus instead:
from pokerkit_plus import NoLimitTexasHoldem, Automation, State   # all of pokerkit
# ...plus the PokerKit Plus additions as they land.

Design

  • Form: standalone extension package, pip-depends on pokerkit==0.7.3 (pinned).
  • No fork, no monkeypatch. PokerKit is built for fork-free extension (_begin_/_update_/_end_ phase hooks, mixin-composed variants, injectable rake/divmod, ClassVar registries). Most additions need zero core edits.
  • compat.py pins the pokerkit version and is the single home for stable aliases of version-fragile upstream names.

Status

Semantic layer P0/P1 implemented (drop-in superset of pokerkit + first capabilities):

  • pokerkit_plus.textureBoardTexture.from_board plus Wetness, Connectivity, RankBand, StraightDraw, FlushDraw, and are_two_tone/are_monotone/are_rainbow.
  • pokerkit_plus.combosNuts.from_board, CategoryCombos.from_board, HoleCombo, made_label, meets, CATEGORY_ORDER (made-hand category is pokerkit's own Label).
  • pokerkit_plus.drawsDraws.from_hand (hero flush/straight draw + nut rank) and the shared NutRank.
  • pokerkit_plus.tagsHandTier.from_hand (made-hand tier + labels()) with PairTier/KickerTier/TwoPairTier/ThreeOfAKindTier.
  • pokerkit_plus.outsOuts.from_hand (category-upgrade outs, grouped).
  • pokerkit_plus.blockersBlockerReport.from_hand (count-based: how many of the board's nut combos a holding removes).
  • pokerkit_plus.rangesComboClass/expand_range (notation), build_value_range, calculate_range_advantage (Monte-Carlo equity), and nut_advantage (exact nut-category share).
  • pokerkit_plus.facadeHandReport.from_hand and BoardReport.from_board, the one-call composed entry points for callers wanting a complete reading.

Built on pokerkit's lookup-table total order (no hand-rolled scoring); every per-board / per-hand enumeration is memoized, and equity is delegated to pokerkit's Monte-Carlo sampler. Verified: mypy --strict clean, ruff clean, unit tests + doctests green, Nuts/Outs/blockers match brute-force oracles, and a 2000-hand sweep shows no is_nut/nut_rank contradictions.

Candidate capabilities (menu, not yet scheduled)

Capability Category Effort
FastState: snapshot/restore + undo for tree search performance L
Exact + deterministic equity engine with sampled-hand callbacks equity M
Range engine v2: weights, %-ranges, removal-aware combos equity M
Structured action-history & rich State view layer dev-experience M
Positions + multi-hand Table/session object dev-experience M
Bot/agent framework + baseline agents AI/bots M
Missing variants: 5/6-card PLO, Big O, Courchevel, 5-Card Draw, A-5 variants M
Mixed-game rotation (HORSE / 8-Game) variants M
Variant registry + parse-by-name + uniform create integration S
Fast lookup-table hand evaluator (5/6/7-card) performance L
Robust async multi-variant hand-history I/O integration L
State visualization & serialization (ASCII / SVG / JSON) visualization S
compat shim + Decimal/currency value type dev-experience S

Development

python3 -m venv .venv && . .venv/bin/activate
pip install -e ".[dev]"
pytest

License

MIT (same as PokerKit).

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pokerkit_plus-0.0.1.tar.gz (40.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pokerkit_plus-0.0.1-py3-none-any.whl (43.5 kB view details)

Uploaded Python 3

File details

Details for the file pokerkit_plus-0.0.1.tar.gz.

File metadata

  • Download URL: pokerkit_plus-0.0.1.tar.gz
  • Upload date:
  • Size: 40.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for pokerkit_plus-0.0.1.tar.gz
Algorithm Hash digest
SHA256 909378824862e020168c6b6340104d49d4a9adac740059c4afc9c1de96b13906
MD5 6fb70897c86159e8f651cc221cf2ceac
BLAKE2b-256 a91c2e32659d09732487e368e3852b57629e13f4e26c51ec8864ae4686a23145

See more details on using hashes here.

File details

Details for the file pokerkit_plus-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: pokerkit_plus-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 43.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for pokerkit_plus-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 43fb9324cb22af92c52fec4476f783774a5d00b9d251ee0f4adb5bdf21e486bf
MD5 44f4bd9d5e1e46e77942f7219eb92ddf
BLAKE2b-256 76da29ae50801b0c4e587ffc27a02b8ee2bf7e53b8de1687e5b2826e07ba7d13

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page