PWhiddy / PokemonRedExperiments

Playing Pokemon Red with Reinforcement Learning

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Suggestion] Remove battle animations

JuliusBooth opened this issue · comments

Skipping battle animations would probably speed up training ~5%. There is a setting in the game to do that.

There are also a lot of animation/pokemon frame combinations that might lead to a lot of (perhaps unintentional) screen exploration reward.

@JuliusBooth Regarding your comment about animation/pokemon frame combinations that lead to extra reward.. i've removed all battles from rewards and see promising results. It doesn't address the in-game setting, but it's a good idea.

...
        # The screen transitions (prior to battle) seem to be encouraging
        # it to go into battle more often. 0xd057 is non-zero when in battle
        # (and during transitions).
        battle_indicator = self.read_m(0xD057)
...
        if battle_indicator == 0:
            if self.use_screen_explore:
                self.update_frame_knn_index(obs_flat)
            else:
                self.update_seen_coords(location=location)
...