Skip to content

Commit

Permalink
change card types
Browse files Browse the repository at this point in the history
  • Loading branch information
LucasColas committed Sep 7, 2023
1 parent 629f575 commit 238e791
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion PokerPlus/DeepCFR/deep_cfr.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def deep_cfr(
nb_game_tree_traversals: int = 200,
game: TexasHoldEm = None,
n_actions: int = 3,
n_card_types: int = 4,
n_card_types: int = 52,
n_bets: int = 20,
):
"""
Expand Down
5 changes: 4 additions & 1 deletion PokerPlus/DeepCFR/nn.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,11 @@ def forward(self, cards, bets):
print("do embedding")
print("card_group: ", card_group)
if card_group.numel():
card_embs.append(embedding(card_group.view(1, -1)))
card_embs.append(embedding(card_group.view(-1, 1)))

card_embs = torch.cat(card_embs, dim=1)

print("cards embs shape : ", card_embs.shape)
x = F.relu(self.card1(card_embs))
x = F.relu(self.card2(x))
x = F.relu(self.card3(x))
Expand Down

0 comments on commit 238e791

Please sign in to comment.