Flatland issueshttps://gitlab.aicrowd.com/flatland/flatland/-/issues2019-09-25T09:06:46Zhttps://gitlab.aicrowd.com/flatland/flatland/-/issues/171Refactoring: move distance_map generation from obs_builder to RailEnv2019-09-25T09:06:46ZChristian EichenbergerRefactoring: move distance_map generation from obs_builder to RailEnvThe distance_map is conceptually part of the RailEnv and not of ObservationBuilds. Predictors and ObservationBuilds should be able to access the distance_map in the RailEnv. The distance_map should only be compute if necessary, though (a...The distance_map is conceptually part of the RailEnv and not of ObservationBuilds. Predictors and ObservationBuilds should be able to access the distance_map in the RailEnv. The distance_map should only be compute if necessary, though (at most once per step()).v2Christian BaumbergerChristian Baumbergerhttps://gitlab.aicrowd.com/flatland/flatland/-/issues/170Save episode timesteps for Javascript renderer2019-11-06T16:33:24Zhagrid67Save episode timesteps for Javascript renderer- provide a flag in the RailEnv constructor to store the episode information
- Record agents' position and orientation, timestep by timestep, in the env
- include the agent positions and orientations in the msgpack serialized env, under...- provide a flag in the RailEnv constructor to store the episode information
- Record agents' position and orientation, timestep by timestep, in the env
- include the agent positions and orientations in the msgpack serialized env, under an episode key (maybe store an array of episodes)
So create a new key "episodes" in the root dict, and
episodes--*episode--*timestep--*agent-[row, col, orientation]
where A--*B means A contains many Bs. agent here just means a tuple of (int row, int col, int orientation)
alternatively, episodes has a list of episodes,
each episode is a 3d-array of with dimensions timesteps x agents x [row, col, orientation]v3hagrid67hagrid67https://gitlab.aicrowd.com/flatland/flatland/-/issues/169Enhance sparse_rail_generator2019-09-20T08:55:02ZErik NygrenEnhance sparse_rail_generatorAs discussed in the weekly call lets enhance the current `sparese_rail_generator`. The idea is as follows:
Enahnce single node city modules to multi-node cities.
Idea 1:
Each city has a center node and at each boarder of the city Nort...As discussed in the weekly call lets enhance the current `sparese_rail_generator`. The idea is as follows:
Enahnce single node city modules to multi-node cities.
Idea 1:
Each city has a center node and at each boarder of the city North/East/South/West it has one or ceveral nodes that correspond to connections to other cities.
The structure within the city boundaries is either:
- generated through some random process that makes realistic train stations
- or we use templates generated by adrian.
Idea 2:
Same as above, but we don't orient the outer city connections accordin to directions but just randomly distirbute them
Level Generation:
1. Distirbute center city nodes and intersection across the map
2. Generate city boarders and add connecting nodes of cities and intersection
3. Connect cities and intersections together
4. generatre inner city structures (maybe also for intersection)
1. Through random mutli node process
2. Through templates
5. Place trainstations within cities and store city a -> city b connections for schedule
The image below shows a sketch of the idea.
![Sketch](https://i.imgur.com/pjmaUBi.png![level_creation](/uploads/8bff6b40ec9370cc63aa55e9ea4a4ace/level_creation.png))v2adrian_egliadrian_eglihttps://gitlab.aicrowd.com/flatland/flatland/-/issues/168Enhance test_multispeed_* with assertions on penalties2019-09-20T10:39:40ZChristian EichenbergerEnhance test_multispeed_* with assertions on penaltiesv2Christian EichenbergerChristian Eichenbergerhttps://gitlab.aicrowd.com/flatland/flatland/-/issues/167Check whether action is correctly applied in malfunction2019-09-05T15:33:25ZChristian EichenbergerCheck whether action is correctly applied in malfunctionIf the agent enters malfunction state right when it has entered a new cell (fraction \approx 0), verify that the action given to the environment is correctly applied after the malfunction is over.
* [x] Test
* [x] Bugfix if necessary.If the agent enters malfunction state right when it has entered a new cell (fraction \approx 0), verify that the action given to the environment is correctly applied after the malfunction is over.
* [x] Test
* [x] Bugfix if necessary.v2Christian EichenbergerChristian Eichenbergerhttps://gitlab.aicrowd.com/flatland/flatland/-/issues/164Sparse level generator stability2019-09-05T15:33:26ZErik NygrenSparse level generator stability- Improve stability of `sparse_rail_generator` by handling the while loops better or replacing them.
- Improve error handling such that training will not fail when level cannot be generated.
@christian\_eichenberger can you give this ...- Improve stability of `sparse_rail_generator` by handling the while loops better or replacing them.
- Improve error handling such that training will not fail when level cannot be generated.
@christian\_eichenberger can you give this a go? I'm happy to support you any way i can.v2Christian EichenbergerChristian Eichenbergerhttps://gitlab.aicrowd.com/flatland/flatland/-/issues/163Test for Multi-Speed2019-09-20T10:39:40ZErik NygrenTest for Multi-SpeedWe need to write good tests to guarantee correct working of different speeds:
- Test different kind of speeds on straight track
- Check that travel times are consistent
- Check that this works well with stochastic events (see #167 )We need to write good tests to guarantee correct working of different speeds:
- Test different kind of speeds on straight track
- Check that travel times are consistent
- Check that this works well with stochastic events (see #167 )v2Christian EichenbergerChristian Eichenbergerhttps://gitlab.aicrowd.com/flatland/flatland/-/issues/162Write and improve on stochasticity tests2019-09-05T15:33:26ZErik NygrenWrite and improve on stochasticity testsHere are some ideas to add to the stochasticity tests:
- Agents_stopping_in_middle_of_cells_and_resuming
- Agents stopping at start of cell and then staying stopped (Stop action chosen)
- Stopping rate (Already implemented)Here are some ideas to add to the stochasticity tests:
- Agents_stopping_in_middle_of_cells_and_resuming
- Agents stopping at start of cell and then staying stopped (Stop action chosen)
- Stopping rate (Already implemented)v2Christian EichenbergerChristian Eichenbergerhttps://gitlab.aicrowd.com/flatland/flatland/-/issues/161Observation documentation flatland 2.02019-09-09T23:10:29ZErik NygrenObservation documentation flatland 2.0Document what changed in the global observation and the tree observation.
Give participants a good feeling about how observation builder work and how they should implement their own.
Build upon the documentation that is already available.Document what changed in the global observation and the tree observation.
Give participants a good feeling about how observation builder work and how they should implement their own.
Build upon the documentation that is already available.v2Christian EichenbergerChristian Eichenbergerhttps://gitlab.aicrowd.com/flatland/flatland/-/issues/160Predictor function documentation2019-09-10T10:06:37ZErik NygrenPredictor function documentationDocument how the predictor works and what has changed. Help participants get a good feeling about how they can implement their own predictors.Document how the predictor works and what has changed. Help participants get a good feeling about how they can implement their own predictors.v2Christian EichenbergerChristian Eichenbergerhttps://gitlab.aicrowd.com/flatland/flatland/-/issues/159Documentation about new INFO2019-09-09T23:10:29ZErik NygrenDocumentation about new INFODocument the new info features returned by the `env.step()` function.Document the new info features returned by the `env.step()` function.v2Christian EichenbergerChristian Eichenbergerhttps://gitlab.aicrowd.com/flatland/flatland/-/issues/157Render malfunctions2019-11-06T16:33:24ZErik NygrenRender malfunctionsIndicate which agents are currently malfunctioning. Maybe render a red cross or exclamation mark or similar at the location of malfunctioning agents.
Lower priority.Indicate which agents are currently malfunctioning. Maybe render a red cross or exclamation mark or similar at the location of malfunctioning agents.
Lower priority.v3hagrid67hagrid67https://gitlab.aicrowd.com/flatland/flatland/-/issues/155Return info about current state of agents2019-09-04T12:48:56ZErik NygrenReturn info about current state of agents`env.step()` function should return a list of agent states. We could fill it with their current malfunction value (time left in malfunction) If agents are ok, return a zero.
Other suggestions welcome.`env.step()` function should return a list of agent states. We could fill it with their current malfunction value (time left in malfunction) If agents are ok, return a zero.
Other suggestions welcome.v2Christian EichenbergerChristian Eichenbergerhttps://gitlab.aicrowd.com/flatland/flatland/-/issues/151ImportError: cannot import name 'get_rnd_agents_pos_tgt_dir_on_rail'2019-10-16T13:49:11Zlezwon_castelinoImportError: cannot import name 'get_rnd_agents_pos_tgt_dir_on_rail'The master build throws the following error when attempting to run the training:
```
from flatland.envs.generators import complex_rail_generator
File "/anaconda3/envs/flatland-rl/lib/python3.6/site-packages/flatland_rl-0.3.10-py3.6.eg...The master build throws the following error when attempting to run the training:
```
from flatland.envs.generators import complex_rail_generator
File "/anaconda3/envs/flatland-rl/lib/python3.6/site-packages/flatland_rl-0.3.10-py3.6.egg/flatland/envs/generators.py", line 10, in <module>
from flatland.envs.grid4_generators_utils import get_rnd_agents_pos_tgt_dir_on_rail
ImportError: cannot import name 'get_rnd_agents_pos_tgt_dir_on_rail'
```v3https://gitlab.aicrowd.com/flatland/flatland/-/issues/149cannot find 'dot': Command not found on running make docs2019-09-26T13:11:42ZRohanChackocannot find 'dot': Command not found on running make docs`make docs` returns `make: sphinx-apidoc: Command not found` error. Installed necessary packages using the provided commands in README.
OS: Ubuntu 16.04 LTS
Python version: 3.6.7
On installing packages from `requirements_continuous_in...`make docs` returns `make: sphinx-apidoc: Command not found` error. Installed necessary packages using the provided commands in README.
OS: Ubuntu 16.04 LTS
Python version: 3.6.7
On installing packages from `requirements_continuous_integration.txt`, the following error occurs:
```
RemovedInSphinx30Warning: To modify script_files in the theme is deprecated. Please insert a <script> tag directly in your theme instead.
{{ super() }}
make[1]: Leaving directory '/home/rohan/AICrowd/flatland/docs'
pydeps --no-config --noshow flatland -o docs/_build/html/flatland.svg
ERROR:
cannot find 'dot'
pydeps calls dot (from graphviz) to create svg diagrams,
please make sure that the dot executable is available
on your path.
Makefile:70: recipe for target 'docs' failed
make: *** [docs] Error 1
```
Please take a look at this.v3Christian EichenbergerChristian Eichenbergerhttps://gitlab.aicrowd.com/flatland/flatland/-/issues/146render agent index/handle2019-09-03T02:18:22ZErik Nygrenrender agent index/handleindicate which agent is which in the rendering...indicate which agent is which in the rendering...v2hagrid67hagrid67https://gitlab.aicrowd.com/flatland/flatland/-/issues/144Can't run flatland-demo on Mac2019-09-26T13:11:42Zharshrai926Can't run flatland-demo on Mac```shell
(flatland-rl) Harshs-MacBook-Pro:flatland harshrai$ flatland-demo
2019-08-12 22:09:41.267 python[11311:1007088] CGSTrackingRegionSetIsEnabled returned CG error 268435459
2019-08-12 22:09:41.267 python[11311:1007088] CGSTrackingR...```shell
(flatland-rl) Harshs-MacBook-Pro:flatland harshrai$ flatland-demo
2019-08-12 22:09:41.267 python[11311:1007088] CGSTrackingRegionSetIsEnabled returned CG error 268435459
2019-08-12 22:09:41.267 python[11311:1007088] CGSTrackingRegionSetIsEnabled returned CG error 268435459
2019-08-12 22:09:41.267 python[11311:1007088] CGSTrackingRegionSetIsEnabled returned CG error 268435459
2019-08-12 22:09:41.267 python[11311:1007088] CGSTrackingRegionSetIsEnabled returned CG error 268435459
2019-08-12 22:09:41.267 python[11311:1007088] CGSTrackingRegionSetIsEnabled returned CG error 268435459
2019-08-12 22:09:41.267 python[11311:1007088] CGSTrackingRegionSetIsEnabled returned CG error 268435459
2019-08-12 22:09:41.267 python[11311:1007088] CGSTrackingRegionSetIsEnabled returned CG error 268435459
2019-08-12 22:09:41.267 python[11311:1007088] CGSTrackingRegionSetIsEnabled returned CG error 268435459
2019-08-12 22:09:41.267 python[11311:1007088] CGSTrackingRegionSetIsEnabled returned CG error 268435459
2019-08-12 22:09:41.267 python[11311:1007088] CGSTrackingRegionSetIsEnabled returned CG error 268435459
2019-08-12 22:09:41.267 python[11311:1007088] CGSTrackingRegionSetIsEnabled returned CG error 268435459
2019-08-12 22:09:41.267 python[11311:1007088] CGSTrackingRegionSetIsEnabled returned CG error 268435459
2019-08-12 22:09:41.267 python[11311:1007088] CGSTrackingRegionSetIsEnabled returned CG error 268435459
2019-08-12 22:09:41.267 python[11311:1007088] CGSTrackingRegionSetIsEnabled returned CG error 268435459
2019-08-12 22:09:41.268 python[11311:1007088] CGSTrackingRegionSetIsEnabled returned CG error 268435459
2019-08-12 22:09:41.268 python[11311:1007088] CGSTrackingRegionSetIsEnabled returned CG error 268435459
[Restored 12-Aug-2019 at 10:09:58 PM]
Last login: Mon Aug 12 22:09:50 on console
Restored session: Mon Aug 12 22:09:41 IST 2019
(base) Harshs-MacBook-Pro:flatland harshrai$
```v3https://gitlab.aicrowd.com/flatland/flatland/-/issues/141Different Agent classes2019-08-29T14:02:24ZErik NygrenDifferent Agent classesUpdate environment to support multiple agent classes.
This information should be available to the observation builders
n classes, their speed and their relative weight.Update environment to support multiple agent classes.
This information should be available to the observation builders
n classes, their speed and their relative weight.v2Christian EichenbergerChristian Eichenbergerhttps://gitlab.aicrowd.com/flatland/flatland/-/issues/117Implement remote evaluation service2019-09-26T13:11:41ZmohantyImplement remote evaluation servicev3mohantymohantyhttps://gitlab.aicrowd.com/flatland/flatland/-/issues/109`complex_rail_generator` generates invalid start position for trains on `env....2019-09-26T13:11:41Zstefan_otte`complex_rail_generator` generates invalid start position for trains on `env.reset()`The first map generated by `complex_rail_generator` generates valid starting positions for trains, but resetting the env generates invalid starting positions for the trains, i.e. the trains are not on the tracks.
Code to reproduce (in j...The first map generated by `complex_rail_generator` generates valid starting positions for trains, but resetting the env generates invalid starting positions for the trains, i.e. the trains are not on the tracks.
Code to reproduce (in jupyter)
```python
import datetime
from PIL import Image
import matplotlib.pyplot as plt
%matplotlib inline
from flatland.envs.generators import (
complex_rail_generator,
random_rail_generator,
empty_rail_generator,
)
from flatland.envs.rail_env import RailEnv
from flatland.utils.rendertools import RenderTool
number_of_agents = 2
width, height = 8, 8
env = RailEnv(
width=width,
height=height,
rail_generator=complex_rail_generator(
nr_start_goal=6, nr_extra=30, min_dist=10, max_dist=99999, seed=0
),
number_of_agents=number_of_agents,
)
renderer = RenderTool(env)
# reset generates invalid starting positions
for _ in range(3):
start_ts = datetime.datetime.now()
env.reset()
renderer.renderEnv(show=False)
display(Image.fromarray(renderer.gl.getImage()))
print(f"Generating map took {datetime.datetime.now() - start_ts}")
```
![image](/uploads/a81d25dcac4f4b077b9e5e830cb5b346/image.png)
Tested with flatland 0.2.v3