@@ -40,39 +40,20 @@ Then install the following modules :
...
@@ -40,39 +40,20 @@ Then install the following modules :
```sh
```sh
pip install gym==0.26.2
pip install gymnasium
```
Install also pyglet for the rendering.
```sh
pip install pyglet==2.0.10
```
```
```sh
```sh
pip install numpy==1.26.4
pip install"gymnasium[classic-control]"
```
```
If needed
```sh
pip install pygame==2.5.2
```
```sh
pip install PyQt5
```
```sh
pip install opencv-python
```
### Usage
### Usage
Here is an example of how to use Gym to solve the `CartPole-v1` environment [Documentation](https://gymnasium.farama.org/environments/classic_control/cart_pole/):
Here is an example of how to use Gym to solve the `CartPole-v1` environment [Documentation](https://gymnasium.farama.org/environments/classic_control/cart_pole/):
```python
```python
importgym
importgymnasiumasgym
# Create the environment
# Create the environment
env=gym.make("CartPole-v1",render_mode="human")
env=gym.make("CartPole-v1",render_mode="human")
...
@@ -144,7 +125,7 @@ Stable-Baselines3 (SB3) is a high-level RL library that provides various algorit
...
@@ -144,7 +125,7 @@ Stable-Baselines3 (SB3) is a high-level RL library that provides various algorit
```sh
```sh
pip install stable-baselines3
pip install stable-baselines3
pip install stable-baselines3[extra]
pip install"stable-baselines3[extra]"
pip install moviepy
pip install moviepy
```
```
...
@@ -163,7 +144,7 @@ Hugging Face Hub is a platform for easy sharing and versioning of trained machin
...
@@ -163,7 +144,7 @@ Hugging Face Hub is a platform for easy sharing and versioning of trained machin
#### Installation of `huggingface_sb3`
#### Installation of `huggingface_sb3`
```sh
```sh
pip install huggingface-sb3==2.3.1
pip install huggingface-sb3
```
```
#### Upload the model on the Hub
#### Upload the model on the Hub
...
@@ -185,7 +166,7 @@ Weights & Biases (W&B) is a tool for machine learning experiment management. Wit
...
@@ -185,7 +166,7 @@ Weights & Biases (W&B) is a tool for machine learning experiment management. Wit
You'll need to install both `wand` and `tensorboar`.
You'll need to install both `wand` and `tensorboar`.
```shell
```shell
pip install wandb tensorboard
pip install wandb
```
```
Use the documentation of [Stable-Baselines3](https://stable-baselines3.readthedocs.io/en/master/) and [Weights & Biases](https://docs.wandb.ai/guides/integrations/stable-baselines-3) to track the CartPole training. Make the run public.
Use the documentation of [Stable-Baselines3](https://stable-baselines3.readthedocs.io/en/master/) and [Weights & Biases](https://docs.wandb.ai/guides/integrations/stable-baselines-3) to track the CartPole training. Make the run public.