Skip to main content

An RL OpenAI Gym Environment for Wildfire Evacuation

Project description

Wildfire Evacuation RL Gym Environment

A new reinforcement learning OpenAI Gym environment built for the simulation of wildfire evacuation. Check out the docs.

How To Use

First, install our package:

pip install wildfire-evac

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 examples/.

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

wildfire_evac-0.0.14.tar.gz (7.9 kB view details)

Uploaded Source

File details

Details for the file wildfire_evac-0.0.14.tar.gz.

File metadata

  • Download URL: wildfire_evac-0.0.14.tar.gz
  • Upload date:
  • Size: 7.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.12

File hashes

Hashes for wildfire_evac-0.0.14.tar.gz
Algorithm Hash digest
SHA256 831636e1bbebac01652477cbf48eb7218cdcb44170d69929f0ebd30e838fd2f6
MD5 21d65e2e06b2ca5d6dcd64d704e5e130
BLAKE2b-256 ebd9efb00e7b09987997503c9f179b8d88c6d6ffbe7d9d2b790fa7e1b911c50a

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