Skip to content

Instantly share code, notes, and snippets.

@WhatIThinkAbout
Last active January 3, 2023 18:08
Show Gist options
  • Select an option

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

Select an option

Save WhatIThinkAbout/c07f16f326198ddc1950056b95e0007e to your computer and use it in GitHub Desktop.
Test framework for BabyRobotEnv_v2
# create the environment
env = gym.make('BabyRobotEnv-v2')
# initialize the environment
env.reset()
env.render()
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