Skip to content

Commit

Permalink
pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
pseudo-rnd-thoughts committed Jan 9, 2025
1 parent 7e744e5 commit b26a69d
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
3 changes: 2 additions & 1 deletion docs/_scripts/gen_environments_md.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ def shortened_repr(values):

env = gymnasium.make(f"ALE/{env_name}-v5").unwrapped

general_info_table = tabulate.tabulate([
general_info_table = tabulate.tabulate(
[
["Make", f'gymnasium.make("ALE/{env_name}-v5")'],
["Action Space", str(env.action_space)],
["Observation Space", str(env.observation_space)],
Expand Down
2 changes: 1 addition & 1 deletion docs/environments/riverraid.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ See variants section for the type of observation used by each environment id by

### Reward

Score points are your only reward. You get score points each time you destroy an enemy object:
Score points are your only reward. You get score points each time you destroy an enemy object:

| Enemy Object | Score Points |
|--------------|--------------|
Expand Down
4 changes: 1 addition & 3 deletions src/ale/python/registration.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

from __future__ import annotations

from collections import defaultdict

import ale_py.roms as roms
import gymnasium

Expand All @@ -16,7 +14,7 @@ def rom_id_to_name(rom: str) -> str:
def register_envs():
"""Register all the Atari Environments."""
all_rom_ids = roms.get_all_rom_ids()
# These environments all don't have a single agent implementation
# These environments all don't have a single agent implementation therefore are removed
all_rom_ids.remove("warlords")
all_rom_ids.remove("maze_craze")
all_rom_ids.remove("joust")
Expand Down
8 changes: 6 additions & 2 deletions tests/python/test_atari_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,13 @@ def test_roms_register():

registered_v5_roms = list(filter(lambda env_id: "v5" in env_id, registered_roms))
assert len(registered_v5_roms) == 104
registered_noframeskip_v4_roms = list(filter(lambda env_id: "NoFrameskip-v4" in env_id, registered_roms))
registered_noframeskip_v4_roms = list(
filter(lambda env_id: "NoFrameskip-v4" in env_id, registered_roms)
)
assert len(registered_noframeskip_v4_roms) == 104
assert len(registered_roms) == len(registered_v5_roms) + len(registered_noframeskip_v4_roms)
assert len(registered_roms) == len(registered_v5_roms) + len(
registered_noframeskip_v4_roms
)


@pytest.mark.parametrize(
Expand Down

0 comments on commit b26a69d

Please sign in to comment.