Skip to content

Instantly share code, notes, and snippets.

@WhatIThinkAbout
Last active January 7, 2023 14:21
Show Gist options
  • Select an option

  • Save WhatIThinkAbout/143fe115ffd52b4c84867901550efe81 to your computer and use it in GitHub Desktop.

Select an option

Save WhatIThinkAbout/143fe115ffd52b4c84867901550efe81 to your computer and use it in GitHub Desktop.
# initialize the environment
env.reset()
terminated = False
while not terminated:
# choose a random action
action = env.action_space.sample()
# take the action and get the information from the environment
new_state, reward, terminated, truncated, info = env.step(action)
# show the current position and reward
env.render(action=action, reward=reward)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment