10

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

user3704648
  • 349
  • 3
  • 14

2 Answers2

4

I was experimenting with this today, hope this helps:

env = gym.make('Breakout-v0')
gym.utils.play.play(env, zoom=3)
wmatt
  • 695
  • 2
  • 7
  • 19
3

I found how to enable play mode for the environments.

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

user3704648
  • 349
  • 3
  • 14