Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions AIDojoCoordinator/coordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,8 @@ async def _fetch_initialization_objects(self):
self.logger.error(f"Failed to fetch initialization objects. Status: {response.status}")
except Exception as e:
self.logger.error(f"Error fetching initialization objects: {e}")

# Temporary fix
self.task_config = ConfigParser(self._task_config_file)
def _load_initialization_objects(self)->None:
"""
Loads task configuration from a local file.
Expand Down Expand Up @@ -330,8 +331,8 @@ async def start_tasks(self):
else:
self._global_defender = None
self._use_dynamic_ips = self.task_config.get_use_dynamic_addresses()
self._rewards = self.task_config.get_rewards(["step", "sucess", "fail"])
self.logger.debug(f"Rewards set to:{self._rewards}")
self._rewards = self.task_config.get_rewards(["step", "success", "fail"])
self.logger.info(f"Rewards set to:{self._rewards}")

# start server for agent communication
self._spawn_task(self.start_tcp_server)
Expand Down Expand Up @@ -587,7 +588,7 @@ async def _assign_rewards_episode_end(self):
for agent in attackers:
self.logger.debug(f"Processing reward for agent {agent}")
if self._agent_status[agent] is AgentStatus.Success:
self._agent_rewards[agent] += self._rewards["sucess"]
self._agent_rewards[agent] += self._rewards["success"]
successful_attack = True
else:
self._agent_rewards[agent] += self._rewards["fail"]
Expand All @@ -596,7 +597,7 @@ async def _assign_rewards_episode_end(self):
for agent in defenders:
self.logger.debug(f"Processing reward for agent {agent}")
if not successful_attack:
self._agent_rewards[agent] += self._rewards["sucess"]
self._agent_rewards[agent] += self._rewards["success"]
self._agent_status[agent] = AgentStatus.Success
else:
self._agent_rewards[agent] += self._rewards["fail"]
Expand Down
20 changes: 0 additions & 20 deletions AIDojoCoordinator/docs/Architecture.md

This file was deleted.

2 changes: 1 addition & 1 deletion AIDojoCoordinator/docs/Components.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Game Components
Here, you can see the details of all components of the NetSetEnvironment and their usage. These components are located in [game_components.py](/env/game_components.py).
Here, you can see the details of all components of the NetSetEnvironment and their usage. These components are located in [game_components.py](game_components.py).

## Building blocks
The following classes are used in the game to hold information about the state of the game. They are used both in the [Actions](#actions) and [GameState](#gamestate).
Expand Down
6 changes: 3 additions & 3 deletions AIDojoCoordinator/netsecenv_conf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ coordinator:
# Define the conf for all the 'attacker' agents.
agents:
Attacker:
max_steps: 20
max_steps: 25
goal:
description: "Exfiltrate data to '213.47.23.195'"
is_any_part_of_goal_random: True
Expand Down Expand Up @@ -103,9 +103,9 @@ env:
use_firewall: True
save_trajectories: False
rewards:
win: 100
success: 100
step: -1
loss: -10
fail: -10
actions:
scan_network:
prob_success: 1.0
Expand Down
Loading