Fix scoring when fewer episodes are provided

This commit is contained in:
Greg Brockman
2016-09-23 01:47:10 -07:00
parent 934b2acbb7
commit 2b3f965faa

View File

@@ -75,7 +75,7 @@ class ClipTo01ThenAverage(object):
clipped = np.clip((reward - floor) / (ceiling - floor), 0, 1) clipped = np.clip((reward - floor) / (ceiling - floor), 0, 1)
# Take the mean rescaled score # Take the mean rescaled score
score = np.mean(clipped) score = np.sum(clipped) / self.num_episodes
scores.append(score) scores.append(score)
# Record the list of solved episodes # Record the list of solved episodes
solves.append(solved) solves.append(solved)