From 2682b0e9223c347d0073ec3582baee38d9e010f2 Mon Sep 17 00:00:00 2001 From: saidinesh pola <81302966+saidineshpola@users.noreply.github.com> Date: Sat, 3 Feb 2024 21:37:23 +0530 Subject: [PATCH] Removed commented code --- environment.py | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/environment.py b/environment.py index bf9e629..6c8a928 100644 --- a/environment.py +++ b/environment.py @@ -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 @@ -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: @@ -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