Skip to content

Instantly share code, notes, and snippets.

@kartikkukreja
Last active December 6, 2015 12:28
Show Gist options
  • Save kartikkukreja/738a082ec202ec6159b9 to your computer and use it in GitHub Desktop.
Save kartikkukreja/738a082ec202ec6159b9 to your computer and use it in GitHub Desktop.
Game Interface
class Game:
def getStartState(self):
# return the start state
pass
def getNextState(self, currentState, jointMove):
# return the state achieved by playing jointMove in currentState
pass
def getRoles(self):
# return a list of roles (players) in the game
pass
def getLegalMoves(self, currentState, role):
# return a list of legal moves available for player role in currentState
def getLegalJointMoves(self, currentState):
# return a list of legal joint moves available in currentState
pass
def getGoalValues(self, currentState):
# return a list of terminal goal values, one for each player, if currentState is terminal, otherwise 0 for each player
pass
def isTerminal(self, currentState):
# returns true if the currentState is terminal, else false
pass
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment