From 65af1c12d8a3ad0d02a11e69ad5e358298fc4d48 Mon Sep 17 00:00:00 2001 From: Zheng Xu <54763178+juexingyezuile@users.noreply.github.com> Date: Thu, 22 Aug 2024 11:32:16 +0800 Subject: [PATCH] fix bug: doudizhu env seen_cards --- rlcard/games/doudizhu/round.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rlcard/games/doudizhu/round.py b/rlcard/games/doudizhu/round.py index 8682d914f..efddf97bc 100644 --- a/rlcard/games/doudizhu/round.py +++ b/rlcard/games/doudizhu/round.py @@ -60,7 +60,7 @@ def update_public(self, action): for c in action: self.played_cards[self.current_player][CARD_RANK_STR_INDEX[c]] += 1 if self.current_player == 0 and c in self.seen_cards: - self.seen_cards = self.seen_cards.replace(c, '') + self.seen_cards = self.seen_cards.replace(c, '', 1) self.public['seen_cards'] = self.seen_cards self.public['played_cards'] = self.cards_ndarray_to_str(self.played_cards)