def METHOD_NAME(
    self, prev_state: str, state: str, action: Action, reward
):
    """
    Performs the qlearning algorithm
    """
    self.Qs[prev_state][action] = (1.0 - self.learning_rate) * self.Qs[
        prev_state
    ][action] + self.learning_rate * (
        reward + self.discount_rate * self.Vs[state]
    )
    self.Vs[prev_state] = max(self.Qs[prev_state].values())