1443 - reverted changes made to observation space and added config files for testing

This commit is contained in:
SunilSamra
2023-05-31 14:11:15 +01:00
parent 7159d7c63b
commit ae2f4d472e
4 changed files with 31 additions and 40 deletions

View File

@@ -0,0 +1,29 @@
- itemType: ACTIONS
type: NODE
- itemType: STEPS
steps: 15
- itemType: PORTS
portsList:
- port: '21'
- itemType: SERVICES
serviceList:
- name: ftp
- itemType: NODE
node_id: '1'
name: node
node_class: SERVICE
node_type: COMPUTER
priority: P1
hardware_state: 'ON'
ip_address: 192.168.0.1
software_state: GOOD
file_system_state: GOOD
services:
- name: ftp
port: '21'
state: GOOD
- itemType: POSITION
positions:
- node: '1'
x_pos: 309
y_pos: 78

View File

@@ -5,8 +5,8 @@ from tests.conftest import _get_primaite_env_from_config
def test_single_action_space():
"""Test to ensure the blue agent is using the ACL action space and is carrying out both kinds of operations."""
env = _get_primaite_env_from_config(
main_config_path=TEST_CONFIG_ROOT / "one_node_states_on_off_main_config.yaml",
main_config_path=TEST_CONFIG_ROOT / "single_action_space_main_config.yaml",
lay_down_config_path=TEST_CONFIG_ROOT
/ "one_node_states_on_off_lay_down_config.yaml",
/ "single_action_space_lay_down_config.yaml",
)
print("Average Reward:", env.average_reward)