Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
neurips2020-flatland-baselines
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Flatland
neurips2020-flatland-baselines
Commits
94e07ef9
Commit
94e07ef9
authored
May 01, 2020
by
MasterScrat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Formatting
parent
db0257ef
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
100 additions
and
92 deletions
+100
-92
README.md
README.md
+3
-1
envs/flatland_sparse.py
envs/flatland_sparse.py
+10
-4
experiments/flatland_random_sparse_small/global_obs_conv_net/ppo.yaml
...flatland_random_sparse_small/global_obs_conv_net/ppo.yaml
+43
-43
experiments/flatland_random_sparse_small/tree_obs_fc_net/ppo.yaml
...nts/flatland_random_sparse_small/tree_obs_fc_net/ppo.yaml
+44
-44
No files found.
README.md
View file @
94e07ef9
...
@@ -25,7 +25,9 @@ You may need to install/update bazel: [Ubuntu guide](https://docs.bazel.build/ve
...
@@ -25,7 +25,9 @@ You may need to install/update bazel: [Ubuntu guide](https://docs.bazel.build/ve
```
```
pip install ray[rllib]
pip install ray[rllib]
pip install tensorflow # or tensorflow-gpu
pip install tensorflow
# with GPU support
# conda install -c anaconda tensorflow-gpu
pip install -r requirements.txt
pip install -r requirements.txt
```
```
...
...
envs/flatland_sparse.py
View file @
94e07ef9
...
@@ -39,10 +39,16 @@ class FlatlandSparse(MultiAgentEnv):
...
@@ -39,10 +39,16 @@ class FlatlandSparse(MultiAgentEnv):
schedule_generator
=
sparse_schedule_generator
({
float
(
k
):
float
(
v
)
schedule_generator
=
sparse_schedule_generator
({
float
(
k
):
float
(
v
)
for
k
,
v
in
self
.
_config
[
'speed_ratio_map'
].
items
()})
for
k
,
v
in
self
.
_config
[
'speed_ratio_map'
].
items
()})
env
=
RailEnv
(
width
=
self
.
_config
[
'width'
],
height
=
self
.
_config
[
'height'
],
rail_generator
=
rail_generator
,
env
=
RailEnv
(
schedule_generator
=
schedule_generator
,
number_of_agents
=
self
.
_config
[
'number_of_agents'
],
width
=
self
.
_config
[
'width'
],
malfunction_generator_and_process_data
=
malfunction_from_params
(
stochastic_data
),
height
=
self
.
_config
[
'height'
],
obs_builder_object
=
self
.
_observation
.
builder
(),
remove_agents_at_target
=
False
)
rail_generator
=
rail_generator
,
schedule_generator
=
schedule_generator
,
number_of_agents
=
self
.
_config
[
'number_of_agents'
],
malfunction_generator_and_process_data
=
malfunction_from_params
(
stochastic_data
),
obs_builder_object
=
self
.
_observation
.
builder
(),
remove_agents_at_target
=
False
)
return
env
return
env
def
step
(
self
,
action_dict
):
def
step
(
self
,
action_dict
):
...
...
experiments/flatland_random_sparse_small/global_obs_conv_net/ppo.yaml
View file @
94e07ef9
flatland-random-sparse-small-global-conv-ppo
:
flatland-random-sparse-small-global-conv-ppo
:
run
:
PPO
run
:
PPO
env
:
flatland_random_sparse_small
env
:
flatland_random_sparse_small
stop
:
stop
:
timesteps_total
:
10000000
# 1e7
timesteps_total
:
10000000
# 1e7
checkpoint_freq
:
10
checkpoint_freq
:
10
checkpoint_at_end
:
True
checkpoint_at_end
:
True
keep_checkpoints_num
:
5
keep_checkpoints_num
:
5
checkpoint_score_attr
:
episode_reward_mean
checkpoint_score_attr
:
episode_reward_mean
config
:
config
:
clip_rewards
:
True
clip_rewards
:
True
clip_param
:
0.1
clip_param
:
0.1
vf_clip_param
:
500.0
vf_clip_param
:
500.0
entropy_coeff
:
0.01
entropy_coeff
:
0.01
# effective batch_size: train_batch_size * num_agents_in_each_environment [5, 10]
# effective batch_size: train_batch_size * num_agents_in_each_environment [5, 10]
# see https://github.com/ray-project/ray/issues/4628
# see https://github.com/ray-project/ray/issues/4628
train_batch_size
:
1000
# 5000
train_batch_size
:
1000
# 5000
rollout_fragment_length
:
50
# 100
rollout_fragment_length
:
50
# 100
sgd_minibatch_size
:
100
# 500
sgd_minibatch_size
:
100
# 500
num_sgd_iter
:
10
num_sgd_iter
:
10
num_workers
:
7
num_workers
:
7
num_envs_per_worker
:
5
num_envs_per_worker
:
5
batch_mode
:
truncate_episodes
batch_mode
:
truncate_episodes
observation_filter
:
NoFilter
observation_filter
:
NoFilter
vf_share_layers
:
True
vf_share_layers
:
True
vf_loss_coeff
:
0.5
vf_loss_coeff
:
0.5
num_gpus
:
1
num_gpus
:
1
env_config
:
env_config
:
min_seed
:
1002
min_seed
:
1002
max_seed
:
213783
max_seed
:
213783
min_test_seed
:
0
min_test_seed
:
0
max_test_seed
:
100
max_test_seed
:
100
reset_env_freq
:
1
reset_env_freq
:
1
observation
:
global
observation
:
global
observation_config
:
observation_config
:
max_width
:
45
max_width
:
45
max_height
:
45
max_height
:
45
regenerate_rail_on_reset
:
True
regenerate_rail_on_reset
:
True
regenerate_schedule_on_reset
:
True
regenerate_schedule_on_reset
:
True
render
:
False
render
:
False
model
:
model
:
custom_model
:
global_obs_model
custom_model
:
global_obs_model
custom_options
:
custom_options
:
architecture
:
impala
architecture
:
impala
experiments/flatland_random_sparse_small/tree_obs_fc_net/ppo.yaml
View file @
94e07ef9
flatland-random-sparse-small-tree-fc-ppo
:
flatland-random-sparse-small-tree-fc-ppo
:
run
:
PPO
run
:
PPO
env
:
flatland_random_sparse_small
env
:
flatland_random_sparse_small
stop
:
stop
:
timesteps_total
:
10000000
# 1e7
timesteps_total
:
10000000
# 1e7
checkpoint_freq
:
10
checkpoint_freq
:
10
checkpoint_at_end
:
True
checkpoint_at_end
:
True
keep_checkpoints_num
:
5
keep_checkpoints_num
:
5
checkpoint_score_attr
:
episode_reward_mean
checkpoint_score_attr
:
episode_reward_mean
config
:
config
:
clip_rewards
:
True
clip_rewards
:
True
clip_param
:
0.1
clip_param
:
0.1
vf_clip_param
:
500.0
vf_clip_param
:
500.0
entropy_coeff
:
0.01
entropy_coeff
:
0.01
# effective batch_size: train_batch_size * num_agents_in_each_environment [5, 10]
# effective batch_size: train_batch_size * num_agents_in_each_environment [5, 10]
# see https://github.com/ray-project/ray/issues/4628
# see https://github.com/ray-project/ray/issues/4628
train_batch_size
:
1000
# 5000
train_batch_size
:
1000
# 5000
rollout_fragment_length
:
50
# 100
rollout_fragment_length
:
50
# 100
sgd_minibatch_size
:
100
# 500
sgd_minibatch_size
:
100
# 500
num_sgd_iter
:
10
num_sgd_iter
:
10
num_workers
:
7
num_workers
:
7
num_envs_per_worker
:
5
num_envs_per_worker
:
5
batch_mode
:
truncate_episodes
batch_mode
:
truncate_episodes
observation_filter
:
NoFilter
observation_filter
:
NoFilter
vf_share_layers
:
True
vf_share_layers
:
True
vf_loss_coeff
:
0.5
vf_loss_coeff
:
0.5
num_gpus
:
1
num_gpus
:
1
env_config
:
env_config
:
min_seed
:
1002
min_seed
:
1002
max_seed
:
213783
max_seed
:
213783
min_test_seed
:
0
min_test_seed
:
0
max_test_seed
:
100
max_test_seed
:
100
# After how many episodes the level should be regenerated:
# After how many episodes the level should be regenerated:
reset_env_freq
:
1
reset_env_freq
:
1
observation
:
tree
observation
:
tree
observation_config
:
observation_config
:
max_depth
:
2
max_depth
:
2
shortest_path_max_depth
:
30
shortest_path_max_depth
:
30
regenerate_rail_on_reset
:
True
regenerate_rail_on_reset
:
True
regenerate_schedule_on_reset
:
True
regenerate_schedule_on_reset
:
True
render
:
False
render
:
False
model
:
model
:
fcnet_activation
:
relu
fcnet_activation
:
relu
fcnet_hiddens
:
[
256
,
256
]
fcnet_hiddens
:
[
256
,
256
]
vf_share_layers
:
True
# False
vf_share_layers
:
True
# False
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment