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

updated load and save function. Now also distance maps are stored.

Additional package msgpack-numpy needed for ndarray.
This saves tons of time when loading precomputed files.
Updated test to test loading and saving with and without distance maps
minor update to bug in observation dimension
parent 0c52fc01
No related branches found
No related tags found
No related merge requests found
......@@ -22,7 +22,7 @@ class TreeObsForRailEnv(ObservationBuilder):
For details about the features in the tree observation see the get() function.
"""
observation_dim = 9
def __init__(self, max_depth, predictor=None):
super().__init__()
......@@ -34,6 +34,7 @@ class TreeObsForRailEnv(ObservationBuilder):
for i in range(self.max_depth + 1):
size += pow4
pow4 *= 4
self.observation_dim = 9
self.observation_space = [size * self.observation_dim]
self.location_has_agent = {}
self.location_has_agent_direction = {}
......
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