Skip to content

Commit

Permalink
fix call to learn in main
Browse files Browse the repository at this point in the history
  • Loading branch information
philtabor committed Nov 29, 2021
1 parent f8a3b44 commit 4f95897
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

best_score = env.reward_range[0]
score_history = []
load_checkpoint = False
load_checkpoint = False

if load_checkpoint:
agent.load_models()
Expand All @@ -32,7 +32,7 @@
observation_, reward, done, info = env.step(action)
score += reward
if not load_checkpoint:
agent.learn(observation, action, reward, observation_, done)
agent.learn(observation, reward, observation_, done)
observation = observation_
score_history.append(score)
avg_score = np.mean(score_history[-100:])
Expand All @@ -47,4 +47,3 @@
if not load_checkpoint:
x = [i+1 for i in range(n_games)]
plot_learning_curve(x, score_history, figure_file)

0 comments on commit 4f95897

Please sign in to comment.