Skip to main content

An RL OpenAI Gym Environment for Wildfire Evacuation

Project description

PyroRL

example workflow codecov

PyroRL is a new reinforcement learning OpenAI Gym 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('wildfire_evac/WildfireEvacuation-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))

For more examples, check out the examples/ folder.

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

pyrorl-0.0.3.tar.gz (8.4 kB view details)

Uploaded Source

File details

Details for the file pyrorl-0.0.3.tar.gz.

File metadata

  • Download URL: pyrorl-0.0.3.tar.gz
  • Upload date:
  • Size: 8.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for pyrorl-0.0.3.tar.gz
Algorithm Hash digest
SHA256 4f352fa34c6033c1560c28633db7eeead6884ee6cc942af0cb21ccabc3a58ea5
MD5 f04c85f5f488ba827df0048bcfe716ce
BLAKE2b-256 da36a199b0a4cfda79c8c8b3132fd715d9baeacc4c6863568b312fdf39b2c60e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page