def update_q_table(q, pre_state, action, reward, next_state, alpha, gamma):
    '\n\n    '
    next_max = np.max(q[next_state])
    q[(pre_state, action)] = (q[(pre_state, action)] + (alpha * ((reward + (gamma * next_max)) - q[(pre_state, action)])))
def update_q_table(q, pre_state, action, reward, next_state, alpha, gamma):
    '\n\n    '
    next_max = np.max(q[next_state])
    q[(pre_state, action)] = (q[(pre_state, action)] + (alpha * ((reward + (gamma * next_max)) - q[(pre_state, action)])))