Skip to content

Commit

Permalink
only add framestack body if framestack > 1 (#245)
Browse files Browse the repository at this point in the history
* only add framestack body if framestack > 1

* print out python location for debugging

* add import roms to github workflow

* fix workflow

* debug

* pls work

* more contrived script to get ALE roms
  • Loading branch information
cpnota committed May 28, 2021
1 parent 480071a commit 4bef9a1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ jobs:
pip install torch==1.8.0+cpu -f https://download.pytorch.org/whl/torch_stable.html
make install
AutoROM -v
python -m atari_py.import_roms $(python -c 'import site; print(site.getsitepackages()[0])')/multi_agent_ale_py/ROM
- name: Lint code
run: |
make lint
Expand Down
3 changes: 2 additions & 1 deletion all/bodies/atari.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@

class DeepmindAtariBody(Body):
def __init__(self, agent, lazy_frames=False, episodic_lives=True, frame_stack=4, clip_rewards=True):
agent = FrameStack(agent, lazy=lazy_frames, size=frame_stack)
if frame_stack > 1:
agent = FrameStack(agent, lazy=lazy_frames, size=frame_stack)
if clip_rewards:
agent = ClipRewards(agent)
if episodic_lives:
Expand Down

0 comments on commit 4bef9a1

Please sign in to comment.