diff --git a/flatland/envs/observations.py b/flatland/envs/observations.py index e6646cb9b7f4325e73496c04dd8bdf837c34fe30..2c9a747372ae74bb2f9e286d0d1fc200260d7f01 100644 --- a/flatland/envs/observations.py +++ b/flatland/envs/observations.py @@ -308,6 +308,7 @@ class TreeObsForRailEnv(ObservationBuilder): We walk along the branch and collect the information documented in the get() function. If there is a branching point a new node is created and each possible branch is explored. """ + # [Recursive branch opened] if depth >= self.max_depth + 1: return [], [] diff --git a/flatland/envs/predictions.py b/flatland/envs/predictions.py index 24c57277572c551d2ff8bcfa1739d7ac863a553b..7483ebadf07a999f16b4e8056ae9c841ab3db9f6 100644 --- a/flatland/envs/predictions.py +++ b/flatland/envs/predictions.py @@ -86,7 +86,7 @@ class ShortestPathPredictorForRailEnv(PredictionBuilder): The prediction acts as if no other agent is in the environment and always takes the forward action. """ - def __init__(self, max_depth): + def __init__(self, max_depth=20): self.max_depth = max_depth def get(self, custom_args=None, handle=None): diff --git a/flatland/utils/rendertools.py b/flatland/utils/rendertools.py index 65fffadf5309ebbcc02cd6a2b39427f2469fec04..8974126ad69e35edbd621ba634727120720c9506 100644 --- a/flatland/utils/rendertools.py +++ b/flatland/utils/rendertools.py @@ -304,10 +304,6 @@ class RenderTool(object): warnings.warn( "Predictor did not provide any predicted cells to render. \ Predictors builder needs to populate: env.dev_pred_dict") - - - - else: for agent in agent_handles: color = self.gl.get_agent_color(agent)