sisl / PyroRL

An RL environment made for wildfire evacuation.
https://sisl.github.io/PyroRL/
MIT License
12 stars 0 forks source link

Map Generation Functions #6

Closed joey-obrien closed 3 months ago

joey-obrien commented 3 months ago

Created functions for map generation. These include generate_map_info, save_map_info, and load_map_info. save_map_info is called within generate_map_info if the argument save_map is set to True (it is true by default). In save map info, a new directory is created in the user's current working directory called "pyrorl_map_info" where information for different map generations are stored. Each generation is stored in its own subdirectory which is named based off of the map size and percent of the map that is populated. If there are multiple generations where this information is the same, the index at the end is increased for each generation for distinguishing purposes. Within the subdirectory are pickle files for the paths array, populated areas array, paths to pops array, and a list containing the numbers of rows, columns, and percent of the map that is populated. To load in this information, the path to the subdirectory is passed into load_map_info which returns all the information that was saved in save_map_info.

codecov-commenter commented 3 months ago

Welcome to Codecov :tada:

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

Thanks for integrating Codecov - We've got you covered :open_umbrella: