-
Notifications
You must be signed in to change notification settings - Fork 703
[WIP] Support bet with any amount. Set min raise to double of previous raise #265
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Changes from all commits
ee327cb
52b893c
b63b5cd
89c7f94
65d669b
8e3f6b7
1bf3169
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -125,7 +125,7 @@ def train(args): | |
parser.add_argument( | ||
'--cuda', | ||
type=str, | ||
default='', | ||
default='0', | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could you make '' as default since some users may not have GPU |
||
) | ||
parser.add_argument( | ||
'--seed', | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -163,6 +163,8 @@ def run(self, is_training=False): | |
state = self.get_state(player_id) | ||
trajectories[player_id].append(state) | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I believe we don't want to print trajectories in this method, which will affect all the games. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sure. Shld Set this to WIP! WIll resolve the status once the feature is done |
||
print(trajectories[0]) | ||
|
||
# Payoffs | ||
payoffs = self.get_payoffs() | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -113,7 +113,7 @@ def get_legal_actions(self): | |
""" | ||
return self.round.get_nolimit_legal_actions(players=self.players) | ||
|
||
def step(self, action): | ||
def step(self, action_tp): | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What is the motivation of using action_tp? What would the legal actions be with action_tp? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. action_tp (or action_tuple) [Action, amt: int] |
||
""" | ||
Get the next state | ||
|
||
|
@@ -126,7 +126,7 @@ def step(self, action): | |
(dict): next player's state | ||
(int): next player id | ||
""" | ||
|
||
action, amt = action_tp | ||
if action not in self.get_legal_actions(): | ||
print(action, self.get_legal_actions()) | ||
print(self.get_state(self.game_pointer)) | ||
|
@@ -143,7 +143,7 @@ def step(self, action): | |
self.history.append((r, b, r_c, d, p, ps)) | ||
|
||
# Then we proceed to the next round | ||
self.game_pointer = self.round.proceed_round(self.players, action) | ||
self.game_pointer = self.round.proceed_round(self.players, action_tp) | ||
|
||
players_in_bypass = [1 if player.status in (PlayerStatus.FOLDED, PlayerStatus.ALLIN) else 0 for player in self.players] | ||
if self.num_players - sum(players_in_bypass) == 1: | ||
|
@@ -206,6 +206,7 @@ def get_state(self, player_id): | |
state['current_player'] = self.game_pointer | ||
state['pot'] = self.dealer.pot | ||
state['stage'] = self.stage | ||
state['last_raise'] = self.round.last_raise | ||
return state | ||
|
||
def step_back(self): | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We you make it 4 players instead of 2?