Reinforcement Learning, Artificial Intelligence, Machine Learning, Data Science, Statistics.
max(Q_dict[next_state],key=Q_dict[next_state].get) #this gets the action corresponding to max q-value of next state Q_dict[curr_state][curr_action] += LR * ((reward + (GAMMA*(Q_dict[next_state][max_next]))) - Q_dict[curr_state][curr_action] ) curr_state = next_state #state(t) became state(t-1)