SimFire
An open-source wildfire simulator written in Python and meant to be used to train reinforcement learning agents.
https://github.com/mitrefireline/simfire
Category: Biosphere
Sub Category: Wildfire
Keywords
python reinforcement-learning reinforcement-learning-environments simulation simulator wildfire
Keywords from Contributors
archiving measur transforms generic optimize observation compose conversion projection animals
Last synced: about 20 hours ago
JSON representation
Repository metadata
An open-source wildfire simulator written in Python and meant to be used to train reinforcement learning (RL) agents.
- Host: GitHub
- URL: https://github.com/mitrefireline/simfire
- Owner: mitrefireline
- License: apache-2.0
- Created: 2022-11-16T02:27:31.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-11-19T22:42:06.000Z (6 months ago)
- Last Synced: 2025-05-11T20:04:00.927Z (20 days ago)
- Topics: python, reinforcement-learning, reinforcement-learning-environments, simulation, simulator, wildfire
- Language: Python
- Homepage: https://mitrefireline.github.io/simfire/
- Size: 34.1 MB
- Stars: 38
- Watchers: 1
- Forks: 3
- Open Issues: 7
- Releases: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Citation: CITATION.cff
README.md
SimFire Fire Simulator
Introduction
SimFire uses PyGame to display and simulate different fire spread models, including the Rothermel Surface fire spread model described in this paper.
For more comprehensive documentation, go to our docs page.
This repository is part of the MITRE Fireline project and is associated with both BurnMD and 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.
Running the Simulation
Install simfire
by following the installation instructions. Then run the run_game.py
script:
python run_game.py
Running as a Python Module
from simfire.sim.simulation import FireSimulation
from simfire.utils.config import Config
config = Config("configs/operational_config.yml")
sim = FireSimulation(config)
# Run a 1 hour simulation
sim.run("1h")
# Run the same simulation for 30 more minutes
sim.run("30m")
# Render the next 2 hours of simulation
sim.rendering = True
sim.run("2h")
# Now save a GIF and fire spread graph from the last 2 hours of simulation
sim.save_gif()
sim.save_spread_graph()
# Saved to the location specified in the config: simulation.sf_home
# Update agents for display
# (x, y, agent_id)
agent_0 = (5, 5, 0)
agent_1 = (5, 5, 1)
agents = [agent_0, agent_1]
# Create the agents on the display
sim.update_agent_positions(agents)
# Loop through to move agents
for i in range(5):
agent_0 = (5 + i, 5 + i, 0)
agent_1 = (5 + i, 5 + i, 1)
# Update the agent positions on the simulation
sim.update_agent_positions([agent_0, agent_1])
# Run for 1 update step
sim.run(1)
# Turn off rendering so the display disappears and the simulation continues to run in the
# background
sim.rendering = False
Installing the Package
pip install simfire
Contributing
For contributing, see the Contribution Page in our docs.
Citation
To cite this software, use the “Cite this repository” link built into GitHub on the right.
Copyright
Copyright ©2023 The MITRE Corporation. ALL RIGHTS RESERVED. Approved for Public Release; Distribution Unlimited. Public Release Case Number 22-3261.
Citation (CITATION.cff)
# This CITATION.cff file was generated with cffinit. # Visit https://bit.ly/cffinit to generate yours today! cff-version: 1.2.0 title: SimFire message: >- If you use this software, please cite it using the metadata from this file. type: software authors: - given-names: Michael family-names: Doyle email: [email protected] affiliation: MITRE orcid: 'https://orcid.org/0009-0002-0229-5693' - given-names: Michael family-names: Threet email: [email protected] affiliation: MITRE - given-names: Marissa family-names: Dotter email: [email protected] affiliation: MITRE - given-names: Chris family-names: Kempis email: [email protected] affiliation: MITRE - given-names: Alex family-names: Tapley email: [email protected] affiliation: MITRE - given-names: Tim family-names: Welsh email: [email protected] affiliation: MITRE repository-code: 'https://github.com/mitrefireline/simfire' url: 'https://fireline.mitre.org' repository-artifact: 'https://pypi.org/project/simfire/' abstract: >- SimFire uses PyGame to display and simulate different fire spread models, including the Rothermel Surface fire spread model. keywords: - simulator - reinforcement learning - wildfire - fire - python license: Apache-2.0 version: 2.0.1 date-released: '2024-07-08'
Owner metadata
- Name: MITRE fiReLine
- Login: mitrefireline
- Email: [email protected]
- Kind: organization
- Description:
- Website:
- Location:
- Twitter:
- Company:
- Icon url: https://avatars.githubusercontent.com/u/116850943?v=4
- Repositories: 1
- Last ynced at: 2023-04-28T05:43:31.254Z
- Profile URL: https://github.com/mitrefireline
GitHub Events
Total
- Issues event: 4
- Watch event: 9
- Delete event: 1
- Issue comment event: 3
- Push event: 3
- Pull request review event: 4
- Pull request review comment event: 2
- Pull request event: 1
- Fork event: 2
- Create event: 1
Last Year
- Issues event: 4
- Watch event: 9
- Delete event: 1
- Issue comment event: 3
- Push event: 3
- Pull request review event: 4
- Pull request review comment event: 2
- Pull request event: 1
- Fork event: 2
- Create event: 1
Committers metadata
Last synced: 4 days ago
Total Commits: 783
Total Committers: 10
Avg Commits per committer: 78.3
Development Distribution Score (DDS): 0.502
Commits in past year: 80
Committers in past year: 7
Avg Commits per committer in past year: 11.429
Development Distribution Score (DDS) in past year: 0.5
Name | Commits | |
---|---|---|
Michael Doyle | m****e@m****g | 390 |
Michael Threet | m****t@m****g | 154 |
mdotter | m****r@m****g | 95 |
Chris Kempis | c****s@m****g | 47 |
fiReLine CI Bot | f****t@m****g | 46 |
Alex Tapley | a****y@m****g | 18 |
Aidan Fennelly | a****y@m****g | 14 |
dependabot[bot] | 4****] | 14 |
Welsh | t****h@m****n | 4 |
Aidan Fennelly | 1****e | 1 |
Committer domains:
- mitre.org: 7
- mm273574-pc.lan: 1
Issue and Pull Request metadata
Last synced: 2 days ago
Total issues: 17
Total pull requests: 35
Average time to close issues: 10 days
Average time to close pull requests: 4 days
Total issue authors: 6
Total pull request authors: 5
Average comments per issue: 0.76
Average comments per pull request: 1.0
Merged pull request: 33
Bot issues: 0
Bot pull requests: 23
Past year issues: 4
Past year pull requests: 9
Past year average time to close issues: about 2 hours
Past year average time to close pull requests: about 2 hours
Past year issue authors: 4
Past year pull request authors: 3
Past year average comments per issue: 0.75
Past year average comments per pull request: 0.78
Past year merged pull request: 9
Past year bot issues: 0
Past year bot pull requests: 5
Top Issue Authors
- afennelly-mitre (7)
- doyled-it (6)
- malintha (1)
- evansbeth (1)
- PanosParaschidis (1)
- JestradaG (1)
Top Pull Request Authors
- dependabot[bot] (23)
- doyled-it (6)
- afennelly-mitre (4)
- mdotter-mitre (1)
- atapley (1)
Top Issue Labels
- documentation (4)
- planned (4)
- operational (3)
- fuel (2)
- version (2)
- bug (2)
- question (1)
- enhancement (1)
- not planned (1)
- pr recommended (1)
- version:patch (1)
- ci/cd (1)
Top Pull Request Labels
- lgtm (32)
- size:XS (25)
- dependencies (23)
- size:M (5)
- version (2)
- size:S (1)
- version:patch (1)
- enhancement (1)
- operational (1)
- size:XL (1)
- historical (1)
Package metadata
- Total packages: 1
-
Total downloads:
- pypi: 119 last-month
- Total dependent packages: 0
- Total dependent repositories: 1
- Total versions: 24
- Total maintainers: 1
pypi.org: simfire
Fire simulator built in Python
- Homepage: https://github.com/mitrefireline/simfire
- Documentation: https://mitrefireline.github.io/simfire/
- Licenses: apache-2.0
- Latest release: 2.0.1 (published 11 months ago)
- Last Synced: 2025-05-30T05:04:48.668Z (2 days ago)
- Versions: 24
- Dependent Packages: 0
- Dependent Repositories: 1
- Downloads: 119 Last month
-
Rankings:
- Dependent packages count: 10.126%
- Downloads: 14.535%
- Average: 19.817%
- Dependent repos count: 21.535%
- Stargazers count: 23.101%
- Forks count: 29.786%
- Maintainers (1)
Dependencies
- JamesIves/github-pages-deploy-action v4 composite
- actions/checkout v1 composite
- actions/checkout v1 composite
- 121 dependencies
- Pillow ^9.1.1
- PyYAML ^6.0
- geotiff ^0.2.10
- h5py ^3.7.0
- imagecodecs ^2023.7.10
- jsonlines ^3.1.0
- landfire ^0.5.0
- matplotlib ^3.5.2
- noise ^1.2.2
- numpy ^1.22.4
- opencv-python ^4.7.0.72
- pygame ^2.1.2
- python ~3.9
- reportlab ^3.6.10
- rich ^12.5.1
- scikit-image ^0.19.3
- svglib ^1.3.0
- wurlitzer ^3.0.2
Score: 10.905038128361106