openai / gym

A toolkit for developing and comparing reinforcement learning algorithms.
https://www.gymlibrary.dev
Other
34.2k stars 8.58k forks source link

[Question] How do games with movement limited to cardinal directions handle diagonal actions? #3237

Open azr120 opened 11 months ago

azr120 commented 11 months ago

My question mainly concerns grid-like games such as Pacman. I've seen in the documentation for Ms Pacman's reduced moves that diagonal movements (UPRIGHT, UPLEFT, DOWNRIGHT, DOWNLEFT) are considered as meaningful moves. But how is it determined which part of the diagonal movement will happen first? Is its nature deterministic?

However in other games such as Alien, you cannot reduce the moves to a meaningful subset. How can you distinguish whether diagonal moves are meaningful and their behaviour?

Is diagonal movement behaviour consistent between different games of the same format?

Thanks

pseudo-rnd-thoughts commented 11 months ago

The Atari implementation code is done completely in a separate repo, ale-py, I suggest looking at their source code / documentation to find that out

athy125 commented 10 months ago

Basically the the order of diagonal movement is designed by developers and can be predictable. Diagonal moves are often valuable for efficient navigation. Now the more intricate games like Alien, the significance of diagonal movement may be less clear. The behavior of diagonal movement isn't consistent across games due to tailored mechanics that suit each game's unique design.