Created
May 17, 2020 14:37
-
-
Save tt293/666abaec03b951b1d3cff7f4371a1c18 to your computer and use it in GitHub Desktop.
Leduc InformationSet representation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def get_representation(self) -> str: | |
player_index = self.get_index(self.get_active_player()) | |
player_card_rank = self.deck[player_index][0] | |
actions_as_string = "/".join([str(x) for x in self.history]) | |
if self.round == Round.pre_flop: | |
community_card_rank = '' | |
else: | |
community_card_rank = self.deck[-1][0] | |
return f'{player_card_rank}/{community_card_rank}-{actions_as_string}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment