Search code examples
pythonmachine-learningreinforcement-learningopenai-gymopenair

OpenAI gym player mode


Does anyone know how to run one of the OpenAI gym environments as a player. As in letting a human player play a round of cart pole? I have seen that there is env.mode = 'human' but I have not been able to get it to run properly. I have tried to follow the example given here https://www.pinchofintelligence.com/getting-started-openai-gym/ but it doesn't seem to work for me.

Any help you can give would be greatly appreciated.

Thanks


Solution

  • I found how to enable play mode for the environments.

    https://github.com/openai/gym/blob/master/gym/utils/play.py