Skip to content

Commit 1e79709

Browse files
Bugfix Four Room rendering (#113)
1 parent 4db1fd0 commit 1e79709

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

mo_gymnasium/envs/four_room/four_room.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,9 @@ def step(self, action):
179179
# can now move
180180
self.state = (s1, collected)
181181

182+
if self.render_mode == "human":
183+
self.render()
184+
182185
# into a goal cell
183186
if s1 == self.goal:
184187
phi = np.ones(len(self.all_shapes), dtype=np.float32)
@@ -206,9 +209,6 @@ def step(self, action):
206209
phi = self.features(old_state, action, self.state)
207210
return self.state_to_array(self.state), phi, terminated, False, {}
208211

209-
if self.render_mode == "human":
210-
self.render()
211-
212212
# into an empty cell
213213
return (
214214
self.state_to_array(self.state),

0 commit comments

Comments
 (0)