Skip to content

Commit 13d68c7

Browse files
Test Userclaude
andcommitted
fix(gfootball): only increment elapsed_step when episode is not done
The elapsed_step counter was always incremented even when the episode was already done (truncated/terminated). This caused the elapsed_step value in the info dict to be one higher than expected on the final step. Only increment when the episode continues. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent 6e1f5b6 commit 13d68c7

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

envpool/gfootball/gfootball_oracle_util.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -298,8 +298,8 @@ def step(
298298
self._engine.waiting_for_game_count = 0
299299
if self._step >= self._max_episode_steps:
300300
done = True
301-
302-
self._elapsed_step += 1
301+
else:
302+
self._elapsed_step += 1
303303

304304
truncated = np.bool_(done and self._step >= self._max_episode_steps)
305305
terminated = np.bool_(done and not truncated)

0 commit comments

Comments
 (0)