drap commited on
Commit
9c3d747
·
verified ·
1 Parent(s): abbd753

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +36 -0
README.md ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ # PPO CartPole Agent
3
+
4
+ This is a PPO agent trained on the CartPole-v1 environment using Stable Baselines3.
5
+
6
+ ## Performance
7
+
8
+ The agent achieved a mean reward of 500.00 ± 0.00 over 10 evaluation episodes.
9
+
10
+ ## Training Details
11
+
12
+ - Algorithm: PPO
13
+ - Environment: CartPole-v1
14
+ - Training Steps: 25,000
15
+ - Framework: Stable Baselines3
16
+
17
+ ## Usage
18
+
19
+ ```python
20
+ from stable_baselines3 import PPO
21
+ import gymnasium as gym
22
+
23
+ # Load the model
24
+ model = PPO.load("drap/cartpole-ppo")
25
+
26
+ # Create environment
27
+ env = gym.make("CartPole-v1")
28
+
29
+ # Test the model
30
+ obs, _ = env.reset()
31
+ while True:
32
+ action, _ = model.predict(obs, deterministic=True)
33
+ obs, reward, terminated, truncated, _ = env.step(action)
34
+ if terminated or truncated:
35
+ break
36
+ ```