mirror of
https://github.com/Farama-Foundation/Gymnasium.git
synced 2025-08-30 17:57:30 +00:00
Fix scoring when fewer episodes are provided
This commit is contained in:
@@ -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)
|
||||||
|
Reference in New Issue
Block a user