Last active
January 7, 2023 14:32
-
-
Save WhatIThinkAbout/73c3b65a17ca5dfed629191fac9248ac to your computer and use it in GitHub Desktop.
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
| # run the environment, taking random actions | |
| env.reset() | |
| info = {} | |
| 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) | |
| # form an information string | |
| info_str = f"{Actions(action): <5}: {new_state} reward = {reward}" | |
| # show the current position and reward | |
| env.render(info = {'side_info': [((10,10),info_str)]}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment