Last active
April 13, 2022 05:27
-
-
Save tt293/b7a85d362a1a8f46cfe481aa176d7849 to your computer and use it in GitHub Desktop.
Abstract GameState class
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
class GameState(ABC): | |
@abstractmethod | |
def is_terminal(self) -> bool: | |
pass | |
@abstractmethod | |
def get_payoffs(self) -> List[int]: | |
pass | |
@abstractmethod | |
def get_actions(self, player: Player) -> List[Action]: | |
pass | |
@abstractmethod | |
def handle_action(self, player: Player, action: Action) -> GameState: | |
pass | |
@abstractmethod | |
def get_active_player(self) -> Player: | |
pass | |
@abstractmethod | |
def get_index(self, player: Player) -> int: | |
pass | |
@abstractmethod | |
def get_representation(self) -> str: | |
pass |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment