Artificial Intelligence, Data Science, Machine Learning, Reinforcement Learning, Programming.
Update the current state and episode reward state = next_state episode_reward += reward episode_length += 1 # End the episode if the environment is done if done: print('Episode {} done !!!!!!'.format(episode)) break # Calculate the discounted rewards for each step in the episode discounted_rewards