Skip to content

Commit

Permalink
feat: add correction for max expected utility
Browse files Browse the repository at this point in the history
  • Loading branch information
foarsitter committed Mar 1, 2022
1 parent 5e54ebf commit 6bd938c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion decide/model/equalgain.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,11 @@ def randomized_gain(self, u, v, z):
# does this actor WIN or LOSE
if v < 0.5: # V < 0.5:
# wins
eui = eu + p * z * (self.eu_max - eu)
a = self.eu_max - eu

if a > eu:
a = eu
eui = eu + p * z * a
else:
# loses
eui = eu - p * z * eu
Expand Down

0 comments on commit 6bd938c

Please sign in to comment.