Update README.md

This commit is contained in:
Flange 2024-05-19 12:29:10 +08:00 committed by GitHub
parent e447cf1168
commit 824f4562cd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2,13 +2,16 @@
![MuJoCo](https://github.com/MyRepositories-hub/Simple-Policy-Optimization/blob/main/draw_return_mujoco.png) ![MuJoCo](https://github.com/MyRepositories-hub/Simple-Policy-Optimization/blob/main/draw_return_mujoco.png)
# Training # Training
**The experimental environment is `gymnasium`, and you need to execute the following command to install the dependencies:** **The experimental environment is `gymnasium`, and you need to execute the following command to install the dependencies:**
## MuJoCo ## MuJoCo
### Installation ### Installation
```bash ```bash
pip install gymnasium pip install gymnasium
pip install gymnasium[mujoco] pip install gymnasium[mujoco]
``` ```
### Reminder ### Reminder
Please change the code from Please change the code from
```python ```python
@ -33,12 +36,17 @@ while True:
s_next, r, dw, tr, info = env.step(a) s_next, r, dw, tr, info = env.step(a)
done = (dw or tr) done = (dw or tr)
``` ```
## Atari ## Atari
### Installation ### Installation
```bash ```bash
pip install gymnasium[atari] pip install gymnasium[atari]
pip install gymnasium[accept-rom-license] pip install gymnasium[accept-rom-license]
``` ```
### Reminder
v4 refers to the `gym` library, a popular reinforcement learning environment, while v5 represents its successor, `gymnasium`, which provides similar functionalities with potential improvements
### Running ### Running
```python ```python
import gymnasium as gym import gymnasium as gym