Last active
January 3, 2023 18:08
-
-
Save WhatIThinkAbout/c07f16f326198ddc1950056b95e0007e to your computer and use it in GitHub Desktop.
Test framework for BabyRobotEnv_v2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 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