Farama-Foundation / PettingZoo

An API standard for multi-agent reinforcement learning environments, with popular reference environments and related utilities
https://pettingzoo.farama.org
Other
2.62k stars 413 forks source link

[Question] how does pettingzoo dealing with serve-time on envs like pong, tennis and so on. #740

Closed QYHcrossover closed 2 years ago

QYHcrossover commented 2 years ago

Question

Hello, I am practising rl methods on competive atari games like pong, tennis or double dunk using gym and pettingzoo. I founded that in some cases the agents for serving tend to slack off at the beginning of a run due to acting illegal actions, pausing the game until the end of max episode length.

I also noticed in such cases pettingzoo env may get the serves's time and punish this behaviour if timeout. But i haven't find the relative code for dealing with this. I want to know when my agents act as serves, and is there an interface for this? And for gym can I follow this idea and write some env wrappers on gym?

benblack769 commented 2 years ago

The relevant code is in this folder, https://github.com/Farama-Foundation/Multi-Agent-ALE/tree/master/src/games/supported

For example, in Pong, the code is here https://github.com/Farama-Foundation/Multi-Agent-ALE/blob/master/src/games/supported/Pong.cpp#L45