We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
0.26.0以上版本的gym对一些函数做出了改动,这一点在 #50 有被提到过,并给出了修改方法:
# env.seed(0)
env.reset(seed=0)
state = env.reset()
state = state[0]
next_state, reward, done, _ = env.step(action)
, _
Originally posted by @wulidede in #50 (comment)
注意到env.reset()除了在定义环境的时候使用过,在训练过程中也有所涉及,因此第7、8、9章代码的训练部分,以及rl_utils.py中的对应部分也要改为env.reset(seed=0)。修改后,在CartPole-v0环境中的训练结果更好,且结果固定。如图:
env.reset()
rl_utils.py
The text was updated successfully, but these errors were encountered:
No branches or pull requests
0.26.0以上版本的gym对一些函数做出了改动,这一点在 #50 有被提到过,并给出了修改方法:
# env.seed(0)
改为env.reset(seed=0)
state = env.reset()
下一行添加一行state = state[0]
next_state, reward, done, _ = env.step(action)
等号左边添加一个, _
,即新版函数增加了一个输出Originally posted by @wulidede in #50 (comment)
注意到
env.reset()
除了在定义环境的时候使用过,在训练过程中也有所涉及,因此第7、8、9章代码的训练部分,以及rl_utils.py
中的对应部分也要改为env.reset(seed=0)
。修改后,在CartPole-v0环境中的训练结果更好,且结果固定。如图:The text was updated successfully, but these errors were encountered: