coursework/lab-taxi/agent.py
def step(self, state, action, reward, next_state, done):
        """ Update the agent's knowledge, using the most recently sampled tuple.

        Params
        ======
        - state: the previous state of the environment
        - action: the agent's previous choice of action
        - reward: last reward received
        - next_state: the current state of the environment
        - done: whether the episode is complete (True or False)
        """
        next_action = np.argmax(self.Q[state]) 
        self.Q[state][action] = self.Q[state][action] + (self.alpha * (reward + \
            (self.gamma * np.max(self.Q[next_state])) - self.Q[state][action]))
 Update the agent's knowledge, using the most recently sampled tuple.

        Params
        ======
        - state: the previous state of the environment
        - action: the agent's previous choice of action
        - reward: last reward received
        - next_state: the current state of the environment
        - done: whether the episode is complete (True or False)
        
Update the agent's knowledge, using the most recently sampled tuple.
Params

the previous state of the environment
action: the agent's previous choice of action
reward: last reward received
next_state: the current state of the environment
done: whether the episode is complete (True or False)
Update the agent ' s knowledge using the most recently sampled tuple . Params the previous state of the environment action : the agent ' s previous choice of action reward : last reward received next_state : the current state of the environment done : whether the episode is complete ( True or False )
def step(self, state, action, reward, next_state, done):
        next_action = np.argmax(self.Q[state]) 
        self.Q[state][action] = self.Q[state][action] + (self.alpha * (reward + \
            (self.gamma * np.max(self.Q[next_state])) - self.Q[state][action]))
def step ( self , state , action , reward , next_state , done ) : next_action = np . argmax ( self . Q [ state ] ) self . Q [ state ] [ action ] = self . Q [ state ] [ action ] + ( self . alpha * ( reward + ( self . gamma * np . max ( self . Q [ next_state ] ) ) - self . Q [ state ] [ action ] ) )
Update the agent's knowledge, using the most recently sampled tuple.
Update the agent ' s knowledge using the most recently sampled tuple .
""" Update the agent's knowledge, using the most recently sampled tuple.

        Params
        ======
        - state: the previous state of the environment
        - action: the agent's previous choice of action
        - reward: last reward received
        - next_state: the current state of the environment
        - done: whether the episode is complete (True or False)
        """
self
state
action
reward
next_state
done