How to use the gym.utils.seeding function in gym

To help you get started, we’ve selected a few gym examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github eleurent / obstacle-env / obstacle_env / envs / obstacle.py View on Github external
def seed(self, seed=None):
        self.np_random, seed = seeding.np_random(seed)
        return [seed]
github xpharry / dqn-adaptive-cruise / gym-vehicle / gym_vehicle / envs / gazebo_cartpole / gazebo_cartpole_v0.py View on Github external
def _seed(self, seed=None):
        self.np_random, seed = seeding.np_random(seed)
        return [seed]
github maximecb / gym-minigrid / gym_minigrid / minigrid.py View on Github external
def seed(self, seed=1337):
        # Seed the random number generator
        self.np_random, _ = seeding.np_random(seed)
        return [seed]
github microsoft / CNTK / Examples / ReinforcementLearning / deeprl / env / puddleworld.py View on Github external
def _seed(self, seed=None):
        self.np_random, seed = seeding.np_random(seed)
        return [seed]
github DungLe13 / lips-reading / Misc / lip_reading_env.py View on Github external
def seed(self, seed=None):
        self.np_random, seed = seeding.np_random(seed)
        return [seed]
github qqiang00 / ReinforcemengLearningPractice / reinforce / puckworld.py View on Github external
def _seed(self, seed=None):
        # 产生一个随机化时需要的种子,同时返回一个np_random对象,支持后续的随机化生成操作
        self.np_random, seed = seeding.np_random(seed)  
        return [seed]
github openai / gym / gym / envs / board_game / go.py View on Github external
def _seed(self, seed=None):
        self.np_random, seed1 = seeding.np_random(seed)
        # Derive a random seed.
        seed2 = seeding.hash_seed(seed1 + 1) % 2**32
        pachi_py.pachi_srand(seed2)
        return [seed1, seed2]
github MattChanTK / ai-gym / gym-maze / gym_maze / envs / maze_env.py View on Github external
def _seed(self, seed=None):
        self.np_random, seed = seeding.np_random(seed)
        return [seed]
github hust512 / DQN-DDPG_Stock_Trading / gym / envs / rlstock / rlstock_env.py View on Github external
def _seed(self, seed=None):
        self.np_random, seed = seeding.np_random(seed)
        return [seed]
github SuReLI / dyna-gym / dyna_gym / envs / nsfrozenlake_v0.py View on Github external
def _seed(self, seed=None):
        self.np_random, seed = utils.seeding.np_random(seed)
        return [seed]