#NEWLINE# def possibleActions( self ) : #NEWLINE# #INDENT# if self . isTerminal ( ) : #NEWLINE# #INDENT# return np . array ( [ 0 ] ) #NEWLINE# #UNINDENT# possibleActions = [ ] #NEWLINE# possibleMoves = pacman . GameState . getLegalActions ( self . game_state , agentIndex = 0 ) #NEWLINE# for a in possibleMoves : #NEWLINE# #INDENT# possibleActions . append ( self . actions . index ( a ) ) #NEWLINE# #UNINDENT# return np . array ( possibleActions )