-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
aboundy
authored and
iron-bound
committed
Oct 30, 2023
1 parent
9506f14
commit e5e2a06
Showing
3 changed files
with
27 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,7 @@ __pycache__/ | |
|
||
# C extensions | ||
*.so | ||
*.c | ||
|
||
# Distribution / packaging | ||
.Python | ||
|
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,19 @@ | ||
from pdb import set_trace as T | ||
import numpy as np | ||
from pufferlib.environments import PokemonRed | ||
|
||
env = PokemonRed() | ||
r_ob, r_info = env.reset() | ||
isinstance(r_ob, np.ndarray) | ||
isinstance(r_info, dict) | ||
|
||
for i in range(100): | ||
action = env.action_space.sample() | ||
ob, reward, terminal, truncated, info = env.step(action) | ||
print(f'Step: {i}, Info: {info}') | ||
|
||
# check datatype output | ||
isinstance(ob, np.ndarray) | ||
isinstance(reward, float) | ||
isinstance(terminal, bool) | ||
isinstance(truncated, bool) |