Questions on the expected effect of actions
aduyinuo opened this issue · 3 comments
- The order of actions. As said in the scenario description, the green agent takes an action, then the red agent, and finally the blue agent. However, I tried to print out the sequence of action execution in
EnvironmentController.step()
:
print("+++++++++++++++++++++++++++++++++++++++++++++")
for agent_name, agent_object in self.agent_interfaces.items():
# pass observation to agent to get action
if agent is None or action is None or agent != agent_name:
agent_action = agent_object.get_action(self.observation[agent_name])
else:
agent_action = action
if not self.test_valid_action(agent_action, agent_object) and not skip_valid_action_check:
agent_action = InvalidAction()
self.action[agent_name] = agent_action
print("{} {}".format(agent_name, agent_action))
# perform action on state
next_observation[agent_name] = self._filter_obs(self.execute_action(self.action[agent_name]), agent_name)
print("+++++++++++++++++++++++++++++++++++++++++++++")
The prints looks like follows:
Suggesting that the order is actually blue->green->red
-
The effect of
Remove
action.
I changed the above code snippet to have the agents take actions in the order of green->red->blue and played with TestKeyboardBlue.py.
As shown in the screenshot, the red agent launched anExploit
action onUser1
, then my blue agent launched aRemove User1
, however, from the updated observation table for the blue agent, we can see that although theRemove
action succeeded,User1
is still compromised. Isn't a successfulRemove
action supposed to remove the attacker out of a host -
The reward of
Impact
action
In another test, I had the blue agentSleep
to allow the b-line agent pivot through the network. When it finally launched anImpact
action, I didn't get the expected -10 points.
Thanks for your questions,
- Your analysis is correct, the blue agent is supposed to act first. We have updated the readme file to reflect this.
- The Compromised status assumes blue acts before red. In this case, Red's exploit has been detected by Blue, so it infers the host is compromised. This would be correct for the turn order Remove -> Exploit.
- I was unable to replicate this bug. Does it occur if you leave the turn order alone?
Thanks for the reply.
- For question 2, the compromise table is generated after I change the order to be green-red-blue. By "assumes blue acts before red", do you mean that the observation table is generated independently regardless of the actual action order?
- The bug for question 3 occurred if I leave the turn order alone. I'm not sure if it is introduced accidentally by my modifications.
- Blue's observation is taken after all of the actions have resolved so the agent has the most up to date information at the beginning of its turn.
- Is the bug consistent or only happens occasionally?