Skip to content
Snippets Groups Projects
Commit d8e20bc0 authored by MasterScrat's avatar MasterScrat
Browse files

Fixed code examples

parent 1daa3d05
No related branches found
No related tags found
No related merge requests found
......@@ -82,7 +82,7 @@ def main(args):
number_of_agents=1, obs_builder_object=SingleAgentNavigationObs())
obs, info = env.reset()
env_renderer = RenderTool(env, gl="PILSVG")
env_renderer = RenderTool(env)
env_renderer.render_env(show=True, frames=True, show_observations=True)
for step in range(100):
action = np.argmax(obs[0]) + 1
......
......@@ -128,7 +128,7 @@ def main(args):
number_of_agents=3, obs_builder_object=custom_obs_builder)
obs, info = env.reset()
env_renderer = RenderTool(env, gl="PILSVG")
env_renderer = RenderTool(env)
# We render the initial step and show the obsered cells as colored boxes
env_renderer.render_env(show=True, frames=True, show_observations=True, show_predictions=False)
......@@ -144,6 +144,10 @@ def main(args):
if sleep_for_animation:
time.sleep(0.5)
if done["__all__"]:
print("All done!")
break
if __name__ == '__main__':
if 'argv' in globals():
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment