Skip to content

Commit

Permalink
tweak stat
Browse files Browse the repository at this point in the history
  • Loading branch information
kywch committed May 16, 2024
1 parent 7d6835a commit d8ec00a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions reinforcement_learning/stat_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import nmmo.systems.item as Item
from nmmo.minigames import RacetoCenter, KingoftheHill, Sandwich, RadioRaid

from reinforcement_learning.environment import TeamBattle, AgentTraining, AgentTaskEval
from reinforcement_learning.environment import DefaultGame, AgentTraining, AgentTaskEval


class BaseStatWrapper(BaseParallelWrapper):
Expand Down Expand Up @@ -239,7 +239,7 @@ def _process_stats_and_early_stop(self, agent_id, reward, terminated, truncated,
info["return"] = task._max_progress # this is 1 if done

# Log the below stats ONLY for the team battle & agent training
if isinstance(self.env.game, TeamBattle) or isinstance(self.env.game, AgentTraining):
if isinstance(self.env.game, DefaultGame) or isinstance(self.env.game, AgentTraining):
# Max combat/harvest level achieved
info["stats"][game_name]["achieved/max_combat_level"] = agent.attack_level
info["stats"][game_name]["achieved/max_harvest_skill_ammo"] = max(
Expand Down

0 comments on commit d8ec00a

Please sign in to comment.