Skip to content

Update 强化学习极简入门下:通俗理解MDP、DP MC TC和Q学习、策略梯度、PPO.md #10

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ $`\theta \leftarrow \theta+\eta \nabla \bar{R}_{\theta}`$
> 有一点值得说明的是...,为了提高可读性,还是举个例子来说明吧。
>
> 比如到80/90后上大学时喜欢玩的另一个游戏CF(即cross fire,10多年前我在东华理工的时候也经常玩这个,另一个是DNF),虽然玩的是同一个主题比如沙漠战场,但你每场的发挥是不一样的,即便玩到同一个地方(比如A区埋雷的地方),你也可能会控制角色用不同的策略做出不同的动作,比如
>+ 在第一场游戏里面,我们在状态$`s_1`$采取动作 $`s_1`$,在状态$`s_2`$采取动作 $`a_2`$。且你在同样的状态$`s_1`$下, 不是每次都会采取动作$`a_1`$的,所以我们要记录,在状态 $`s^1_1`$ 采取 $`a^1_1`$、在状态 $`s^1_2`$采取$`a^1_1`$等,整场游戏结束以后,得到的奖励是 $`R(\tau^1)`$
>+ 在第一场游戏里面,我们在状态$`s_1`$采取动作 $`s_1`$,在状态$`s_2`$采取动作 $`a_2`$。且你在同样的状态$`s_1`$下, 不是每次都会采取动作$`a_1`$的,所以我们要记录,在状态 $`s^1_1`$ 采取 $`a^1_1`$、在状态 $`s^1_2`$采取$`a^1_2`$等,整场游戏结束以后,得到的奖励是 $`R(\tau^1)`$
>+ 在第二场游戏里面,在状态$`s^2_1`$采取$`a^2_1`$,在状态 $`s^2_2`$采取$`a^2_2`$,采样到的就是$`\tau^2`$,得到的奖励是$`R(\tau^2)`$
> 这时就可以把采样到的数据用梯度计算公式把梯度算出来
>
Expand Down