-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #202 from huangshiyu13/main
update
- Loading branch information
Showing
10 changed files
with
45 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
## Installation | ||
```bash | ||
pip install shimmy[dm-control] | ||
``` | ||
|
||
## Usage | ||
```bash | ||
python train_ppo.py | ||
``` |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,13 @@ | ||
from typing import Any, Optional | ||
|
||
import dmc2gym | ||
import gymnasium as gym | ||
import numpy as np | ||
|
||
# class DmcEnv: | ||
# def __init__(self): | ||
# env = dmc2gym.make( | ||
# domain_name='walker', | ||
# task_name='walk', | ||
# seed=42, | ||
# visualize_reward=False, | ||
# from_pixels='features', | ||
# height=224, | ||
# width=224, | ||
# frame_skip=2 | ||
# ) | ||
# # self.observation_space = spaces.Box( | ||
# # low=np.array([0, 0, 0, 0]), | ||
# # high=np.array([self.nrow - 1, self.ncol - 1, self.nrow - 1, self.ncol - 1]), | ||
# # dtype=int, | ||
# # ) # current position and target position | ||
# # self.action_space = spaces.Discrete( | ||
# # 5 | ||
# # ) | ||
|
||
|
||
def make( | ||
id: str, | ||
render_mode: Optional[str] = None, | ||
**kwargs: Any, | ||
): | ||
env = gym.make(id, render_mode=render_mode) | ||
# env = dmc2gym.make( | ||
# domain_name='walker', | ||
# task_name='walk', | ||
# seed=42, | ||
# visualize_reward=False, | ||
# from_pixels='features', | ||
# height=224, | ||
# width=224, | ||
# frame_skip=2 | ||
# ) | ||
return env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters