An RL Environment for Wildfire Evacuation
Project description
PyroRL
PyroRL is a new reinforcement learning environment built for the simulation of wildfire evacuation. Check out the docs and the demo.
How to Use
First, install our package:
pip install pyrorl
To use our wildfire evacuation environment, define the dimensions of your grid, where the populated areas are, the paths, and which populated areas can use which path. See an example below.
# Create environment
kwargs = {
'num_rows': num_rows,
'num_cols': num_cols,
'populated_areas': populated_areas,
'paths': paths,
'paths_to_pops': paths_to_pops
}
env = gymnasium.make('pyrorl/PyroRL-v0', **kwargs)
# Run a simple loop of the environment
env.reset()
for _ in range(10):
# Take action and observation
action = env.action_space.sample()
observation, reward, terminated, truncated, info = env.step(action)
# Render environment and print reward
env.render()
print("Reward: " + str(reward))
A compiled visualization of numerous iterations is seen below. For more examples, check out the examples/ folder in the online repository.
How to Contribute
For information on how to contribute, check out our contribution guide.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file pyrorl-1.0.1.tar.gz.
File metadata
- Download URL: pyrorl-1.0.1.tar.gz
- Upload date:
- Size: 14.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
df2f87278377397ea3ab62db7a06e031d7fe2ac07f5ebadfb1245d24a04ba8b2
|
|
| MD5 |
ed0cf09b25c8962fcbc1b07fa971d030
|
|
| BLAKE2b-256 |
f3cc5e42e5a708565c18f9c0a0958c0b3689589d3b2f12e76fec7d47fcc0778b
|