wenkesj / holdem

:black_joker: OpenAI Gym No Limit Texas Hold 'em Environment for Reinforcement Learning
162 stars 62 forks source link

Minraise calculation is wrong #13

Open VinQbator opened 5 years ago

VinQbator commented 5 years ago

When two players in heads-up minraising eachother, a sequence of total betsizes with 10/25 blinds: 10-25-60-110-etc come up. Should be 10-25-50-75-100-etc.

In env.py line 207

      elif move[0] == 'raise':
        self._player_bet(self._current_player, move[1] + self._current_player.currentbet)

Should be

      elif move[0] == 'raise':
        self._player_bet(self._current_player, move[1])

You are calculating the minraise as max(self._bigblind, self._lastraise + self._tocall) which yields us the total size of the bet with all previous bet sizes accounted for. No need to add our current bet.

bdach commented 5 years ago

Yeah, after some checking your version looks correct. Do you wish to submit a PR with this fix?