Skip to content
Snippets Groups Projects
Commit 0dca3975 authored by Erik Nygren's avatar Erik Nygren
Browse files

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.
parent ae53bf1a
No related branches found
No related tags found
No related merge requests found
...@@ -708,12 +708,14 @@ class LocalObsForRailEnv(ObservationBuilder): ...@@ -708,12 +708,14 @@ class LocalObsForRailEnv(ObservationBuilder):
of the other agents at their position coordinates, if they are in the agent's vision range. 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. - 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): def __init__(self, view_width, view_height, center):
"""
:param view_radius:
"""
super(LocalObsForRailEnv, self).__init__() super(LocalObsForRailEnv, self).__init__()
self.view_width = view_width self.view_width = view_width
self.view_height = view_height self.view_height = view_height
......
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