This commit is contained in:
2025-12-03 17:49:29 +08:00
parent 8e4be3bda2
commit c2d534c4f7
5 changed files with 110 additions and 46 deletions

View File

@@ -3,11 +3,10 @@ class KuhnPoker:
self.cards = ['J', 'Q', 'K']
self.actions = [0, 1] # Check/Fold=0, Bet/Call=1
# 结构是不是要修改下?
def is_terminal(self, history):
return history in ['00', '10', '010', '011', '11']
def get_profit(self, cards, history, player):
def get_util(self, cards, history, player):
if not self.is_terminal(history):
return 0.0
@@ -42,7 +41,7 @@ class KuhnPoker:
return 0.0
def get_Info_set(self, card, history, player):
def get_Info_set(self, card, history):
return f"{card}.{history}"
def get_cur_player(self, history):