RailEnv Persistence - store SparseRailGenerator agents_hints like num_cities
Sparse_rail_generator returns a key agents_hints
in its second return value, a dict known as "optionals" in RailEnv.
env.reset() passes the optionals["agents_hints"] to the schedule_generator. optionals["agent_hints"]["num_cities"] is used in the formula for the max_episode_steps calculated by sparse_schedule_generator.
However when the env is persisted this information is currently lost.
The latter versions of persistence.py
do save the max_step_size in its own key in the pickled env_dict.
This is enough for the schedule_from_file schedule generator.
(Earlier versions left this out and result in a max_steps of zero; this is affecting the 97 IL envs)
The sparse rail info may be useful for explaining env difficulty.
How to get hold of the hints and save them is not immediately obvious. It could form part of a re-factoring of the generators.