题意:OpenAI gym 的自定义模式
问题背景:
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.
有人知道如何以玩家的身份运行OpenAI Gym中的一个环境吗?就像让人类玩家玩一轮倒立摆(cart pole)游戏那样?我了解到可以设置env.mode = 'human'
,但我无法让它正确运行。我已经尝试按照这里给出的示例(https://www.pinchofintelligence.com/getting-started-openai-gym/)
操作,但似乎对我不起作用。
Any help you can give would be greatly appreciated.
您提供的任何帮助都将不胜感激。
Thanks 感谢
问题解决:
I found how to enable play mode for the environments.
我发现如何为环境启用游戏模式了。
https://github.com/openai/gym/blob/master/gym/utils/play.py