From 0dca39759e243eb97b8373536be7e280bee9deee Mon Sep 17 00:00:00 2001 From: Erik Nygren <erik.nygren@sbb.ch> Date: Thu, 25 Jul 2019 11:57:22 -0400 Subject: [PATCH] Refactoring of the LocalObForRailEnv observation. Now turns with the agent, encodes local information which can easily be enhanced by predictions, distance map and other things. --- flatland/envs/observations.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/flatland/envs/observations.py b/flatland/envs/observations.py index 19eb9ab9..41ff6f31 100644 --- a/flatland/envs/observations.py +++ b/flatland/envs/observations.py @@ -708,12 +708,14 @@ class LocalObsForRailEnv(ObservationBuilder): of the other agents at their position coordinates, if they are in the agent's vision range. - A 4 elements array with one hot encoding of the direction. + + Use the parameters view_width and view_height to define the rectangular view of the agent. + The center parameters moves the agent along the height axis of this rectangle. If it is 0 the agent only has + observation in front of it. """ def __init__(self, view_width, view_height, center): - """ - :param view_radius: - """ + super(LocalObsForRailEnv, self).__init__() self.view_width = view_width self.view_height = view_height -- GitLab