Flatland issueshttps://gitlab.aicrowd.com/flatland/flatland/-/issues2019-10-22T19:33:27Zhttps://gitlab.aicrowd.com/flatland/flatland/-/issues/112Tkinter based renderer fails on jupyter running remotely2019-10-22T19:33:27ZMarc-OliverTkinter based renderer fails on jupyter running remotelyHi,
when executing the flatland rendering inside a jupyter notebook that is running on a *remote host*,
the import of RenderRool fails with the following error message:
```
--------------------------------------------------------------...Hi,
when executing the flatland rendering inside a jupyter notebook that is running on a *remote host*,
the import of RenderRool fails with the following error message:
```
---------------------------------------------------------------------------
TclError Traceback (most recent call last)
<ipython-input-1-942983ccfa4e> in <module>
5 from flatland.envs.observations import TreeObsForRailEnv
6 from flatland.envs.rail_env import RailEnv
----> 7 from flatland.utils.rendertools import RenderTool
/opt/conda/lib/python3.7/site-packages/flatland/utils/rendertools.py in <module>
7 from recordtype import recordtype
8
----> 9 from flatland.utils.graphics_pil import PILGL, PILSVG
10
11
/opt/conda/lib/python3.7/site-packages/flatland/utils/graphics_pil.py in <module>
33
34
---> 35 class PILGL(GraphicsLayer):
36 # tk.Tk() must be a singleton!
37 # https://stackoverflow.com/questions/26097811/image-pyimage2-doesnt-exist
/opt/conda/lib/python3.7/site-packages/flatland/utils/graphics_pil.py in PILGL()
36 # tk.Tk() must be a singleton!
37 # https://stackoverflow.com/questions/26097811/image-pyimage2-doesnt-exist
---> 38 window = tk.Tk()
39
40 def __init__(self, width, height, jupyter=False):
/opt/conda/lib/python3.7/tkinter/__init__.py in __init__(self, screenName, baseName, className, useTk, sync, use)
2021 baseName = baseName + ext
2022 interactive = 0
-> 2023 self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use)
2024 if useTk:
2025 self._loadtk()
TclError: no display name and no $DISPLAY environment variable
```
The problem is Tkinter which depends on the presence of a local display which, in case of a server-based installation is not available.v3hagrid67hagrid67https://gitlab.aicrowd.com/flatland/flatland/-/issues/83unification of coding style2019-10-22T18:59:52ZChristian Eichenbergerunification of coding style**General rules we adhere:**
* names: snake_case, class names: CamelCase
* all names: it should make sense,
* length of names: what is detail that can be left away, make it as succinct as possible (for instance, `envs.generators.rail_fr...**General rules we adhere:**
* names: snake_case, class names: CamelCase
* all names: it should make sense,
* length of names: what is detail that can be left away, make it as succinct as possible (for instance, `envs.generators.rail_from_manual_specifications_generator` is too long)
* comment: if the idead cannot be read from the structure of the code, then write a comment.
See https://realpython.com/python-pep8/
**Procedure**
* Everyone goes through their code, re-read it and try to understand (good luck)... improve rea
* Read other people's code and give feedback, you may add items to the following list.
**Issues List**
* [ ] @mohanty shorten `envs.generators.rail_from_manual_specifications_generator`v3mohantymohantyhttps://gitlab.aicrowd.com/flatland/flatland/-/issues/82Add a "How do I .... ?" section to the documentation2020-06-11T20:43:52ZmohantyAdd a "How do I .... ?" section to the documentationThe goal of a `How do I...?` section in the documentation is to aggregate simple code snippets for a series of common tasks of different complexity, for example : how do I load and interact with an environment pickle file. How do I draw ...The goal of a `How do I...?` section in the documentation is to aggregate simple code snippets for a series of common tasks of different complexity, for example : how do I load and interact with an environment pickle file. How do I draw my own env, etc.
Its a non exhaustive list, but we can get started with some, and user contributions will enrich it with time !
If you have some of such "How do I....?" tasks in mind, please include them in the comments.v3mohantymohantyhttps://gitlab.aicrowd.com/flatland/flatland/-/issues/208Departure and arrival times2019-11-15T19:10:18ZErik NygrenDeparture and arrival times**Story**
Introduce the following schedule parameters for each agent:
- Departure Time: Int latest time an agent should depart from deprature location
- Departure Location: Location where the agent enters the level
- Target Time: Lates...**Story**
Introduce the following schedule parameters for each agent:
- Departure Time: Int latest time an agent should depart from deprature location
- Departure Location: Location where the agent enters the level
- Target Time: Latest arrival time (used only later)
- Target Location: Location where agent leaves the level
These values should be provided by the schedule generator. Maybe it makes sense to store them in the agent itself
**Acceptance Criteria**
- 1v3Christian EichenbergerChristian Eichenbergerhttps://gitlab.aicrowd.com/flatland/flatland/-/issues/206reset() should take initial number of agents and not that of last generated rail2019-11-06T15:55:49ZErik Nygrenreset() should take initial number of agents and not that of last generated railIf we change number of agents, then a reset with new rail generation should try to reset the number of agents to the initial number of agents.If we change number of agents, then a reset with new rail generation should try to reset the number of agents to the initial number of agents.v3https://gitlab.aicrowd.com/flatland/flatland/-/issues/200Refactoring: move everything pertaining to RailEnv in separate submodule2020-06-11T20:34:32ZChristian EichenbergerRefactoring: move everything pertaining to RailEnv in separate submodulev3https://gitlab.aicrowd.com/flatland/flatland/-/issues/193Provide Information for to make reward shaping2019-10-22T19:34:21ZErik NygrenProvide Information for to make reward shapingI think the environment should return a dict with all (reward) relevant information, such as
agent tried to perform an illeagal move
agent tried to move to an occupied cell
agent reached goal
I think it would also be useful to provide s...I think the environment should return a dict with all (reward) relevant information, such as
agent tried to perform an illeagal move
agent tried to move to an occupied cell
agent reached goal
I think it would also be useful to provide some of the checks in env.step() as functions. for example
def is_valid_move(agent, action) --> boolv3https://gitlab.aicrowd.com/flatland/flatland/-/issues/187Running `example/simple_example_1/2/3.py` render issue on Linux2020-06-11T20:49:08ZErik NygrenRunning `example/simple_example_1/2/3.py` render issue on LinuxWhen running the example file simple_example_1/2/3.py in the example folder, the rendered popup window is just blank, while running the 'flatland_2_0_example.py` is showing the generated railway and animation correctly.
On Windows machi...When running the example file simple_example_1/2/3.py in the example folder, the rendered popup window is just blank, while running the 'flatland_2_0_example.py` is showing the generated railway and animation correctly.
On Windows machine, everything seems to be fine.
Tried to play with the gl parameter, but no luck.
OS: Ubuntu 18.04
Flatland: newest from git.v3MasterScratMasterScrat2019-10-23https://gitlab.aicrowd.com/flatland/flatland/-/issues/184Introduce GridPosition based on Vec2DInt to replace Tuple[int,int], type hint...2019-11-06T15:55:48ZChristian EichenbergerIntroduce GridPosition based on Vec2DInt to replace Tuple[int,int], type hints for all rc_pos / rcPos / rc etc.v3https://gitlab.aicrowd.com/flatland/flatland/-/issues/183get rid of old_position etc. in RailEnv.2019-11-06T15:55:48ZChristian Eichenbergerget rid of old_position etc. in RailEnv.v3https://gitlab.aicrowd.com/flatland/flatland/-/issues/181Refactoring: we should understand every line in step() and reset() function i...2019-11-06T15:14:14ZChristian EichenbergerRefactoring: we should understand every line in step() and reset() function in RailEnv!v3https://gitlab.aicrowd.com/flatland/flatland/-/issues/180Refactoring: realize structural simplifications of FLATland2019-11-06T15:20:47ZChristian EichenbergerRefactoring: realize structural simplifications of FLATland![image](/uploads/e9edc8fcaa719653e29e69c14f4a87a9/image.png)
http://flatland-rl-docs.s3-website.eu-central-1.amazonaws.com/specifications/specifications.html![image](/uploads/e9edc8fcaa719653e29e69c14f4a87a9/image.png)
http://flatland-rl-docs.s3-website.eu-central-1.amazonaws.com/specifications/specifications.htmlv3MasterScratMasterScrathttps://gitlab.aicrowd.com/flatland/flatland/-/issues/172Refactoring: put 'self.rail_generator(..)' into 'if regen_rail or self.rail i...2019-11-06T15:55:48ZChristian EichenbergerRefactoring: put 'self.rail_generator(..)' into 'if regen_rail or self.rail is None' condition in RailEnv.step()v3https://gitlab.aicrowd.com/flatland/flatland/-/issues/158Training in Flatland 2.0 Documentation2019-10-16T12:52:04ZErik NygrenTraining in Flatland 2.0 DocumentationWrite document on how to train agents properly in new environment.
Here we need to show how to respect multi speed and malfunctions. These two new features mean that agents cannot act at all time steps. Thus during training we need to re...Write document on how to train agents properly in new environment.
Here we need to show how to respect multi speed and malfunctions. These two new features mean that agents cannot act at all time steps. Thus during training we need to respect this.v3https://gitlab.aicrowd.com/flatland/flatland/-/issues/150toy rendering of graph with d3js force layout2019-10-22T18:50:36Zhagrid67toy rendering of graph with d3js force layoutv3hagrid67hagrid67https://gitlab.aicrowd.com/flatland/flatland/-/issues/148Refactoring: Incoming Transition Function for Rail env.2019-11-06T15:55:48ZErik NygrenRefactoring: Incoming Transition Function for Rail env.We need:
- Get incoming transitions for a cellWe need:
- Get incoming transitions for a cellv3https://gitlab.aicrowd.com/flatland/flatland/-/issues/137Tkinter2019-10-22T19:33:23ZErik NygrenTkinterGet Tk work for Notebooks or anywhere where there is an xServer.Get Tk work for Notebooks or anywhere where there is an xServer.v3adrian_egliadrian_eglihttps://gitlab.aicrowd.com/flatland/flatland/-/issues/110Tests for rendering2019-10-22T19:10:51ZErik NygrenTests for renderingCome up with a clever way to write tests for issues. Share with the teamCome up with a clever way to write tests for issues. Share with the teamv3mohantymohantyhttps://gitlab.aicrowd.com/flatland/flatland/-/issues/101continuous integration for baselines2019-10-22T18:55:41ZChristian Eichenbergercontinuous integration for baselines* [ ] setup ci runner for baselines
* [ ] install torch via conda in https://gitlab.aicrowd.com/flatland/baselines/blob/master/tox.ini#L25, remove from https://gitlab.aicrowd.com/flatland/baselines/blob/master/requirements_torch_training...* [ ] setup ci runner for baselines
* [ ] install torch via conda in https://gitlab.aicrowd.com/flatland/baselines/blob/master/tox.ini#L25, remove from https://gitlab.aicrowd.com/flatland/baselines/blob/master/requirements_torch_training.txt#L1
* [ ] depend on a released version of flatland: https://gitlab.aicrowd.com/flatland/baselines/blob/master/requirements_torch_training.txt#L4
* [ ] add .gitlab-ci.yml to baselines: for inspiration: https://gitlab.aicrowd.com/flatland/flatland/compare/master...42-run-baselines-in-civ3Christian EichenbergerChristian Eichenbergerhttps://gitlab.aicrowd.com/flatland/flatland/-/issues/100anaconda/pip repo Windows, not exclude py37, unification conda/pip dependencies2019-10-22T19:32:09ZChristian Eichenbergeranaconda/pip repo Windows, not exclude py37, unification conda/pip dependencies* [ ] setup Anaconda/pip repository for Windows and add the pycairo wheels from https://www.lfd.uci.edu/~gohlke/pythonlibs/, see https://gitlab.aicrowd.com/flatland/flatland/blob/461c5cfe1aff9dd93df580cf99f162bd3036a484/setup.py
* [ ] ge...* [ ] setup Anaconda/pip repository for Windows and add the pycairo wheels from https://www.lfd.uci.edu/~gohlke/pythonlibs/, see https://gitlab.aicrowd.com/flatland/flatland/blob/461c5cfe1aff9dd93df580cf99f162bd3036a484/setup.py
* [ ] get rid of conda-only dependencies?
* [ ] refer in tox.ini so py37 runs also under Windowsv3