@@ -53,3 +53,79 @@ The environments vary in size and number of agents as well as malfunction parame
-`(x_dim, y_dim) <= (150, 150)`
-`n_agents <= 250` (this might be updated)
-`malfunction rates` this is currently being refactored
### How can I experiment locally before submitting?
You can follow the instruction in the [starter kit](https://github.com/AIcrowd/flatland-challenge-starter-kit) and use the [provided example files](https://www.aicrowd.com/challenges/flatland-challenge/dataset_files) to run your tests locally.
If you want to generate your own test instances to test your solution you can either head over to the [torch baselines](https://gitlab.aicrowd.com/flatland/baselines/tree/master/torch_training) and get inspired by the setup there.
Or you can generate your own test cases by using the same generators as used by the submission test set.
In order to generate the appropriate levels you need to import the `malfunction_generator`, `rail_generator` and `schedule_generator` as follows:
```
from flatland.envs.malfunction_generators import malfunction_from_params
from flatland.envs.rail_env import RailEnv
from flatland.envs.rail_generators import sparse_rail_generator
from flatland.envs.schedule_generators import sparse_schedule_generator
```
Then you can simply generate levels by instantiating:
```python
stochastic_data={'malfunction_rate':8000,# Rate of malfunction occurence of single agent
'min_duration':15,# Minimal duration of malfunction
'max_duration':50# Max duration of malfunction
}
# Custom observation builder without predictor
observation_builder=YourObservationBuilder()
width=16*7# With of map
height=9*7# Height of map
nr_trains=50# Number of trains that have an assigned task in the env
cities_in_map=20# Number of cities where agents can start or end
seed=14# Random seed
grid_distribution_of_cities=False# Type of city distribution, if False cities are randomly placed
max_rails_between_cities=2# Max number of tracks allowed between cities. This is number of entry point to a city
max_rail_in_cities=6# Max number of parallel tracks within a city, representing a realistic trainstation
@@ -30,7 +30,7 @@ Each agent is an object and contains the following information:
- The attribute `'transition_action_on_cellexit'` contains the information about the action that will be performed at the exit of the cell. Due to speeds smaller than 1. agents have to take several steps within a cell. We however only allow an action to be chosen at cell entry.
-`malfunction_data = attrib(default=Factory(lambda: dict({'malfunction': 0, 'malfunction_rate': 0, 'next_malfunction': 0, 'nr_malfunctions': 0,'moving_before_malfunction': False})))`: Contains all information relevant for agent malfunctions:
- The attribute `'malfunction` indicates if the agent is currently broken. If the value is larger than `0` the agent is broken. The integer value represents the number of `env.step()` calls the agent will still be broken.
- The attribute `'next_malfunction'` will be REMOVED as it serves no purpose anymore, malfunctions are now generated by a poisson process.
- The attribute `'next_malfunction'` was REMOVED as it serves no purpose anymore, malfunctions are now generated by a poisson process.
- The attribute `'nr_malfunctions'` is a counter that keeps track of the number of malfunctions a specific agent has had.
- The attribute `'moving_before_malfunction'` is an internal parameter used to restart agents that were moving automatically after the malfunction is fixed.
-`status = attrib(default=RailAgentStatus.READY_TO_DEPART, type=RailAgentStatus)`: The status of the agent explains what the agent is currently doing. It can be in either one of these states: