mirror of
https://github.com/Farama-Foundation/Gymnasium.git
synced 2025-08-14 18:58:44 +00:00
Improve atari documentation through using multiple columns for the actions table (#394)
This commit is contained in:
@@ -90,7 +90,7 @@ for rom_id in tqdm(ALL_ATARI_GAMES):
|
||||
env_description = env_data["env_description"]
|
||||
if env_data["atariage_url"]:
|
||||
env_url = f"""
|
||||
For a more detailed documentation, see [the AtariAge page]({env_data['atariage_url']})
|
||||
For a more detailed documentation, see [the AtariAge page]({env_data['atariage_url']})
|
||||
"""
|
||||
else:
|
||||
env_url = ""
|
||||
@@ -101,12 +101,13 @@ for rom_id in tqdm(ALL_ATARI_GAMES):
|
||||
env_url = ""
|
||||
reward_description = ""
|
||||
|
||||
table_values = map(
|
||||
lambda s: f"`{s}`",
|
||||
itertools.chain(*zip(range(env.action_space.n), env.get_action_meanings())),
|
||||
)
|
||||
default_action_table = tabulate.tabulate(
|
||||
[
|
||||
[f"`{num}`", f"`{meaning}`"]
|
||||
for num, meaning in enumerate(env.get_action_meanings())
|
||||
],
|
||||
headers=["Value", "Meaning"],
|
||||
list(itertools.zip_longest(*([iter(table_values)] * 6), fillvalue="")),
|
||||
headers=["Value", "Meaning", "Value", "Meaning", "Value", "Meaning"],
|
||||
tablefmt="github",
|
||||
)
|
||||
if env.action_space.n == 18:
|
||||
|
Reference in New Issue
Block a user