@@ -77,7 +77,7 @@ class RailEnv(Environment):
77
77
78
78
Every time an agent stops, an agent has a certain probability of malfunctioning. Malfunctions of trains follow a
79
79
poisson process with a certain rate. Not all trains will be affected by malfunctions during episodes to keep
80
- complexity managable .
80
+ complexity manageable .
81
81
82
82
TODO: currently, the parameters that control the stochasticity of the environment are hard-coded in init().
83
83
For Round 2, they will be passed to the constructor as arguments, to allow for more flexibility.
@@ -140,7 +140,7 @@ def __init__(self,
140
140
vectors for each agent.
141
141
remove_agents_at_target : bool
142
142
If remove_agents_at_target is set to true then the agents will be removed by placing to
143
- RailEnv.DEPOT_POSITION when the agent has reach it's target position.
143
+ RailEnv.DEPOT_POSITION when the agent has reached its target position.
144
144
random_seed : int or None
145
145
if None, then its ignored, else the random generators are seeded with this number to ensure
146
146
that stochastic operations are replicable across multiple operations
@@ -441,7 +441,7 @@ def preprocess_action(self, action, agent):
441
441
442
442
action = action_preprocessing .preprocess_moving_action (action , self .rail , current_position , current_direction )
443
443
444
- # Check transitions, bounts for executing the action in the given position and directon
444
+ # Check transitions, bounts for executing the action in the given position and direction
445
445
if action .is_moving_action () and not check_valid_action (action , self .rail , current_position , current_direction ):
446
446
action = RailEnvActions .STOP_MOVING
447
447
@@ -674,7 +674,7 @@ def get_valid_directions_on_grid(self, row: int, col: int) -> List[int]:
674
674
def _exp_distirbution_synced (self , rate : float ) -> float :
675
675
"""
676
676
Generates sample from exponential distribution
677
- We need this to guarantee synchronity between different instances with same seed.
677
+ We need this to guarantee synchronicity between different instances with the same seed.
678
678
:param rate:
679
679
:return:
680
680
"""
@@ -684,7 +684,7 @@ def _exp_distirbution_synced(self, rate: float) -> float:
684
684
685
685
def _is_agent_ok (self , agent : EnvAgent ) -> bool :
686
686
"""
687
- Check if an agent is ok, meaning it can move and is not malfuncitoinig
687
+ Checks if an agent is ok, meaning it can move and is not malfunctioning.
688
688
Parameters
689
689
----------
690
690
agent
@@ -706,7 +706,7 @@ def render(self, mode="rgb_array", gl="PGL", agent_render_variant=AgentRenderVar
706
706
show_observations = False , show_predictions = False ,
707
707
show_rowcols = False , return_image = True ):
708
708
"""
709
- This methods provides the option to render the
709
+ Provides the option to render the
710
710
environment's behavior as an image or to a window.
711
711
Parameters
712
712
----------
@@ -764,7 +764,7 @@ def update_renderer(self, mode, show, show_observations, show_predictions,
764
764
765
765
def close (self ):
766
766
"""
767
- This methods closes any renderer window.
767
+ Closes any renderer window.
768
768
"""
769
769
if hasattr (self , "renderer" ) and self .renderer is not None :
770
770
try :
0 commit comments