mirror of
https://github.com/wassname/ray.git
synced 2026-07-25 13:30:52 +08:00
fixed simplex initialisation seeding bug (#9660)
Co-authored-by: Petros Christodoulou <petrochr@amazon.com>
This commit is contained in:
co-authored by
Petros Christodoulou
parent
22d446bc2b
commit
46c64c90d0
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user