Skip to content

Commit 0197f3b

Browse files
committed
Environment more seeding
1 parent 794d785 commit 0197f3b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

vmas/simulator/environment/environment.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Copyright (c) 2022-2023.
22
# ProrokLab (https://www.proroklab.org/)
33
# All rights reserved.
4+
import random
45
from ctypes import byref
56
from typing import List, Tuple, Callable, Optional
67

@@ -115,6 +116,8 @@ def seed(self, seed=None):
115116
if seed is None:
116117
seed = 0
117118
torch.manual_seed(seed)
119+
np.random.seed(seed)
120+
random.seed(seed)
118121
return [seed]
119122

120123
def step(self, actions: List):

0 commit comments

Comments
 (0)