Skip to content
Snippets Groups Projects
Commit 842be395 authored by u229589's avatar u229589
Browse files

Refactoring: prediction_builder knows its environment and can access the distance map directly

parent de4b7206
No related branches found
No related tags found
No related merge requests found
......@@ -205,7 +205,7 @@ In contrast to the previous examples we also implement the :code:`def get_many(s
:return:
'''
self.predictions = self.predictor.get(custom_args={'distance_map': self.env.distance_map})
self.predictions = self.predictor.get()
self.predicted_pos = {}
for t in range(len(self.predictions[0])):
......
......@@ -71,7 +71,7 @@ class TreeObsForRailEnv(ObservationBuilder):
self.max_prediction_depth = 0
self.predicted_pos = {}
self.predicted_dir = {}
self.predictions = self.predictor.get(custom_args={'distance_map': self.env.distance_map})
self.predictions = self.predictor.get()
if self.predictions:
for t in range(len(self.predictions[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