Skip to content
New issue

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

dqn算例中reward为什么要覆写呢? #16

Closed
tsukiikekaoru opened this issue Jan 5, 2021 · 1 comment
Closed

dqn算例中reward为什么要覆写呢? #16

tsukiikekaoru opened this issue Jan 5, 2021 · 1 comment

Comments

@tsukiikekaoru
Copy link

tsukiikekaoru commented Jan 5, 2021

在dqn算例中第140行为什么要用 reward = -1 if done else 0.1重新覆写reward为1或者0.1呢?而不是用gym环境给出的reward。https://zhuanlan.zhihu.com/p/21477488 这篇文章中结构差不多,但没有覆写,而是一个新的变量reward_agent = -1 if done else 0.1,其他dqn变种的算例中也都同样如此。

@ljpzzz
Copy link
Owner

ljpzzz commented Jan 6, 2021

你好,这里可以覆写,也可以不覆写。
如果你想自己设计下这个环境的奖励函数,重新设计奖励,看看有没有效果提升,那么就可以覆写。
如果仅仅是学习,跑一下即可,那么不用覆写。

@ljpzzz ljpzzz closed this as completed Jan 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants