Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@Paulescu
Created March 4, 2022 10:22
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/e84a451536d0ba2bae1e6e70f7a511d2 to your computer and use it in GitHub Desktop.
Save Paulescu/e84a451536d0ba2bae1e6e70f7a511d2 to your computer and use it in GitHub Desktop.
import matplotlib.pyplot as plt
import pandas as pd
from src.loops import evaluate
# evaluate agent on 1,000 episodes
rewards, steps = evaluate(
agent, env,
n_episodes=1000,
epsilon=0.00
)
# plot results
fig, ax = plt.subplots(figsize = (10, 4))
ax.set_title("Rewards")
pd.Series(rewards).plot(kind='hist', bins=100)
plt.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment