#2869 - Remove outdated parameters from actionmanager (action map achieves the same result) [skip ci]
This commit is contained in:
@@ -3,9 +3,7 @@ from unittest.mock import Mock
|
||||
|
||||
import pytest
|
||||
|
||||
from primaite.game.agent.actions import ( # DoNothingAction,; NodeServiceDisableAction,; NodeServiceEnableAction,; NodeServicePauseAction,; NodeServiceRestartAction,; NodeServiceResumeAction,; NodeServiceScanAction,; NodeServiceStartAction,; NodeServiceStopAction,
|
||||
ActionManager,
|
||||
)
|
||||
from primaite.game.agent.actions import ActionManager
|
||||
from primaite.game.agent.actions.manager import DoNothingAction
|
||||
from primaite.game.agent.actions.service import (
|
||||
NodeServiceDisableAction,
|
||||
|
||||
@@ -27,26 +27,6 @@ def test_probabilistic_agent():
|
||||
MAX_NODE_FILE_DELETE = 6250
|
||||
|
||||
action_space_cfg = {
|
||||
"action_list": [
|
||||
{"type": "do_nothing"},
|
||||
{"type": "node_application_execute"},
|
||||
{"type": "node_file_delete"},
|
||||
],
|
||||
"nodes": [
|
||||
{
|
||||
"node_name": "client_1",
|
||||
"applications": [{"application_name": "WebBrowser"}],
|
||||
"folders": [{"folder_name": "downloads", "files": [{"file_name": "cat.png"}]}],
|
||||
},
|
||||
],
|
||||
"max_folders_per_node": 2,
|
||||
"max_files_per_folder": 2,
|
||||
"max_services_per_node": 2,
|
||||
"max_applications_per_node": 2,
|
||||
"max_nics_per_node": 2,
|
||||
"max_acl_rules": 10,
|
||||
"protocols": ["TCP", "UDP", "ICMP"],
|
||||
"ports": ["HTTP", "DNS", "ARP"],
|
||||
"act_map": {
|
||||
0: {"action": "do_nothing", "options": {}},
|
||||
1: {"action": "node_application_execute", "options": {"node_id": 0, "application_id": 0}},
|
||||
@@ -65,8 +45,8 @@ def test_probabilistic_agent():
|
||||
pa_config = {
|
||||
"type": "ProbabilisticAgent",
|
||||
"game": game,
|
||||
"action_manager": action_space_cfg,
|
||||
"observation_manager": observation_space_cfg,
|
||||
"action_space": action_space_cfg,
|
||||
"observation_space": observation_space_cfg,
|
||||
"reward_function": reward_function_cfg,
|
||||
"agent_settings": {
|
||||
"action_probabilities": {0: P_DO_NOTHING, 1: P_NODE_APPLICATION_EXECUTE, 2: P_NODE_FILE_DELETE},
|
||||
|
||||
Reference in New Issue
Block a user