Show confidence-ellipsoid for supported envs
This commit is contained in:
parent
49f9acff3e
commit
9133ecd61b
@ -28,6 +28,8 @@ def main(load_path, n_eval_episodes=0):
|
|||||||
|
|
||||||
model = PPO.load(load_path, env=env)
|
model = PPO.load(load_path, env=env)
|
||||||
|
|
||||||
|
show_chol = env_name.startswith('Columbus')
|
||||||
|
|
||||||
if n_eval_episodes:
|
if n_eval_episodes:
|
||||||
mean_reward, std_reward = evaluate_policy(
|
mean_reward, std_reward = evaluate_policy(
|
||||||
model, env, n_eval_episodes=n_eval_episodes, deterministic=False)
|
model, env, n_eval_episodes=n_eval_episodes, deterministic=False)
|
||||||
@ -41,7 +43,10 @@ def main(load_path, n_eval_episodes=0):
|
|||||||
time.sleep(1/30)
|
time.sleep(1/30)
|
||||||
action, _ = model.predict(obs, deterministic=False)
|
action, _ = model.predict(obs, deterministic=False)
|
||||||
obs, reward, done, info = env.step(action)
|
obs, reward, done, info = env.step(action)
|
||||||
env.render()
|
if show_chol:
|
||||||
|
env.render(chol=model.policy.chol)
|
||||||
|
else:
|
||||||
|
env.render()
|
||||||
episode_reward += reward
|
episode_reward += reward
|
||||||
if done:
|
if done:
|
||||||
episode_reward = 0.0
|
episode_reward = 0.0
|
||||||
|
Loading…
Reference in New Issue
Block a user