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
transforms archiving optimize measur generic animals conversion observation compose projection
Last synced: about 18 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 (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-11-19T22:42:06.000Z (about 1 year ago)
- Last Synced: 2025-12-03T11:16:35.234Z (22 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: 46
- Watchers: 1
- Forks: 9
- Open Issues: 9
- 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: mdoyle@mitre.org
affiliation: MITRE
orcid: 'https://orcid.org/0009-0002-0229-5693'
- given-names: Michael
family-names: Threet
email: mthreet@mitre.org
affiliation: MITRE
- given-names: Marissa
family-names: Dotter
email: mdotter@mitre.org
affiliation: MITRE
- given-names: Chris
family-names: Kempis
email: ckempis@mitre.org
affiliation: MITRE
- given-names: Alex
family-names: Tapley
email: atapley@mitre.org
affiliation: MITRE
- given-names: Tim
family-names: Welsh
email: twelsh@mitre.org
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: fireline@mitre.org
- 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: 6
- Watch event: 12
- Delete event: 1
- Issue comment event: 4
- Push event: 3
- Pull request review event: 4
- Pull request review comment event: 2
- Pull request event: 1
- Fork event: 3
- Create event: 1
Last Year
- Issues event: 3
- Watch event: 10
- Issue comment event: 2
- Fork event: 2
Committers metadata
Last synced: 7 days ago
Total Commits: 783
Total Committers: 9
Avg Commits per committer: 87.0
Development Distribution Score (DDS): 0.502
Commits in past year: 0
Committers in past year: 0
Avg Commits per committer in past year: 0.0
Development Distribution Score (DDS) in past year: 0.0
| 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 | 15 |
| dependabot[bot] | 4****] | 14 |
| Welsh | t****h@m****n | 4 |
Committer domains:
- mitre.org: 7
- mm273574-pc.lan: 1
Issue and Pull Request metadata
Last synced: 3 months ago
Total issues: 16
Total pull requests: 44
Average time to close issues: 12 days
Average time to close pull requests: 6 days
Total issue authors: 9
Total pull request authors: 5
Average comments per issue: 0.5
Average comments per pull request: 1.0
Merged pull request: 39
Bot issues: 1
Bot pull requests: 27
Past year issues: 5
Past year pull requests: 2
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: 5
Past year pull request authors: 1
Past year average comments per issue: 0.4
Past year average comments per pull request: 0.5
Past year merged pull request: 1
Past year bot issues: 0
Past year bot pull requests: 0
Top Issue Authors
- afennelly-mitre (5)
- doyled-it (4)
- malintha (1)
- rfoo1250 (1)
- evansbeth (1)
- PanosParaschidis (1)
- dependabot[bot] (1)
- ufuk-cakir (1)
- JestradaG (1)
Top Pull Request Authors
- dependabot[bot] (27)
- doyled-it (8)
- afennelly-mitre (6)
- mdotter-mitre (2)
- atapley (1)
Top Issue Labels
- documentation (3)
- operational (2)
- bug (2)
- question (1)
- fuel (1)
- dependencies (1)
- size:XS (1)
- lgtm (1)
- version:patch (1)
- planned (1)
- version (1)
Top Pull Request Labels
- lgtm (37)
- size:XS (28)
- dependencies (27)
- size:M (6)
- size:S (2)
- version (2)
- version:patch (2)
- enhancement (2)
- operational (2)
- size:XL (2)
- historical (2)
Package metadata
- Total packages: 1
-
Total downloads:
- pypi: 161 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 over 1 year ago)
- Last Synced: 2025-12-21T13:06:53.536Z (4 days ago)
- Versions: 24
- Dependent Packages: 0
- Dependent Repositories: 1
- Downloads: 161 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: 11.298307963375454