Skip to content

Commit

Permalink
updated fireworld parameters to include fuel mean and stdev
Browse files Browse the repository at this point in the history
  • Loading branch information
joey-obrien committed Apr 8, 2024
1 parent afe7ca5 commit bcce068
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions pyrorl/pyrorl/envs/environment/environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,6 @@
EVACUATING_INDEX = 3
PATHS_INDEX = 4

"""
Fuel level constants
"""
FUEL_MEAN = 8.5
FUEL_STDEV = 3


class FireWorld:
"""
Expand All @@ -45,6 +39,8 @@ def __init__(
custom_fire_locations: Optional[np.ndarray] = None,
wind_speed: Optional[float] = None,
wind_angle: Optional[float] = None,
fuel_mean:float = 8.5,
fuel_stdev:float = 3
):
"""
The constructor defines the state and action space, initializes the fires,
Expand Down Expand Up @@ -158,7 +154,7 @@ def __init__(
# Note: make the fire spread parameters to constants?
num_values = num_rows * num_cols
self.state_space[FUEL_INDEX] = np.random.normal(
FUEL_MEAN, FUEL_STDEV, num_values
fuel_mean, fuel_stdev, num_values
).reshape((num_rows, num_cols))

# Initialize populated areas
Expand Down

0 comments on commit bcce068

Please sign in to comment.