Skip to content
Snippets Groups Projects
Commit 803fc572 authored by MasterScrat's avatar MasterScrat
Browse files

Updated from master

parents 6ddd5812 3ce9335c
No related branches found
No related tags found
No related merge requests found
Showing
with 4 additions and 9 deletions
......@@ -9,7 +9,7 @@ include requirements_continuous_integration.txt
graft flatland/svg
graft flatland/png
graft env_data
......
......@@ -63,7 +63,7 @@ schedule_generator = sparse_schedule_generator(speed_ration_map)
# We can furthermore pass stochastic data to the RailEnv constructor which will allow for stochastic malfunctions
# during an episode.
stochastic_data = MalfunctionParameters(malfunction_rate=10000, # Rate of malfunction occurence
stochastic_data = MalfunctionParameters(malfunction_rate=1/10000, # Rate of malfunction occurence
min_duration=15, # Minimal duration of malfunction
max_duration=50 # Max duration of malfunction
)
......
......@@ -295,21 +295,16 @@ class TreeObsForRailEnv(ObservationBuilder):
if self.location_has_agent_direction[position] == direction:
# Cummulate the number of agents on branch with same direction
other_agent_same_direction += self.location_has_agent_direction.get((position, direction), 0)
other_agent_same_direction += 1
# Check fractional speed of agents
current_fractional_speed = self.location_has_agent_speed[position]
if current_fractional_speed < min_fractional_speed:
min_fractional_speed = current_fractional_speed
# Other direction agents
# TODO: Test that this behavior is as expected
other_agent_opposite_direction += \
self.location_has_agent[position] - self.location_has_agent_direction.get((position, direction),
0)
else:
# If no agent in the same direction was found all agents in that position are other direction
# Attention this counts to many agents as a few might be going off on a switch.
other_agent_opposite_direction += self.location_has_agent[position]
# Check number of possible transitions for agent and total number of transitions in cell (type)
......
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
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