Eugene-Bond commited on
Commit
9f0255c
·
1 Parent(s): 3cd5346

updated usage section in readme

Browse files
Files changed (1) hide show
  1. README.md +11 -2
README.md CHANGED
@@ -24,5 +24,14 @@ model-index:
24
  This is a trained model of a **PPO** agent playing **LunarLander-v2** using the [stable-baselines3 library](https://github.com/DLR-RM/stable-baselines3).
25
 
26
  ## Usage (with Stable-baselines3)
27
- TODO: Add your code
28
-
 
 
 
 
 
 
 
 
 
 
24
  This is a trained model of a **PPO** agent playing **LunarLander-v2** using the [stable-baselines3 library](https://github.com/DLR-RM/stable-baselines3).
25
 
26
  ## Usage (with Stable-baselines3)
27
+ ```
28
+ from typing import Callable
29
+
30
+ def linear_schedule(initial_value: float) -> Callable[[float], float]:
31
+ def func(progress_remaining: float) -> float:
32
+ return progress_remaining * initial_value
33
+
34
+ return func
35
+
36
+ model = PPO(policy="MlpPolicy", env=env, verbose=1, n_epochs=10, learning_rate=linear_schedule(0.005), n_steps=1500)
37
+ ```