Skip to content

Commit f349344

Browse files
committed
update to resolve warnings from newer versions of gym
1 parent 4d91732 commit f349344

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

nes_py/nes_env.py

+8-1
Original file line numberDiff line numberDiff line change
@@ -243,14 +243,21 @@ def seed(self, seed=None):
243243
# return the list of seeds used by RNG(s) in the environment
244244
return [seed]
245245

246-
def reset(self):
246+
def reset(self, seed=None, options=None, return_info=None):
247247
"""
248248
Reset the state of the environment and returns an initial observation.
249249
250+
Args:
251+
seed (int): an optional random number seed for the next episode
252+
options (any): unused
253+
return_info (any): unused
254+
250255
Returns:
251256
state (np.ndarray): next frame as a result of the given action
252257
253258
"""
259+
# Set the seed.
260+
self.seed(seed)
254261
# call the before reset callback
255262
self._will_reset()
256263
# reset the emulator

0 commit comments

Comments
 (0)