Skip to content

Commit

Permalink
minibug
Browse files Browse the repository at this point in the history
  • Loading branch information
felimomo committed Mar 6, 2024
1 parent 87f2972 commit b89a51e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/rl4fisheries/envs/asm.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ def population_growth(self, n):
return n

def observe(self):
self.vulb = sum(p["vul"] * self.state * p["wt"]) # update vulnerable biomass
self.vulb = sum(p["vul"] * self.state * self.parameters["wt"]) # update vulnerable biomass
observation = 2 * np.array([self.vulb]) / self.bound - 1
observation = np.clip(observation, -1.0, 1.0)
return np.float32(observation)
Expand Down
2 changes: 1 addition & 1 deletion src/rl4fisheries/envs/asm_2o.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ def observe(self):
p = self.parameters
self.vul_pop = p["vul"] * self.state
self.vul_pop_total = sum(self.vul_pop)
self.vulb = sum(self.vul_pop * p["wt"]) # update vulnerable biomass
self.vulb = sum(self.vul_pop * self.parameters["wt"]) # update vulnerable biomass

biomass_obs = 2 * self.vulb / self.bound - 1

Expand Down
2 changes: 1 addition & 1 deletion src/rl4fisheries/envs/asm_esc.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ def population_growth(self, n):
return n

def observe(self):
self.vulb = sum(p["vul"] * self.state * p["wt"]) # update vulnerable biomass
self.vulb = sum(p["vul"] * self.state * self.parameters["wt"]) # update vulnerable biomass
observation = 2 * np.array([self.vulb]) / self.bound - 1
observation = np.clip(observation, -1.0, 1.0)
return np.float32(observation)
Expand Down

0 comments on commit b89a51e

Please sign in to comment.