-
Notifications
You must be signed in to change notification settings - Fork 61
Open
Description
Hi @AussieSeaweed, thanks for the great project!
I noticed one thing - in No-Limit Hold'em, min_completion_betting_or_raising_to_amount currently returns the effective stack of the opponent when the strict minimum raise amount would exceed that stack.
This seem to deviate from standard Poker rules - a player should be required to post the full minimum raise amount, after which the opponent goes all-in, and the excess is returned as an uncalled bet.
Reproduction script
from pokerkit import Automation, Mode, NoLimitTexasHoldem
# Scenario: Heads-Up Cash Game
# P0 (BB, Short Stack): 200 chips
# P1 (SB, Deep Stack): 1000 chips
# Blinds: 10/20
state = NoLimitTexasHoldem.create_state(
automations=(
Automation.BLIND_OR_STRADDLE_POSTING,
),
ante_trimming_status=True,
raw_antes=0,
raw_blinds_or_straddles=(10, 20),
min_bet=20,
raw_starting_stacks=(200, 1000),
player_count=2,
mode=Mode.CASH_GAME,
)
state.deal_hole('7h2c') # P0
state.deal_hole('AcKd') # P1
# 1. P1 (SB) raises to 100.
state.complete_bet_or_raise_to(100)
# 2. P0 (BB) raises to 180 (Leaves 20 chips behind).
state.complete_bet_or_raise_to(180)
# 3. P1 (Deep) to act.
# Current Bet: 180.
# Last Raise Increment: 80 (180 - 100).
# Procedural Minimum Raise To: 180 + 80 = 260.
# P0 Total Stack Cap: 200.
print(f"PokerKit Min Raise: {state.min_completion_betting_or_raising_to_amount}")
# Actual Output: 200
# Expected Output (Procedural): 260Expected Behavior
min_completion_betting_or_raising_to_amount should return the strict procedural minimum (260 in this case), capped only by the actor's stack, it should not be capped by the opponent's stack.
Metadata
Metadata
Assignees
Labels
No labels