Commit 38f0bd67 authored by u214892's avatar u214892
Browse files

#67 multiple agents

parent 6db70ca5
Pipeline #1346 failed with stage
in 5 minutes and 16 seconds
......@@ -20,6 +20,8 @@ class TreeObsForRailEnv(ObservationBuilder):
network to simplify the representation of the state of the environment for each agent.
"""
observation_dim = 9
def __init__(self, max_depth, predictor=None):
self.max_depth = max_depth
......@@ -29,7 +31,6 @@ 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 = {}
......
......@@ -265,8 +265,8 @@ def test_shortest_path_predictor_conflicts(rendering=False):
pp.pprint(tree_0)
# check the expectations
expected_conflicts_0 = [('F','R')]
expected_conflicts_1 = [('F','L')]
expected_conflicts_0 = [('F', 'R')]
expected_conflicts_1 = [('F', 'L')]
_check_expected_conflicts(expected_conflicts_0, obs_builder, tree_0, "agent[0]: ")
_check_expected_conflicts(expected_conflicts_1, obs_builder, tree_1, "agent[1]: ")
......
......@@ -113,6 +113,8 @@ deps =
-r{toxinidir}/requirements_dev.txt
-r{toxinidir}/requirements_continuous_integration.txt
commands =
; install current version of flatland to be used by notebooks
sh -c 'python setup.py'
; run tests from subfolder to ensure that resources are accessed via resources and not via relative paths
sh -c 'mkdir -p {envtmpdir}/6f59bc68108c3895b1828abdd04b9a06'
sh -c 'jupyter nbextension install --py --sys-prefix widgetsnbextension'
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment