Skip to content

Commit

Permalink
Usage examples (#350)
Browse files Browse the repository at this point in the history
* Single actor critic shared params

* Shared layers for multi ACs

* Fix lint errors (1)

* Fixed tests

* Changes to dicstrings and classes

* Renaming Multi -> Two and comments

* Adding tutorial

* Small change

* Index

* Fix code render

* Fix docs

* A small addition
  • Loading branch information
hades-rp2010 committed Sep 15, 2020
1 parent 1fa6302 commit 147d373
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions docs/source/usage/tutorials/Deep/A2C.rst
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@ Training through the API
import gym
from genrl import A2C
from genrl.deep.common import OnPolicyTrainer
from genrl.agents import A2C
from genrl.trainers import OnPolicyTrainer
from genrl.environments import VectorEnv
env = VectorEnv("CartPole-v0")
Expand Down
4 changes: 2 additions & 2 deletions docs/source/usage/tutorials/Deep/PPO.rst
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ Training through the API
import gym
from genrl import PPO1
from genrl.deep.common import OnPolicyTrainer
from genrl.agents import PPO1
from genrl.trainers import OnPolicyTrainer
from genrl.environments import VectorEnv
env = VectorEnv("CartPole-v0")
Expand Down
4 changes: 2 additions & 2 deletions docs/source/usage/tutorials/Deep/VPG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ Training through the API
import gym
from genrl import VPG
from genrl.deep.common import OnPolicyTrainer
from genrl.agents import VPG
from genrl.trainers import OnPolicyTrainer
from genrl.environments import VectorEnv
env = VectorEnv("CartPole-v0")
Expand Down
4 changes: 2 additions & 2 deletions docs/source/usage/tutorials/Using A2C.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
```python
import gym

from genrl import A2C
from genrl.deep.common import OnPolicyTrainer
from genrl.agents import A2C
from genrl.trainers import OnPolicyTrainer
from genrl.environments import VectorEnv

env = VectorEnv("CartPole-v0")
Expand Down
2 changes: 1 addition & 1 deletion docs/source/usage/tutorials/Using Custom Policies.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Import the required libraries (eg. torch, torch.nn) and from GenRL, the algorith
import torch
import torch.nn as nn

from genrl import VPG
from genrl.agents import VPG
from genrl.core.policies import MlpPolicy
from genrl.environments import VectorEnv
from genrl.trainers import OnPolicyTrainer
Expand Down
4 changes: 2 additions & 2 deletions docs/source/usage/tutorials/using_vpg.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ This is a very minimal way to run a VPG agent on **GenRL**
```python
import gym # OpenAI Gym

from genrl import VPG
from genrl.deep.common import OnPolicyTrainer
from genrl.agents import VPG
from genrl.trainers import OnPolicyTrainer
from genrl.environments import VectorEnv

env = VectorEnv("CartPole-v1")
Expand Down

0 comments on commit 147d373

Please sign in to comment.