How Does The Q Learning Algorithm Work