When running python3 -m pokemonred_puffer.train autotune, python errors with KeyError. E.g:
File "/home/ashley/GitHubProjects/pokemonred_puffer/pokemonred_puffer/train.py", line 83, in env_creator
env = wrapper_class(env, OmegaConf.create([x for x in cfg.values()][0]))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/ashley/GitHubProjects/pokemonred_puffer/pokemonred_puffer/wrappers/episode_stats.py", line 12, in __init__
self.reset()
File "/home/ashley/GitHubProjects/pokemonred_puffer/pokemonred_puffer/wrappers/episode_stats.py", line 17, in reset
return super().reset(seed=seed)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/ashley/GitHubProjects/pokemonred_puffer/.venv/lib/python3.11/site-packages/gymnasium/core.py", line 467, in reset
return self.env.reset(seed=seed, options=options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/ashley/GitHubProjects/pokemonred_puffer/pokemonred_puffer/environment.py", line 419, in reset
self.progress_reward = self.get_game_state_reward()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/ashley/GitHubProjects/pokemonred_puffer/pokemonred_puffer/rewards/baseline.py", line 377, in get_game_state_reward
"cut_tiles": self.reward_config["cut_tiles"] * sum(self.cut_tiles.values()),
~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
KeyError: 'cut_tiles'
By default autotune looks at the baseline.ObjectRewardRequiredEventsMapIds configuration, which is defined as:
baseline.ObjectRewardRequiredEventsMapIds:
reward:
a_press: 0.0 # 0.00001
badges: 3.0
bag_menu: 0.0
caught_pokemon: 2.5
valid_cut_coords: 1.5
event: .75
exploration: 0.018999755680454297
explore_hidden_objs: 0.00009999136567868017
explore_signs: 0.015025767686371013
explore_warps: 0.010135211705238394
hm_count: 7.5
invalid_cut_coords: 0.0001
level: 1.05
obtained_move_ids: 4.0
pokecenter_heal: 0.47
pokemon_menu: 0.0
required_event: 7.0
required_item: 3.0
seen_action_bag_menu: 0.0
seen_pokemon: 2.5
start_menu: 0.0
stats_menu: 0.0
use_surf: 0.4
useful_item: 0.825
safari_zone: 3.4493650422686217
Notice that cut_tiles is absent. Below is a list of all mismatched keys which are being checked for in baseline.py. I am unfamiliar with the definitions of these rewards terms, being relatively new to this project; however, putting these in the config with some sensible values (obtained from other reward configs in the YAML) resolves these issues.
Missing:
- cut_tiles
- use_ball_count
- pokeflute_tiles
- surf_tiles
When running
python3 -m pokemonred_puffer.train autotune, python errors withKeyError. E.g:By default autotune looks at the
baseline.ObjectRewardRequiredEventsMapIdsconfiguration, which is defined as:Notice that cut_tiles is absent. Below is a list of all mismatched keys which are being checked for in baseline.py. I am unfamiliar with the definitions of these rewards terms, being relatively new to this project; however, putting these in the config with some sensible values (obtained from other reward configs in the YAML) resolves these issues.
Missing: