Skip to content

Commit

Permalink
reinforcement_learning fix reward threshold
Browse files Browse the repository at this point in the history
  • Loading branch information
pbartet authored and soumith committed Aug 15, 2017
1 parent 86bc3e5 commit 2dca104
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion reinforcement_learning/actor_critic.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ def finish_episode():
if i_episode % args.log_interval == 0:
print('Episode {}\tLast length: {:5d}\tAverage length: {:.2f}'.format(
i_episode, t, running_reward))
if running_reward > 200:
if running_reward > env.spec.reward_threshold:
print("Solved! Running reward is now {} and "
"the last episode runs to {} time steps!".format(running_reward, t))
break
2 changes: 1 addition & 1 deletion reinforcement_learning/reinforce.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def finish_episode():
if i_episode % args.log_interval == 0:
print('Episode {}\tLast length: {:5d}\tAverage length: {:.2f}'.format(
i_episode, t, running_reward))
if running_reward > 200:
if running_reward > env.spec.reward_threshold:
print("Solved! Running reward is now {} and "
"the last episode runs to {} time steps!".format(running_reward, t))
break

0 comments on commit 2dca104

Please sign in to comment.