Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 515
user3704648 Avatar asked Oct 16 '17 02:10

user3704648


2 Answers

I found how to enable play mode for the environments.

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

like image 196
user3704648 Avatar answered Nov 12 '22 07:11

user3704648


I was experimenting with this today, hope this helps:

env = gym.make('Breakout-v0')
gym.utils.play.play(env, zoom=3)
like image 36
wmatt Avatar answered Nov 12 '22 08:11

wmatt