#2869 - New Year, new changes. Actioning review comments and some changes following self-review and catchup

This commit is contained in:
Charlie Crane
2025-01-02 17:41:24 +00:00
parent dc6f2be209
commit 2108b914e3
28 changed files with 130 additions and 144 deletions

View File

@@ -7,13 +7,13 @@
Extensible Agents
*****************
Agents defined within PrimAITE have been updated to allow for easier creation of new bespoke agents.
Agents defined within PrimAITE have been updated to allow for easier creation of new bespoke agents.
Developing Agents for PrimAITE
==============================
Agents within PrimAITE, follow the shown inheritance structure, and
Agents within PrimAITE, follow the shown inheritance structure below.
# TODO: Turn this into an inheritance diagram
@@ -32,7 +32,6 @@ AbstractAgent
| |
| | - RandomAgent
|
|
| - ProxyAgent
|
| - ControlledAgent
@@ -41,6 +40,8 @@ AbstractAgent
#. **ConfigSchema**:
Configurable items within a new agent within PrimAITE should contain a ``ConfigSchema`` which holds all configurable variables of the agent. This should not include parameters related to its *state*.
Agent generation will fail if incorrect parameters are passed to the ConfigSchema, for the chosen Agent.
.. code-block:: python
@@ -49,7 +50,7 @@ AbstractAgent
config: "ExampleAgent.ConfigSchema"
"""Agent configuration"""
num_executions: int
num_executions: int = 0
"""Number of action executions by agent"""
class ConfigSchema(AbstractAgent.ConfigSchema):
@@ -60,9 +61,43 @@ AbstractAgent
action_interval: int
"""Number of steps between agent actions"""
.. code-block:: YAML
- ref: example_green_agent
team: GREEN
type: ExampleAgent
observation_space: null
action_space:
action_list:
- type: do_nothing
action_map:
0:
action: do_nothing
options: {}
options:
nodes:
- node_name: client_1
max_folders_per_node: 1
max_files_per_folder: 1
max_services_per_node: 1
max_nics_per_node: 2
max_acl_rules: 10
reward_function:
reward_components:
- type: DUMMY
agent_settings:
start_settings:
start_step: 25
frequency: 20
variance: 5
#. **identifier**:
All agent classes should have a ``identifier`` attribute, a unique snake_case string, for when they are added to the base ``AbstractAgent`` registry.
All agent classes should have a ``identifier`` attribute, a unique snake_case string, for when they are added to the base ``AbstractAgent`` registry. This is then specified in your configuration YAML, and used by PrimAITE to generate the correct Agent.
Changes to YAML file
====================