winkin119 commited on
Commit
444dbf0
·
verified ·
1 Parent(s): 1bd9cf6

upload via upload_folder 2025-08-03T14:02:29.798742+00:00

Browse files
Files changed (3) hide show
  1. README.md +20 -7
  2. full_model.pt +3 -0
  3. state_dict.pt +3 -0
README.md CHANGED
@@ -25,13 +25,26 @@ model-index:
25
  verified: false
26
  ---
27
 
28
- # **REINFORCE** Agent playing **CartPole-v1**
29
- This is a trained model of a **REINFORCE** agent playing **CartPole-v1**, with a similar A3C parellel update.
30
 
31
- ## Usage
 
 
 
 
 
 
32
 
33
- model = load_from_hub(repo_id="winkin119/Reinforce-CartPole", filename="model.pth")
 
 
 
34
 
35
- env = gym.make("CartPole-v1")
36
- ...
37
-
 
 
 
 
 
25
  verified: false
26
  ---
27
 
28
+ # **Vanilla-Reinforce** Agent playing **CartPole-v1**
29
+ This is a trained model of a **Vanilla-Reinforce** agent playing **CartPole-v1**.
30
 
31
+ ## Usage
32
+ ### create the conda env in https://github.com/GeneHit/drl_practice
33
+ ```bash
34
+ conda create -n drl python=3.10
35
+ conda activate drl
36
+ python -m pip install -r requirements.txt
37
+ ```
38
 
39
+ ### play with full model
40
+ ```python
41
+ # load the full model
42
+ model = load_from_hub(repo_id="winkin119/Reinforce-CartPole", filename="full_model.pt")
43
 
44
+ # Create the environment.
45
+ env = gym.make("CartPole-v1")
46
+ state, _ = env.reset()
47
+ action = model.action(state)
48
+ ...
49
+ ```
50
+ There is also a state dict version of the model, you can check the corresponding chapter in the repo.
full_model.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:beef03e0babaaf209d93ab0b58ce7320774fd7e66fa83e646ea59300fa669a31
3
+ size 74745
state_dict.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1ace282d036de7ee28a0e0333af059a3bc48b65ddd9ca3b9b5fe12e259a2350d
3
+ size 72825