コード例 #1
0
 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()
コード例 #3
0
    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
ファイル: agents.py プロジェクト: quentinDERORY/ENSICAEN
  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()
コード例 #6
0
def betterEvaluationFunction( currentGameState ):
  """
  Your extreme ghost-hunting, pellet-nabbing, food-gobbling, unstoppable
  evaluation function.  
  """

  " *** YOUR CODE HERE ***"
  utils.raiseNotDefined()
コード例 #7
0
ファイル: agents.py プロジェクト: quentinDERORY/ENSICAEN
def betterEvaluationFunction( currentGameState ):
  """
  Your extreme ghost-hunting, pellet-nabbing, food-gobbling, unstoppable
  evaluation function.  
  """

  " *** YOUR CODE HERE ***"
  utils.raiseNotDefined()
コード例 #8
0
ファイル: ghostAgents.py プロジェクト: quentinDERORY/ENSICAEN
 def getDistribution(self, state):
     "Returns a Counter encoding a distribution over actions from the provided state."
     utils.raiseNotDefined()
コード例 #9
0
 def getDistribution(self, state):
     "Returns a Counter encoding a distribution over actions from the provided state."
     utils.raiseNotDefined()
コード例 #10
0
ファイル: template.py プロジェクト: COMP90054/sequence
 def EndGame(self,game_state,scores):
     utils.raiseNotDefined()
     pass
コード例 #11
0
ファイル: template.py プロジェクト: COMP90054/sequence
 def TimeOutWarning(self,runner,id):
     utils.raiseNotDefined()
     pass
コード例 #12
0
 def getGoalState( self ):
     """ Returns the goal state for the search problem """
     utils.raiseNotDefined()
コード例 #13
0
 def GetLegalMoves(self, state, moves):
     utils.raiseNotDefined()
コード例 #14
0
 def final(self, state):
     """
       Called by environment at the end
     """
     utils.raiseNotDefined("final")
コード例 #15
0
 def startEpisode(self):
     """
         Called by environment when new episode is starting
     """
     utils.raiseNotDefined("startEpisode")
コード例 #16
0
ファイル: template.py プロジェクト: COMP90054/sequence
 def initialGameState(self):
     utils.raiseNotDefined()
     return 0
コード例 #17
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()
コード例 #19
0
 def getAction(self, state):
     """
         The Agent will receive a GameState and
         must return an action
     """
     utils.raiseNotDefined("getAction")
コード例 #20
0
ファイル: template.py プロジェクト: COMP90054/sequence
 def generateSuccessor(self, game_state, action, agent_id):
     utils.raiseNotDefined()
     return 0
コード例 #21
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()
コード例 #22
0
 def stopEpisode(self):
     """
         Called by environment when episode is done
     """
     utils.raiseNotDefined("stopEpisode")
コード例 #23
0
ファイル: template.py プロジェクト: COMP90054/sequence
 def getLegalActions(self, game_state, agent_id):
     utils.raiseNotDefined()
     return []
コード例 #24
0
ファイル: template.py プロジェクト: COMP90054/sequence
 def calScore(self, game_state,agent_id):
     utils.raiseNotDefined()
     return 0
コード例 #25
0
ファイル: template.py プロジェクト: COMP90054/sequence
 def gameEnds(self):
     utils.raiseNotDefined()
     return False
コード例 #26
0
 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
ファイル: template.py プロジェクト: COMP90054/sequence
 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()
コード例 #29
0
 def getStartState( self ):
     """ Returns the start state for the search problem """
     utils.raiseNotDefined()