Skip to content

Instantly share code, notes, and snippets.

@Paulescu
Created May 5, 2022 07:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Paulescu/2f194cbc3f3267c19886b3b793a1db9d to your computer and use it in GitHub Desktop.
Save Paulescu/2f194cbc3f3267c19886b3b793a1db9d to your computer and use it in GitHub Desktop.
# evalute on 100 episodes
rewards, success = agent.evaluate(n_episodes=100)
# print results
import numpy as np
reward_avg = np.array(rewards).mean()
reward_std = np.array(rewards).std()
print(f'Reward average {reward_avg:.2f}, std {reward_std:.2f}')
success_rate = np.array(success).mean()
print(f'Succes rate = {success_rate:.2%}')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment