Commit 640276c7 authored by maljx's avatar maljx
Browse files

Merge branch 'master' of gitlab.aicrowd.com:flatland/flatland

parents 123806b1 a585a530
Pipeline #426 passed with stage
in 2 minutes and 39 seconds
......@@ -24,13 +24,15 @@ env = RailEnv(width=10,
height=10,
rail_generator=random_rail_generator(cell_type_relative_proportion=transition_probability),
number_of_agents=1)
"""
env = RailEnv(width=20,
height=20,
rail_generator=rail_from_list_of_saved_GridTransitionMap_generator(
['../flatland/baselines/test-editor.npy']),
['../env-data/tests/test_rail.npy']),
number_of_agents=1)
"""
env_renderer = RenderTool(env, gl="QT")
handle = env.get_agent_handles()
......@@ -105,7 +107,6 @@ for trials in range(1, n_trials + 1):
action = agent.act(np.array(obs[a]), eps=eps)
action_prob[action] += 1
action_dict.update({a: action})
# Environment step
next_obs, all_rewards, done, _ = env.step(action_dict)
for a in range(env.number_of_agents):
......
......@@ -39,17 +39,10 @@
```
%% Cell type:code id: tags:
``` python
import sys
print(sys.path)
```
%% Cell type:code id: tags:
``` python
import flatland.core.env
from flatland.envs.rail_env import RailEnv, random_rail_generator
from flatland.core.transitions import RailEnvTransitions
from flatland.core.env_observation_builder import TreeObsForRailEnv
import flatland.utils.rendertools as rt
......@@ -218,11 +211,11 @@
oEditor.env.number_of_agents
```
%%%% Output: execute_result
0
1
%% Cell type:code id: tags:
``` python
wid_output
......
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