Skip to content

Commit

Permalink
Update codes
Browse files Browse the repository at this point in the history
  • Loading branch information
ZhiqingXiao committed Nov 5, 2023
1 parent 8d9fff3 commit 51db0b3
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions zh2023/errata/202307.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,30 @@ $\rho_{t+1:t+n-1}=\frac{\Pr_\pi\left[R_{t+1},\mathsfit{S}_{t+1},\mathsfit{A}_{t+

$\rho_{t+1:t+n-1}=\frac{\Pr_\pi\left[R_{t+1},\mathsfit{S}_{t+1},\mathsfit{A}_{t+1},\ldots,\mathsfit{S}_{t+n}\mid\mathsfit{S}_t,\mathsfit{A}_t\right]}{\Pr_b\left[R_{t+1},\mathsfit{S}_{t+1},\mathsfit{A}_{t+1},\ldots,\mathsfit{S}_{t+n}\mid\mathsfit{S}_t,\mathsfit{A}_t\right]}=\prod\limits_{\tau=t+1}^{t+n-1}{\frac{\pi\left(\mathsfit{A}_\tau\mid\mathsfit{S}_\tau\right)}{b\left(\mathsfit{A}_\tau\mid\mathsfit{S}_\tau\right)}}$


## 第288页代码10-2里的`step()`函数

#### 改为

```python
def step(self, observation, reward, terminated):
x, y, v_x, v_y, angle, v_angle, contact_left, \
contact_right = observation

if contact_left or contact_right:
# legs have contact
f_y = -10. * v_y - 1.
f_angle = 0.
else:
f_y = 5.5 * np.abs(x) - 10. * y - 10. * v_y - 1.
f_angle = -np.clip(5. * x + 10. * v_x, -4, 4
) + 10. * angle + 20. * v_angle

action = np.array([f_y, f_angle])
return action
```


## 第336页(12.5节正文,共2处)、第356页(12.7节本章要点正文内,共2处)、第357页(单选题(5)的三个选项,共3处)

累计概率
Expand Down

0 comments on commit 51db0b3

Please sign in to comment.