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 onpokerkit==0.7.3(pinned). - No fork, no monkeypatch. PokerKit is built for fork-free extension
(
_begin_/_update_/_end_phase hooks, mixin-composed variants, injectablerake/divmod,ClassVarregistries). Most additions need zero core edits. compat.pypins 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.texture—BoardTexture.from_boardplusWetness,Connectivity,RankBand,StraightDraw,FlushDraw, andare_two_tone/are_monotone/are_rainbow.pokerkit_plus.combos—Nuts.from_board,CategoryCombos.from_board,HoleCombo,made_label,meets,CATEGORY_ORDER(made-hand category is pokerkit's ownLabel).pokerkit_plus.draws—Draws.from_hand(hero flush/straight draw + nut rank) and the sharedNutRank.pokerkit_plus.tags—HandTier.from_hand(made-hand tier +labels()) withPairTier/KickerTier/TwoPairTier/ThreeOfAKindTier.pokerkit_plus.outs—Outs.from_hand(category-upgrade outs, grouped).pokerkit_plus.blockers—BlockerReport.from_hand(count-based: how many of the board's nut combos a holding removes).pokerkit_plus.ranges—ComboClass/expand_range(notation),build_value_range,calculate_range_advantage(Monte-Carlo equity), andnut_advantage(exact nut-category share).pokerkit_plus.facade—HandReport.from_handandBoardReport.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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
909378824862e020168c6b6340104d49d4a9adac740059c4afc9c1de96b13906
|
|
| MD5 |
6fb70897c86159e8f651cc221cf2ceac
|
|
| BLAKE2b-256 |
a91c2e32659d09732487e368e3852b57629e13f4e26c51ec8864ae4686a23145
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
43fb9324cb22af92c52fec4476f783774a5d00b9d251ee0f4adb5bdf21e486bf
|
|
| MD5 |
44f4bd9d5e1e46e77942f7219eb92ddf
|
|
| BLAKE2b-256 |
76da29ae50801b0c4e587ffc27a02b8ee2bf7e53b8de1687e5b2826e07ba7d13
|