Artificial Intelligence, Machine Learning, Data Science, Reinforcement Learning, OpenAI.
probabilities action = np.random.choice(num_actions, p=action_probs[0]) # Take the chosen action and observe the next state and reward next_state, reward, done, _ = env.step(action) next_state = list(next_state) next_state[2] = 1 if next_state[2] else 0 # Store the current state, action, and reward