浏览代码

unit test - don't use global random generator (#2521)

* unit test - don't use global random generator

* Update test_simple_rl.py
/develop-gpu-test
GitHub 5 年前
当前提交
6f67cf40
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 4
      ml-agents/mlagents/trainers/tests/test_simple_rl.py

4
ml-agents/mlagents/trainers/tests/test_simple_rl.py


self.position = 0.0
self.step_count = 0
self.random = random.Random(str(self._brains))
self.goal = random.choice([-1, 1])
self.goal = self.random.choice([-1, 1])
def step(
self,

def _reset_agent(self):
self.position = 0.0
self.step_count = 0
self.goal = random.choice([-1, 1])
self.goal = self.random.choice([-1, 1])
def reset(
self,

正在加载...
取消
保存