Skip to content

Commit f6ff13a

Browse files
authored
AddReward before EpisodeEnd (#4064)
Changed order of AddReward() and EpisodeEnd() in the Rewards example.
1 parent b6f72c1 commit f6ff13a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/Learning-Environment-Design-Agents.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -742,8 +742,8 @@ if (gameObject.transform.position.y < 0.0f ||
742742
Mathf.Abs(gameObject.transform.position.x - area.transform.position.x) > 8f ||
743743
Mathf.Abs(gameObject.transform.position.z + 5 - area.transform.position.z) > 8)
744744
{
745-
EndEpisode();
746745
AddReward(-1f);
746+
EndEpisode();
747747
}
748748
```
749749

0 commit comments

Comments
 (0)