def getSuccessors( self, state ):
     """ For a given state, this should return a list of triples,
     (successor, action, stepCost), where 'successor' is a
     successor to the current state, 'action' is the action
     required to get there, and 'stepCost' is the incremental
     cost of expanding to that successor """
     utils.raiseNotDefined()
示例#2
0
    def retrieve(input):
        #Use your trained hopfield network to retrieve and return a pattern based on the
        #input pattern.
        #HopfieldNotes.pdf on canvas is a good reference for asynchronous updating which
        #has generally better convergence properties than synchronous updating.
        # pattern = inputPattern

        # num_iterate = len(inputPattern)*len(inputPattern)
        # for _ in range(num_iterate) :
        # 	np.random.shuffle(v_in)

        # 	step = 0
        # 	for index in v_in:
        # 		if np.dot(self.h[index], pattern) < 0:
        # 			if pattern[index] == 1:
        # 				step += 1
        # 			pattern[index] = 0
        # 		else :
        # 			if pattern[index] == 0:
        # 				step += 1
        # 			pattern[index] = 1

        # 	if step == 0:
        # 		return pattern
        # return None

        print("TODO")
        utils.raiseNotDefined()
    def addExperience(self, experience):
        """
            Called by environment after
            observing a transition and reward

            experience should be in some format like (state, action, reward)
        """
        utils.raiseNotDefined("addExperience")
示例#4
0
  def getAction( self, gameState ):
    """
    Returns the minimax action from the current gameState using self.depth
    and self.evaluationFunction.
    """

    " *** YOUR CODE HERE ***"
    utils.raiseNotDefined()
示例#5
0
    def classify(inputPattern):
        #Classify should consider the input and classify as either, five or two
        #You will call your retrieve function passing the input
        #Compare the returned pattern to the 'perfect' instances
        #return a string classification 'five', 'two' or 'unknown'

        print("TODO")
        utils.raiseNotDefined()
def betterEvaluationFunction( currentGameState ):
  """
  Your extreme ghost-hunting, pellet-nabbing, food-gobbling, unstoppable
  evaluation function.  
  """

  " *** YOUR CODE HERE ***"
  utils.raiseNotDefined()
示例#7
0
def betterEvaluationFunction( currentGameState ):
  """
  Your extreme ghost-hunting, pellet-nabbing, food-gobbling, unstoppable
  evaluation function.  
  """

  " *** YOUR CODE HERE ***"
  utils.raiseNotDefined()
示例#8
0
 def getDistribution(self, state):
     "Returns a Counter encoding a distribution over actions from the provided state."
     utils.raiseNotDefined()
 def getDistribution(self, state):
     "Returns a Counter encoding a distribution over actions from the provided state."
     utils.raiseNotDefined()
示例#10
0
 def EndGame(self,game_state,scores):
     utils.raiseNotDefined()
     pass
示例#11
0
 def TimeOutWarning(self,runner,id):
     utils.raiseNotDefined()
     pass
 def getGoalState( self ):
     """ Returns the goal state for the search problem """
     utils.raiseNotDefined()
 def GetLegalMoves(self, state, moves):
     utils.raiseNotDefined()
 def final(self, state):
     """
       Called by environment at the end
     """
     utils.raiseNotDefined("final")
 def startEpisode(self):
     """
         Called by environment when new episode is starting
     """
     utils.raiseNotDefined("startEpisode")
示例#16
0
 def initialGameState(self):
     utils.raiseNotDefined()
     return 0
 def isGoalState( self, state ):
     """ Returns True if and only if the state is a valid goal state """
     utils.raiseNotDefined()
示例#18
0
def distort_input(instance, percent_distortion):

    #percent distortion should be a float from 0-1
    #Should return a distorted version of the instance, relative to distoriton Rate
    print("TODO")
    utils.raiseNotDefined()
 def getAction(self, state):
     """
         The Agent will receive a GameState and
         must return an action
     """
     utils.raiseNotDefined("getAction")
示例#20
0
 def generateSuccessor(self, game_state, action, agent_id):
     utils.raiseNotDefined()
     return 0
 def getCostOfActions( self, actions ):
     """ This method returns the total cost of a particular sequence
     of actions.  The sequence must be composed of legal moves """
     utils.raiseNotDefined()
 def stopEpisode(self):
     """
         Called by environment when episode is done
     """
     utils.raiseNotDefined("stopEpisode")
示例#23
0
 def getLegalActions(self, game_state, agent_id):
     utils.raiseNotDefined()
     return []
示例#24
0
 def calScore(self, game_state,agent_id):
     utils.raiseNotDefined()
     return 0
示例#25
0
 def gameEnds(self):
     utils.raiseNotDefined()
     return False
 def getAction(self, state, board):
     """
     The Agent will receive a GameState (scotlandyard.py) and
     must return an action from one of the valid actions
     """
     utils.raiseNotDefined()
示例#27
0
 def ExcuteAction(self,i,move,game_state):
     utils.raiseNotDefined()
     pass
示例#28
0
def visualizeWeight():
	#You can change these parameters if you need to
	utils.raiseNotDefined()
 def getStartState( self ):
     """ Returns the start state for the search problem """
     utils.raiseNotDefined()