{"id":13948329,"url":"https://github.com/mitrefireline/simfire","last_synced_at":"2025-04-09T08:08:37.900Z","repository":{"id":157875720,"uuid":"566600852","full_name":"mitrefireline/simfire","owner":"mitrefireline","description":"An open-source wildfire simulator written in Python and meant to be used to train reinforcement learning (RL) agents.","archived":false,"fork":false,"pushed_at":"2024-11-19T22:42:06.000Z","size":35779,"stargazers_count":38,"open_issues_count":7,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-29T23:04:16.570Z","etag":null,"topics":["python","reinforcement-learning","reinforcement-learning-environments","simulation","simulator","wildfire"],"latest_commit_sha":null,"homepage":"https://mitrefireline.github.io/simfire/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mitrefireline.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-11-16T02:27:31.000Z","updated_at":"2025-03-26T10:16:04.000Z","dependencies_parsed_at":"2023-09-22T06:49:45.142Z","dependency_job_id":"81ba8453-aff2-42a8-b905-4b1f533ef489","html_url":"https://github.com/mitrefireline/simfire","commit_stats":{"total_commits":783,"total_committers":10,"mean_commits":78.3,"dds":0.5019157088122606,"last_synced_commit":"04905b19fe8c10dc08d64faddd00303e0561bb66"},"previous_names":[],"tags_count":63,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mitrefireline%2Fsimfire","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mitrefireline%2Fsimfire/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mitrefireline%2Fsimfire/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mitrefireline%2Fsimfire/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mitrefireline","download_url":"https://codeload.github.com/mitrefireline/simfire/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247276162,"owners_count":20912288,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["python","reinforcement-learning","reinforcement-learning-environments","simulation","simulator","wildfire"],"created_at":"2024-08-08T05:01:20.652Z","updated_at":"2025-04-09T08:08:37.883Z","avatar_url":"https://github.com/mitrefireline.png","language":"Python","funding_links":[],"categories":["Biosphere"],"sub_categories":["Wildfire"],"readme":"# SimFire Fire Simulator\n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"https://raw.githubusercontent.com/mitrefireline/simfire/main/assets/icons/rl_logo_horizontal.png\"\u003e\n\u003c/p\u003e\n\n## Introduction\n\nSimFire uses [PyGame](https://www.pygame.org/wiki/about) to display and simulate different fire spread models, including the Rothermel Surface fire spread model described in [this](https://www.fs.usda.gov/rm/pubs_series/rmrs/gtr/rmrs_gtr371.pdf) paper.\n\nFor more comprehensive documentation, go to our [docs page](https://mitrefireline.github.io/simfire).\n\nThis repository is part of the MITRE Fireline project and is associated with both [BurnMD](https://github.com/mitrefireline/burnmd) and [SimHarness](https://github.com/mitrefireline/simharness). BurnMD is used in the `HistoricalDataLayer` to provide historical fire data for the simulation. SimHarness is a reinforcement learning training harness that uses this simulator to train agents to fight fires.\n\n## Running the Simulation\n\u003cfigure\u003e\n    \u003cp align=\"center\"\u003e\n        \u003cimg src=\"https://raw.githubusercontent.com/mitrefireline/simfire/main/assets/gifs/simulation_33.06N_116.58W.gif\" width=\"225\" /\u003e\n        \u003cimg src=\"https://raw.githubusercontent.com/mitrefireline/simfire/main/assets/gifs/simulation_39.67N_119.80W.gif\" width=\"225\" /\u003e\n        \u003cbr\u003e\u003cb\u003eLeft: Fire simulated near Julian, CA. Right: Fire simulated near Reno, NV.\n        \u003cbr\u003eBoth fires have winds from the east at 20mph\u003cb\u003e\n    \u003c/p\u003e\n \u003c/figure\u003e\n\nInstall `simfire` by following the [installation instructions](#installing-the-package). Then run the `run_game.py` script:\n\n```shell\npython run_game.py\n```\n\n### Running as a Python Module\n\n```python\nfrom simfire.sim.simulation import FireSimulation\nfrom simfire.utils.config import Config\n\nconfig = Config(\"configs/operational_config.yml\")\nsim = FireSimulation(config)\n\n# Run a 1 hour simulation\nsim.run(\"1h\")\n\n# Run the same simulation for 30 more minutes\nsim.run(\"30m\")\n\n# Render the next 2 hours of simulation\nsim.rendering = True\nsim.run(\"2h\")\n\n# Now save a GIF and fire spread graph from the last 2 hours of simulation\nsim.save_gif()\nsim.save_spread_graph()\n# Saved to the location specified in the config: simulation.sf_home\n\n# Update agents for display\n# (x, y, agent_id)\nagent_0 = (5, 5, 0)\nagent_1 = (5, 5, 1)\n\nagents = [agent_0, agent_1]\n\n# Create the agents on the display\nsim.update_agent_positions(agents)\n\n# Loop through to move agents\nfor i in range(5):\n    agent_0 = (5 + i, 5 + i, 0)\n    agent_1 = (5 + i, 5 + i, 1)\n    # Update the agent positions on the simulation\n    sim.update_agent_positions([agent_0, agent_1])\n    # Run for 1 update step\n    sim.run(1)\n\n# Turn off rendering so the display disappears and the simulation continues to run in the\n# background\nsim.rendering = False\n```\n\n## Installing the Package\n\n```shell\npip install simfire\n```\n\n## Contributing\n\nFor contributing, see the [Contribution Page](https://mitrefireline.github.io/simfire/contributing.html) in our [docs](https://mitrefireline.github.io/simfire).\n\n## Citation\n\nTo cite this software, use the “Cite this repository” link built into GitHub on the right.\n\n### Copyright\nCopyright ©2023 The MITRE Corporation. ALL RIGHTS RESERVED. Approved for Public Release; Distribution Unlimited. Public Release Case Number 22-3261.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmitrefireline%2Fsimfire","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmitrefireline%2Fsimfire","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmitrefireline%2Fsimfire/lists"}