Farama-Foundation / Farama-Foundation/Arcade-Learning-Environment

Pitfall does not terminate after timer runs out

Open
#654 7 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
2.5k
Forks
477
Avg merge
11h 11m
Merged PRs (30d)
3

Description

In the description of [Pitfall](https://ale.farama.org/environments/pitfall/) it says
> The game is over if you collect all the treasures or if you die or if the time runs out.

However the environment does not terminate when the timer runs out. The player is simply unable to move but the environment keeps running.
The commonly used truncation limit for training atari games of 30 minutes is longer than the 20 minute timer. Which can lead to a lot of wasted transitions in a state of the game where the agent can no longer perform any action if the timer ran out.
I could of course change the truncation to accommodate this, but the timer running out should be a termination not a truncation as the agent can no longer collect any rewards after.
Is there some easy way for me to fix this in a fork of ALE? I could create a wrapper that counts the frames and terminates after 20 minutes but I'd prefer to fix this in the specific game itself somehow.
In the long term It might be worth considering changing this in ALE. As termination on timeout seems to be the intended behavior.

Contributor guide

Open the contributing guide

Research direction

Start with the Pitfall environment implementation and compare its timer behavior with the game description linked in the issue. Trace how the environment reports termination when the timer expires, then check the existing Pitfall-related tests or Atari environment tests. Done means the timeout ends the episode as termination rather than leaving the player unable to act.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
game-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.