Skip to content
Snippets Groups Projects
Commit c7fff37b authored by Adrian Egli's avatar Adrian Egli
Browse files

.

parent 8e13228e
No related branches found
Tags submission-v0.11
No related merge requests found
<component name="InspectionProjectProfileManager">
<settings>
<option name="USE_PROJECT_PROFILE" value="false" />
<version value="1.0" />
</settings>
<component name="InspectionProjectProfileManager">
<settings>
<option name="USE_PROJECT_PROFILE" value="false" />
<version value="1.0" />
</settings>
</component>
\ No newline at end of file
No preview for this file type
No preview for this file type
No preview for this file type
......@@ -30,7 +30,7 @@ def my_controller(extra: Extra, observation, info):
# the example here :
# https://gitlab.aicrowd.com/flatland/flatland/blob/master/flatland/envs/observations.py#L14
#####################################################################
my_observation_builder = Extra(max_depth=3)
my_observation_builder = Extra(max_depth=1)
# Or if you want to use your own approach to build the observation from the env_step,
# please feel free to pass a DummyObservationBuilder() object as mentioned below,
......
......@@ -353,7 +353,12 @@ class Extra(ObservationBuilder):
def rl_agent_act(self, observation, info, eps=0.0):
if len(self.random_agent_starter) != self.env.get_num_agents():
self.random_agent_starter = np.random.random(self.env.get_num_agents()) * 1000.0
f = self.env._max_episode_steps
if f is None:
f = 1000.0
else:
f *= 0.8
self.random_agent_starter = np.random.random(self.env.get_num_agents()) * f
self.loadAgent()
action_dict = {}
......
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