qlearningAgents.py
def update(self, state, action, nextState, reward):
        """
          The parent class calls this to observe a
          state = action => nextState and reward transition.
          You should do your Q-Value update here

          NOTE: You should never call this function,
          it will be called on your behalf
        """

        self.qValues[(state,action)] = (1-self.alpha) * self.getQValue(state,action) + self.alpha * (reward + self.discount * self.computeValueFromQValues(nextState))
        # Q(s,a) = (1-a) * Q(s,a) + a * (R + gamma * max_a_Q(s_t+1,a))

          The parent class calls this to observe a
          state = action => nextState and reward transition.
          You should do your Q-Value update here

          NOTE: You should never call this function,
          it will be called on your behalf
        
The parent class calls this to observe a
state = action => nextState and reward transition.
You should do your Q-Value update here

You should never call this function,
it will be called on your behalf
The parent class calls this to observe a state = action = > nextState and reward transition . You should do your Q - Value update here You should never call this function it will be called on your behalf
def update(self, state, action, nextState, reward):
        self.qValues[(state,action)] = (1-self.alpha) * self.getQValue(state,action) + self.alpha * (reward + self.discount * self.computeValueFromQValues(nextState))
def update ( self , state , action , nextState , reward ) : self . qValues [ ( state , action ) ] = ( 1 - self . alpha ) * self . getQValue ( state , action ) + self . alpha * ( reward + self . discount * self . computeValueFromQValues ( nextState ) )
The parent class calls this to observe a
state = action => nextState and reward transition.
The parent class calls this to observe a state = action = > nextState and reward transition .
"""
          The parent class calls this to observe a
          state = action => nextState and reward transition.
          You should do your Q-Value update here

          NOTE: You should never call this function,
          it will be called on your behalf
        """ # Q(s,a) = (1-a) * Q(s,a) + a * (R + gamma * max_a_Q(s_t+1,a))
self
state
action
nextState
reward