project3_RL/reinforcement/valueIterationAgents.py
def computeActionFromValues(self, state):
        """
          The policy is the best action in the given state
          according to the values currently stored in self.values.

          You may break ties any way you see fit.  Note that if
          there are no legal actions, which is the case at the
          terminal state, you should return None.
        """
        "*** YOUR CODE HERE ***"
        policy = util.Counter()
        #
        for action in self.mdp.getPossibleActions(state):
            policy[action] = self.getQValue(state, action)
        return policy.argMax()

          The policy is the best action in the given state
          according to the values currently stored in self.values.

          You may break ties any way you see fit.  Note that if
          there are no legal actions, which is the case at the
          terminal state, you should return None.
        
The policy is the best action in the given state
according to the values currently stored in self.values.

You may break ties any way you see fit.  Note that if
there are no legal actions, which is the case at the
terminal state, you should return None.
The policy is the best action in the given state according to the values currently stored in self . values . You may break ties any way you see fit . Note that if there are no legal actions which is the case at the terminal state you should return None .
def computeActionFromValues(self, state):
        policy = util.Counter()
        for action in self.mdp.getPossibleActions(state):
            policy[action] = self.getQValue(state, action)
        return policy.argMax()
def computeActionFromValues ( self , state ) : "*** YOUR CODE HERE ***" policy = util . Counter ( ) for action in self . mdp . getPossibleActions ( state ) : policy [ action ] = self . getQValue ( state , action ) return policy . argMax ( )
The policy is the best action in the given state
according to the values currently stored in self.values.
The policy is the best action in the given state according to the values currently stored in self . values .
"""
          The policy is the best action in the given state
          according to the values currently stored in self.values.

          You may break ties any way you see fit.  Note that if
          there are no legal actions, which is the case at the
          terminal state, you should return None.
        """ "*** YOUR CODE HERE ***" #
self
state