Skip to content

Commit

Permalink
Removed commented code
Browse files Browse the repository at this point in the history
  • Loading branch information
saidineshpola authored Feb 3, 2024
1 parent 0e11d5a commit 2682b0e
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,6 @@ def reward_done_info(self, reward, done, info):
if self.agent_id in self.env.realm.players:
if self.env.realm.players[self.agent_id].resources.health_restore > 0:
healing_bonus = self.heal_bonus_weight
# TODO Add equip/harvest weapon bonus based on level improvement
# if self.env.realm.players[self.agent_id].inventory:
# print('\033[93m' + 'inventory log', self.env.realm.players[self.agent_id].ration_consumed,
# 'agent_id', self.agent_id, '\033[0m')

# Attacking bonus
attack_bonus = 0 # 0.0004
Expand Down Expand Up @@ -134,9 +130,7 @@ def reward_done_info(self, reward, done, info):
give_gold_log = self.env.realm.event_log.get_data(agents=[self.agent_id],
event_code=EventCode.GIVE_GOLD,
tick=self.env.realm.tick)
# equipment_log = self.env.realm.event_log.get_data(agents=[self.agent_id],
# event_code=EventCode.EQUIP_ITEM,
# tick=self.env.realm.tick)

# Combat, Fishing Skills
if llog.shape[0] > 0 and llog[0][-4] > 0 and (llog[0][-5] in range(1, 5)):
if llog[0][-4] <= 5:
Expand All @@ -149,11 +143,6 @@ def reward_done_info(self, reward, done, info):
give_bonus = 0.03
if harvest_log.shape[0] > 0 and harvest_log[0][-3] > 0:
harvest_bonus = 0.01
# if equipment_log.shape[0] > 0 and equipment_log[0][-3] > 0:
# if equipment_log[0][-3] in range(1, 3):
# equip_bonus = 0.005*equipment_log[0][-3]
# else:
# equip_bonus = 0.01*equipment_log[0][-3]

# Add meandering bonus to encourage moving to various directions
meander_bonus = 0
Expand Down

0 comments on commit 2682b0e

Please sign in to comment.