Skip to content
Snippets Groups Projects
Commit ff18baa1 authored by spmohanty's avatar spmohanty
Browse files

Use random.rand instead of random.random for windows compatibility

parent 19654d0e
No related branches found
No related tags found
No related merge requests found
...@@ -296,7 +296,7 @@ class RailEnv(Environment): ...@@ -296,7 +296,7 @@ class RailEnv(Environment):
# continue # continue
# A proportion of agent in the environment will receive a positive malfunction rate # A proportion of agent in the environment will receive a positive malfunction rate
if self.np_random.random() < self.proportion_malfunctioning_trains: if self.np_random.rand() < self.proportion_malfunctioning_trains:
agent.malfunction_data['malfunction_rate'] = self.mean_malfunction_rate agent.malfunction_data['malfunction_rate'] = self.mean_malfunction_rate
agent.malfunction_data['malfunction'] = 0 agent.malfunction_data['malfunction'] = 0
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment