File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -41,12 +41,12 @@ def __init__(self, method):
4141 def get_reward (self , obs , reward , done ):
4242 r = 0
4343
44- if method == VizDoomHealthGatheringReward .METHOD_CUMULATIVE :
44+ if self . method == VizDoomHealthGatheringReward .METHOD_CUMULATIVE :
4545 r += obs .game_variables [VizDoomHealthGatheringReward .HEALTH ]
46- elif method == VizDoomHealthGatheringReward .METHOD_DIFFERENCE :
46+ elif self . method == VizDoomHealthGatheringReward .METHOD_DIFFERENCE :
4747 r += obs .game_variables [VizDoomHealthGatheringReward .HEALTH ] - self .prev_health
4848 self .prev_health = obs .game_variables [VizDoomHealthGatheringReward .HEALTH ]
49- elif method == VizDoomHealthGatheringReward .METHOD_POSITIVE_ONLY :
49+ elif self . method == VizDoomHealthGatheringReward .METHOD_POSITIVE_ONLY :
5050 r += obs .game_variables [VizDoomHealthGatheringReward .HEALTH ] - self .prev_health
5151 self .prev_health = obs .game_variables [VizDoomHealthGatheringReward .HEALTH ]
5252
You can’t perform that action at this time.
0 commit comments