st_signals['movement_conflict']=(notmovement_allowed)andagent.speed_counter.is_cell_exit# TODO: Modify motion check to provide proper conflict information
returnst_signals
defstep(self,action_dict):
self._elapsed_steps+=1
# If we're done, set reward and info_dict and step() is done.
ifself.dones["__all__"]:
ifself.dones["__all__"]:# TODO: Move boilerplate to different function
self.rewards_dict={}
info_dict={
"action_required":{},
...
...
@@ -524,11 +542,14 @@ class RailEnv(Environment):
self.motionCheck=ac.MotionCheck()# reset the motion check
temp_pos_dirs={}# TODO - Dipam - Needs renaming
fori_agent,agentinenumerate(self.agents):
temp_saved_data={}# TODO : Change name
fori_agent,agentinenumerate(self.agents):# TODO: Important - Do not use i_agent like this, use agent.handle if needed