openai / retro

Retro Games in Gym
MIT License
3.39k stars 526 forks source link

Where is the action for 'Higher Jump'? #210

Closed squishytofu042 closed 4 years ago

squishytofu042 commented 4 years ago

In many games, there are controls such as:

B: Jump B (hold): Higher Jump

However, when looking at retro/cores/snes9x.json, there is no control for B (hold).

I tested this in a game by changing "actions": [ [[], ["UP"], ["DOWN"]], [[], ["LEFT"], ["RIGHT"]], [[], ["A"], ["B"], ["X"], ["Y"], ["A", "B"], ["B", "Y"], ["Y", "X"], ["X", "A"], ["A", "B", "Y"], ["B", "Y", "X"], ["Y", "X", "A"], ["A", "B", "Y", "X"]], [[], ["L"], ["R"], ["L", "R"]] ]

to "actions": [ [[], ["B"]] ]

and sure enough, the agent doesn't ever High Jump. Is there a solution to work around this? The reason my agent gets stuck in a specific location is because he can't jump over it because he doesn't know how to.

endrift commented 4 years ago

"B (hold)" isn't a button. It's just keeping B as the action for enough frames in a row.

squishytofu042 commented 4 years ago

Ah, that makes sense, thanks!

kalashnikovisme commented 2 years ago

@endrift Hi, as you say holding as the action for enough frames in a row. How can I make enough frames? With repeating B?