fixed simplex initialisation seeding bug (#9660)

Co-authored-by: Petros Christodoulou <petrochr@amazon.com>
This commit is contained in:
Petros Christodoulou
2020-07-24 14:22:41 -07:00
committed by GitHub
co-authored by Petros Christodoulou
parent 22d446bc2b
commit 46c64c90d0
+2 -1
View File
@@ -33,9 +33,10 @@ class Simplex(gym.Space):
self.concentration = [1] * self.dim
super().__init__(shape, dtype)
self.np_random = np.random.RandomState()
def seed(self, seed=None):
if self.np_random is None:
self.np_random = np.random.RandomState()
self.np_random.seed(seed)
def sample(self):