Skip to content

Commit 68a0c38

Browse files
authored
fix(lkj): fix typo in customize_envs.md
1 parent 44a23b5 commit 68a0c38

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

docs/source/tutorials/envs/customize_envs.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,12 +81,17 @@ In a custom environment, you need to provide properties for observation space an
8181

8282
```python
8383
@property
84-
defobservation_space(self):
85-
return self.env.observation_space
84+
def observation_space(self):
85+
return self._observation_space
8686

8787
@property
8888
def action_space(self):
89-
return self.env.action_space
89+
return self._action_space
90+
91+
@property
92+
def legal_actions(self):
93+
# get the actual legal actions
94+
return np.arange(self._action_space.n)
9095
```
9196

9297
### 6. **Render Method**<br>

0 commit comments

Comments
 (0)