All notable changes to this project will be documented in this file.
Added
- Analysis module
- Range parser
pokerkit.analysis.parse_range
(e.g."AKs,T8o-KJo,6h5h,A2+"
). - Equity calculator
pokerkit.analysis.calculate_equities
. - Hand strength calculator
pokerkit.analysis.calculate_hand_strength
. - Player statistics
pokerkit.analysis.Statistics
.
- Range parser
Changed
- Renamed
pokerkit.state.State.all_in_show_status
topokerkit.state.State.all_in_status
.
Added
pokerkit.state.State.reserved_cards
pokerkit.state.State.cards_in_play
pokerkit.state.State.cards_not_in_play
Removed
- Remove non-compliant action notation
pn sm -
for showing hole cards.
Added
- Commentary for state actions.
- User-defined field support for PHH.
- PHH to ACPC protocol converter
Added
- Deuce-to-seven badugi hand lookup/evaluator.
Added
pokerkit.state.State.pot_amounts
for iterating through main/side pot amounts.
Changed
- Forbid showdown without specifying cards if unknown hole cards are dealt.
Changed
- New field
rake
forpokerkit.notation.HandHistory
when constructing games/states.
Changed
- New action notation
pn sm -
for showing hole cards. pokerkit.notation.HandHistory.iter_state_actions
for iterating through states with actions.
Changed
- If there are multiple pots (main + side),
pokerkit.state.State.push_chips
must be called multiple times. - Custom automations are passed through the constructor for
pokerkit.notation.HandHistory
. - Support rakes.
Changed
- Collapse pots (main + side) that have the same players in the
pokerkit.state.State.pots
property. - Allow default automations to be overridden in
pokerkit.notation.HandHistory.create_game
andpokerkit.notation.HandHistory.create_game
.
Changed
- Fix incorrect type annotation for class attribute
optional_field_names
inoptional_field_names
in``pokerkit.notation.HandHistory``. - Operation queries also catch
UserWarning
.
Added
- Add class attributes
game_field_names
andignored_field_names
topokerkit.notation.HandHistory
.
Changed
- Remove class attributes
game_field_names
andignored_field_names
frompokerkit.notation.HandHistory
Added
- The new .phh optional fields:
time_zone
Added
- New .phh optional fields:
time
,time_limit
,time_banks
,level
.
Added
- New .phh optional fields:
url
,city
,region
,postal_code
,country
.
Changed
ante_trimming_status
is now an optional field for .phh files.
Changed
- When not enough cards to deal everybody's hole cards, a board dealing is done.
- Showdown can specify what cards the player showed.
- More generous state operations when it comes to cards. Some things that were errors are now warnings.
- When all-in, cards are shown via
show_or_muck_hole_cards
. None
is no longerValuesLike
orCardsLike
.
Added
- Cards with unknown rank or suit.
float
compatibility (without static typing support).- Poker action notation support.
- Poker hand history file format (.phh) support.
Changed
- When saving state configuration,
player_count
is not saved.
Added
- Allow state configuration to be saved.
Changed
- Call
unittest.main
in unit test files when executed as__main__
. - Move the
automations
parameter to be the first parameter ofpokerkit.state.State
.
Changed
- Make
pokerkit.state.Operation
available aspokerkit.Operation
by importing it inpokerkit.__init__
.
Changed
- Limit the maximum number of completions, bets, or raises to 4 in the pre-configured Fixed-limit deuce-to-seven triple draw and Fixed-limit badugi variants.
- Flip antes just like blinds during heads-up play (in the case of big blind antes).
- Also reshuffle all discarded cards (including from the current draw round) along with mucked and burned cards when the deck runs out. Previously, discarded cards from the same draw round was excluded.
- Rename
pokerkit.state.State.verify_card_availability_making
topokerkit.state.State.verify_cards_availability_making
.
Added
- Add more unit tests and doctests to achieve 99% code coverage.
Bugfixes
- Fix
AssertionError
being raised in certain scenarios after discards are made when the state was configured to automatically deal with hole cards.
Changed
- When the dealer deals hole cards after standing pat or discarding, an explicit
ValueError
is raised unless every player has stood pat or discarded.
Added
pokerkit.state.Operation
abstract base class for all operation classes.pokerkit.utilities.shuffled
helper function.pokerkit.state.State.discarded_cards
to keep track of discarded cards.pokerkit.state.State.street_count
property.pokerkit.state.State.street_indices
property.
Changed
pokerkit.state.State
now also acceptspokerkit.utilities.ValuesLike
instances as arguments for various parameters.pokerkit.state.State
requiresplayer_count
argument to be passed during initialization.- Various operation classes such as
pokerkit.state.State.AntePosting
moved topokerkit.state
and is no longer a nested class ofpokerkit.state.State
. - Renamed
pokerkit.lookups.RegularLowLookup
topokerkit.lookups.RegularLookup
for enhanced consistency. - Renamed
pokerkit.state.State.burned_cards
topokerkit.state.State.burn_cards
. - Renamed
pokerkit.state.State.verify_card_availabilities
topokerkit.state.State.verify_card_availability_making
. - Changed the property
pokerkit.state.State.available_cards
to methodpokerkit.state.State.get_available_cards
. - Cards can be dealt from the mucked cards or burn cards if the deck is empty.
- Warning is printed if cards are dealt from burn cards without any good reason.
Added
- Introduce
pokerkit.utilities.CardsLike
andpokerkit.utilities.ValuesLike
type aliases to simplify type annotations of various methods.
Changed
- Modify the methods that only accept an iterable of
Card
so they can accept any card-like object. - Make the protected attributes of the instances of the
Hand
type and its descendants public. - Move
pokerkit.state.State._clean_cards
andpokerkit.games.Game._clean_values
topokerkit.utilities
.
Initial Release