@@ -206,7 +206,8 @@ async def _fetch_initialization_objects(self):
206206 self .logger .error (f"Failed to fetch initialization objects. Status: { response .status } " )
207207 except Exception as e :
208208 self .logger .error (f"Error fetching initialization objects: { e } " )
209-
209+ # Temporary fix
210+ self .task_config = ConfigParser (self ._task_config_file )
210211 def _load_initialization_objects (self )-> None :
211212 """
212213 Loads task configuration from a local file.
@@ -330,8 +331,8 @@ async def start_tasks(self):
330331 else :
331332 self ._global_defender = None
332333 self ._use_dynamic_ips = self .task_config .get_use_dynamic_addresses ()
333- self ._rewards = self .task_config .get_rewards (["step" , "sucess " , "fail" ])
334- self .logger .debug (f"Rewards set to:{ self ._rewards } " )
334+ self ._rewards = self .task_config .get_rewards (["step" , "success " , "fail" ])
335+ self .logger .info (f"Rewards set to:{ self ._rewards } " )
335336
336337 # start server for agent communication
337338 self ._spawn_task (self .start_tcp_server )
@@ -587,7 +588,7 @@ async def _assign_rewards_episode_end(self):
587588 for agent in attackers :
588589 self .logger .debug (f"Processing reward for agent { agent } " )
589590 if self ._agent_status [agent ] is AgentStatus .Success :
590- self ._agent_rewards [agent ] += self ._rewards ["sucess " ]
591+ self ._agent_rewards [agent ] += self ._rewards ["success " ]
591592 successful_attack = True
592593 else :
593594 self ._agent_rewards [agent ] += self ._rewards ["fail" ]
@@ -596,7 +597,7 @@ async def _assign_rewards_episode_end(self):
596597 for agent in defenders :
597598 self .logger .debug (f"Processing reward for agent { agent } " )
598599 if not successful_attack :
599- self ._agent_rewards [agent ] += self ._rewards ["sucess " ]
600+ self ._agent_rewards [agent ] += self ._rewards ["success " ]
600601 self ._agent_status [agent ] = AgentStatus .Success
601602 else :
602603 self ._agent_rewards [agent ] += self ._rewards ["fail" ]
0 commit comments