From 191ab3a35ffdde01de9f14a2c935e3d6e0be5879 Mon Sep 17 00:00:00 2001 From: Guillaume Mollard <guillaume.mollard2@gmail.com> Date: Tue, 21 May 2019 10:45:01 +0200 Subject: [PATCH] added direction of other agents to global observation --- flatland/envs/observations.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flatland/envs/observations.py b/flatland/envs/observations.py index f90b529d..09739f87 100644 --- a/flatland/envs/observations.py +++ b/flatland/envs/observations.py @@ -203,7 +203,7 @@ class TreeObsForRailEnv(ObservationBuilder): num_transitions = np.count_nonzero(possible_transitions) # Root node - current position # observation = [0, 0, 0, 0, self.distance_map[handle, position[0], position[1], orientation]] - observation = [0, 0, 0, 0, self.distance_map[(handle, *agent.position,direc agent.direction)]] + observation = [0, 0, 0, 0, self.distance_map[(handle, *agent.position, agent.direction)]] root_observation = observation[:] visited = set() # Start from the current orientation, and see which transitions are available; -- GitLab