Skip to content

Commit

Permalink
fix rewards
Browse files Browse the repository at this point in the history
  • Loading branch information
daveey committed Apr 19, 2023
1 parent edba49a commit eddb62b
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions nmmo/core/env.py
Original file line number Diff line number Diff line change
Expand Up @@ -386,11 +386,6 @@ def _compute_rewards(self, agents: List[AgentID], dones: Dict[AgentID, bool]):
agent = self.realm.players.get(agent_id)
assert agent is not None, f'Agent {agent_id} not found'


rewards[agent_id] = 0
rewards[agent_id] += (agent.food.val > 30) * 0.01
rewards[agent_id] += (agent.water.val > 30) * 0.01

if agent.diary is not None:
rewards[agent_id] = sum(agent.diary.rewards.values())
infos[agent_id].update(agent.diary.rewards)
Expand Down

0 comments on commit eddb62b

Please sign in to comment.