ygrayson / issues

A Collection of Issues to Solve
0 stars 0 forks source link

Double raise in 1 betting round #2

Open ygrayson opened 1 year ago

ygrayson commented 1 year ago

It seems like the logic of the game is not allowing double raise in 1 betting round. This would lead to an error in legal_actions:

Exception has occurred: ValueError
Action 'raise' not in legal actions: ['fold', 'call']
  File "/nfs/nhome/live/gyin/repos/poker_ai/poker_ai/games/full_deck/state.py", line 164, in apply_action
    raise ValueError(
  File "/nfs/nhome/live/gyin/repos/poker_ai/scripts/simulate.py", line 142, in simulate
    state: FullDeckPokerState = state.apply_action(action)
  File "/nfs/nhome/live/gyin/repos/poker_ai/scripts/simulate.py", line 384, in <module>
    simulate(lut_path=lut_path, agent=agent, strategy_path=strategy_path, n_players=n_players, debug_quick_start=debug_quick_start)
ValueError: Action 'raise' not in legal actions: ['fold', 'call']

Can be tested with double raise in 1 betting round.

ygrayson commented 1 year ago

Particularly, if the small blind raise on the first round, an error would occur, but it should be legal action.

ygrayson commented 1 year ago

These are define by the source code game logic - need to dig in to debug