rlcard
rlcard copied to clipboard
Question about legal actions of NL texas holdem
Hi, while looking through the nolimitholdem code, I found some lines that are not fully understood.
Here it says that when the raise amount is smaller than the "pot", we can't raise with the amount of half pot. But I think the raise amount must not be smaller than the "max raise", not "pot". So I think the block of code should change like below.
# Can't raise if the raise is smaller than max raise
if Action.Raise_HALF_POT in full_actions and \
int(self.dealer.pot / 2) + self.raised[self.game_pointer] <= max(self.raised)
Also here it says that player cannot raise if it has no more chips after call. I catch it, but the code is not so clear. Maybe the code should be like below.
# If the current player has no more chips after call, we cannot raise
diff = max(self.raised) - self.raised[self.game_pointer]
if diff > 0 and diff >= player.remained_chips:
return [Action.FOLD, Action.CALL]
I'm not so sure above fixes are valid because I have a little knowledge in holdem rules. But it would be thankful if you can check them.
@daochenzha This impacts something we're working on when you get a chance
@jkterry1 @SonSang Thanks for posting this. @ruzhwei will take a look and work on this.
@ruzhwei I'm just following up on this since it's been a week since you were assigned and 18 days since we inquired :)
@SonSang @jkterry1 Sorry for waiting so long. I was busy with traveling to the US and settling down in the past weeks. I am also not very sure about the rules, so it takes time for me to check on this. To my knowledge, your fix is reasonable. Thank you for pointing this out. You can submit a PR on this and also the ACPC standards.