#2912 - Merge in changes on target branch
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
# © Crown-owned copyright 2024, Defence Science and Technology Laboratory UK
|
# © Crown-owned copyright 2025, Defence Science and Technology Laboratory UK
|
||||||
from typing import Any, Dict, Optional, Tuple
|
from typing import Any, Dict, Optional, Tuple
|
||||||
|
|
||||||
from gymnasium.core import ObsType
|
from gymnasium.core import ObsType
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# © Crown-owned copyright 2024, Defence Science and Technology Laboratory UK
|
# © Crown-owned copyright 2025, Defence Science and Technology Laboratory UK
|
||||||
import json
|
import json
|
||||||
import shutil
|
import shutil
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# © Crown-owned copyright 2024, Defence Science and Technology Laboratory UK
|
# © Crown-owned copyright 2025, Defence Science and Technology Laboratory UK
|
||||||
import json
|
import json
|
||||||
import sys
|
import sys
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# © Crown-owned copyright 2024, Defence Science and Technology Laboratory UK
|
# © Crown-owned copyright 2025, Defence Science and Technology Laboratory UK
|
||||||
import platform
|
import platform
|
||||||
from typing import Dict
|
from typing import Dict
|
||||||
|
|
||||||
|
|||||||
2
docs/_templates/custom-class-template.rst
vendored
2
docs/_templates/custom-class-template.rst
vendored
@@ -1,6 +1,6 @@
|
|||||||
.. only:: comment
|
.. only:: comment
|
||||||
|
|
||||||
© Crown-owned copyright 2024, Defence Science and Technology Laboratory UK
|
© Crown-owned copyright 2025, Defence Science and Technology Laboratory UK
|
||||||
|
|
||||||
..
|
..
|
||||||
Credit to https://github.com/JamesALeedham/Sphinx-Autosummary-Recursion for the custom templates.
|
Credit to https://github.com/JamesALeedham/Sphinx-Autosummary-Recursion for the custom templates.
|
||||||
|
|||||||
2
docs/_templates/custom-module-template.rst
vendored
2
docs/_templates/custom-module-template.rst
vendored
@@ -1,6 +1,6 @@
|
|||||||
.. only:: comment
|
.. only:: comment
|
||||||
|
|
||||||
© Crown-owned copyright 2024, Defence Science and Technology Laboratory UK
|
© Crown-owned copyright 2025, Defence Science and Technology Laboratory UK
|
||||||
|
|
||||||
..
|
..
|
||||||
Credit to https://github.com/JamesALeedham/Sphinx-Autosummary-Recursion for the custom templates.
|
Credit to https://github.com/JamesALeedham/Sphinx-Autosummary-Recursion for the custom templates.
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
.. only:: comment
|
.. only:: comment
|
||||||
|
|
||||||
© Crown-owned copyright 2024, Defence Science and Technology Laboratory UK
|
© Crown-owned copyright 2025, Defence Science and Technology Laboratory UK
|
||||||
|
|
||||||
..
|
..
|
||||||
DO NOT DELETE THIS FILE! It contains the all-important `.. autosummary::` directive with `:recursive:` option, without
|
DO NOT DELETE THIS FILE! It contains the all-important `.. autosummary::` directive with `:recursive:` option, without
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# © Crown-owned copyright 2024, Defence Science and Technology Laboratory UK
|
# © Crown-owned copyright 2025, Defence Science and Technology Laboratory UK
|
||||||
# Configuration file for the Sphinx documentation builder.
|
# Configuration file for the Sphinx documentation builder.
|
||||||
#
|
#
|
||||||
# For the full list of built-in configuration values, see the documentation:
|
# For the full list of built-in configuration values, see the documentation:
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
.. only:: comment
|
.. only:: comment
|
||||||
|
|
||||||
© Crown-owned copyright 2024, Defence Science and Technology Laboratory UK
|
© Crown-owned copyright 2025, Defence Science and Technology Laboratory UK
|
||||||
|
|
||||||
Welcome to PrimAITE's documentation
|
Welcome to PrimAITE's documentation
|
||||||
====================================
|
====================================
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
.. only:: comment
|
.. only:: comment
|
||||||
|
|
||||||
© Crown-owned copyright 2024, Defence Science and Technology Laboratory UK
|
© Crown-owned copyright 2025, Defence Science and Technology Laboratory UK
|
||||||
|
|
||||||
Action Masking
|
Action Masking
|
||||||
**************
|
**************
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
.. only:: comment
|
.. only:: comment
|
||||||
|
|
||||||
© Crown-owned copyright 2024, Defence Science and Technology Laboratory UK
|
© Crown-owned copyright 2025, Defence Science and Technology Laboratory UK
|
||||||
|
|
||||||
PrimAITE |VERSION| Configuration
|
PrimAITE |VERSION| Configuration
|
||||||
********************************
|
********************************
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
.. only:: comment
|
.. only:: comment
|
||||||
|
|
||||||
© Crown-owned copyright 2024, Defence Science and Technology Laboratory UK
|
© Crown-owned copyright 2025, Defence Science and Technology Laboratory UK
|
||||||
|
|
||||||
|
|
||||||
``agents``
|
``agents``
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
.. only:: comment
|
.. only:: comment
|
||||||
|
|
||||||
© Crown-owned copyright 2024, Defence Science and Technology Laboratory UK
|
© Crown-owned copyright 2025, Defence Science and Technology Laboratory UK
|
||||||
|
|
||||||
|
|
||||||
``game``
|
``game``
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
.. only:: comment
|
.. only:: comment
|
||||||
|
|
||||||
© Crown-owned copyright 2024, Defence Science and Technology Laboratory UK
|
© Crown-owned copyright 2025, Defence Science and Technology Laboratory UK
|
||||||
|
|
||||||
|
|
||||||
``io_settings``
|
``io_settings``
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
.. only:: comment
|
.. only:: comment
|
||||||
|
|
||||||
© Crown-owned copyright 2024, Defence Science and Technology Laboratory UK
|
© Crown-owned copyright 2025, Defence Science and Technology Laboratory UK
|
||||||
|
|
||||||
|
|
||||||
``simulation``
|
``simulation``
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
.. only:: comment
|
.. only:: comment
|
||||||
|
|
||||||
© Crown-owned copyright 2024, Defence Science and Technology Laboratory UK
|
© Crown-owned copyright 2025, Defence Science and Technology Laboratory UK
|
||||||
|
|
||||||
.. _Node Attributes:
|
.. _Node Attributes:
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
.. only:: comment
|
.. only:: comment
|
||||||
|
|
||||||
© Crown-owned copyright 2024, Defence Science and Technology Laboratory UK
|
© Crown-owned copyright 2025, Defence Science and Technology Laboratory UK
|
||||||
|
|
||||||
.. _common_host_node_attributes:
|
.. _common_host_node_attributes:
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
.. only:: comment
|
.. only:: comment
|
||||||
|
|
||||||
© Crown-owned copyright 2024, Defence Science and Technology Laboratory UK
|
© Crown-owned copyright 2025, Defence Science and Technology Laboratory UK
|
||||||
|
|
||||||
.. _common_network_node_attributes:
|
.. _common_network_node_attributes:
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
.. only:: comment
|
.. only:: comment
|
||||||
|
|
||||||
© Crown-owned copyright 2024, Defence Science and Technology Laboratory UK
|
© Crown-owned copyright 2025, Defence Science and Technology Laboratory UK
|
||||||
|
|
||||||
.. _common_node_attributes:
|
.. _common_node_attributes:
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
.. only:: comment
|
.. only:: comment
|
||||||
|
|
||||||
© Crown-owned copyright 2024, Defence Science and Technology Laboratory UK
|
© Crown-owned copyright 2025, Defence Science and Technology Laboratory UK
|
||||||
|
|
||||||
``type``
|
``type``
|
||||||
--------
|
--------
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
.. only:: comment
|
.. only:: comment
|
||||||
|
|
||||||
© Crown-owned copyright 2024, Defence Science and Technology Laboratory UK
|
© Crown-owned copyright 2025, Defence Science and Technology Laboratory UK
|
||||||
|
|
||||||
.. _computer_configuration:
|
.. _computer_configuration:
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
.. only:: comment
|
.. only:: comment
|
||||||
|
|
||||||
© Crown-owned copyright 2024, Defence Science and Technology Laboratory UK
|
© Crown-owned copyright 2025, Defence Science and Technology Laboratory UK
|
||||||
|
|
||||||
.. _firewall_configuration:
|
.. _firewall_configuration:
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
.. only:: comment
|
.. only:: comment
|
||||||
|
|
||||||
© Crown-owned copyright 2024, Defence Science and Technology Laboratory UK
|
© Crown-owned copyright 2025, Defence Science and Technology Laboratory UK
|
||||||
|
|
||||||
.. _network_examples:
|
.. _network_examples:
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
.. only:: comment
|
.. only:: comment
|
||||||
|
|
||||||
© Crown-owned copyright 2024, Defence Science and Technology Laboratory UK
|
© Crown-owned copyright 2025, Defence Science and Technology Laboratory UK
|
||||||
|
|
||||||
.. _router_configuration:
|
.. _router_configuration:
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
.. only:: comment
|
.. only:: comment
|
||||||
|
|
||||||
© Crown-owned copyright 2024, Defence Science and Technology Laboratory UK
|
© Crown-owned copyright 2025, Defence Science and Technology Laboratory UK
|
||||||
|
|
||||||
.. _server_configuration:
|
.. _server_configuration:
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
.. only:: comment
|
.. only:: comment
|
||||||
|
|
||||||
© Crown-owned copyright 2024, Defence Science and Technology Laboratory UK
|
© Crown-owned copyright 2025, Defence Science and Technology Laboratory UK
|
||||||
|
|
||||||
.. _switch_configuration:
|
.. _switch_configuration:
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
.. only:: comment
|
.. only:: comment
|
||||||
|
|
||||||
© Crown-owned copyright 2024, Defence Science and Technology Laboratory UK
|
© Crown-owned copyright 2025, Defence Science and Technology Laboratory UK
|
||||||
|
|
||||||
``applications``
|
``applications``
|
||||||
----------------
|
----------------
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
.. only:: comment
|
.. only:: comment
|
||||||
|
|
||||||
© Crown-owned copyright 2024, Defence Science and Technology Laboratory UK
|
© Crown-owned copyright 2025, Defence Science and Technology Laboratory UK
|
||||||
|
|
||||||
``services``
|
``services``
|
||||||
------------
|
------------
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
.. only:: comment
|
.. only:: comment
|
||||||
|
|
||||||
© Crown-owned copyright 2024, Defence Science and Technology Laboratory UK
|
© Crown-owned copyright 2025, Defence Science and Technology Laboratory UK
|
||||||
|
|
||||||
Customising Agents
|
Customising Agents
|
||||||
******************
|
******************
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
.. only:: comment
|
.. only:: comment
|
||||||
|
|
||||||
© Crown-owned copyright 2024, Defence Science and Technology Laboratory UK
|
© Crown-owned copyright 2025, Defence Science and Technology Laboratory UK
|
||||||
|
|
||||||
.. role:: raw-html(raw)
|
.. role:: raw-html(raw)
|
||||||
:format: html
|
:format: html
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
.. only:: comment
|
.. only:: comment
|
||||||
|
|
||||||
© Crown-owned copyright 2024, Defence Science and Technology Laboratory UK
|
© Crown-owned copyright 2025, Defence Science and Technology Laboratory UK
|
||||||
|
|
||||||
.. _Developer Tools:
|
.. _Developer Tools:
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
.. only:: comment
|
.. only:: comment
|
||||||
|
|
||||||
© Crown-owned copyright 2024, Defence Science and Technology Laboratory UK
|
© Crown-owned copyright 2025, Defence Science and Technology Laboratory UK
|
||||||
|
|
||||||
RL Environments
|
RL Environments
|
||||||
***************
|
***************
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
.. only:: comment
|
.. only:: comment
|
||||||
|
|
||||||
© Crown-owned copyright 2024, Defence Science and Technology Laboratory UK
|
© Crown-owned copyright 2025, Defence Science and Technology Laboratory UK
|
||||||
|
|
||||||
.. _example jupyter notebooks:
|
.. _example jupyter notebooks:
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
.. only:: comment
|
.. only:: comment
|
||||||
|
|
||||||
© Crown-owned copyright 2024, Defence Science and Technology Laboratory UK
|
© Crown-owned copyright 2025, Defence Science and Technology Laboratory UK
|
||||||
|
|
||||||
PrimAITE Game layer
|
PrimAITE Game layer
|
||||||
*******************
|
*******************
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
.. only:: comment
|
.. only:: comment
|
||||||
|
|
||||||
© Crown-owned copyright 2024, Defence Science and Technology Laboratory UK
|
© Crown-owned copyright 2025, Defence Science and Technology Laboratory UK
|
||||||
|
|
||||||
.. _getting-started:
|
.. _getting-started:
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
.. only:: comment
|
.. only:: comment
|
||||||
|
|
||||||
© Crown-owned copyright 2024, Defence Science and Technology Laboratory UK
|
© Crown-owned copyright 2025, Defence Science and Technology Laboratory UK
|
||||||
|
|
||||||
Glossary
|
Glossary
|
||||||
=============
|
=============
|
||||||
|
|||||||
57
docs/source/how_to_guides/extensible_rewards.rst
Normal file
57
docs/source/how_to_guides/extensible_rewards.rst
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
.. only:: comment
|
||||||
|
|
||||||
|
© Crown-owned copyright 2025, Defence Science and Technology Laboratory UK
|
||||||
|
|
||||||
|
.. _about:
|
||||||
|
|
||||||
|
Extensible Rewards
|
||||||
|
******************
|
||||||
|
Extensible Rewards differ from the previous reward mechanism used in PrimAITE v3.x as new reward
|
||||||
|
types can be added without requiring a change to the RewardFunction class in rewards.py (PrimAITE
|
||||||
|
core repository).
|
||||||
|
|
||||||
|
Changes to reward class structure.
|
||||||
|
==================================
|
||||||
|
|
||||||
|
Reward classes are inherited from AbstractReward (a sub-class of Pydantic's BaseModel).
|
||||||
|
Within the reward class there is a ConfigSchema class responsible for ensuring the config file data
|
||||||
|
is in the correct format. This also means there is little (if no) requirement for and `__init__`
|
||||||
|
method. The `.from_config` method is no longer required as it's inherited from `AbstractReward`.
|
||||||
|
Each class requires an identifier string which is used by the ConfigSchema class to verify that it
|
||||||
|
hasn't previously been added to the registry.
|
||||||
|
|
||||||
|
Inheriting from `BaseModel` removes the need for an `__init__` method but means that object
|
||||||
|
attributes need to be passed by keyword.
|
||||||
|
|
||||||
|
To add a new reward class follow the example below. Note that the type attribute in the
|
||||||
|
`ConfigSchema` class should match the type used in the config file to define the reward.
|
||||||
|
|
||||||
|
.. code-block:: Python
|
||||||
|
|
||||||
|
class DatabaseFileIntegrity(AbstractReward, identifier="DATABASE_FILE_INTEGRITY"):
|
||||||
|
"""Reward function component which rewards the agent for maintaining the integrity of a database file."""
|
||||||
|
|
||||||
|
config: "DatabaseFileIntegrity.ConfigSchema"
|
||||||
|
location_in_state: List[str] = [""]
|
||||||
|
reward: float = 0.0
|
||||||
|
|
||||||
|
class ConfigSchema(AbstractReward.ConfigSchema):
|
||||||
|
"""ConfigSchema for DatabaseFileIntegrity."""
|
||||||
|
|
||||||
|
type: str = "DATABASE_FILE_INTEGRITY"
|
||||||
|
node_hostname: str
|
||||||
|
folder_name: str
|
||||||
|
file_name: str
|
||||||
|
|
||||||
|
def calculate(self, state: Dict, last_action_response: "AgentHistoryItem") -> float:
|
||||||
|
"""Calculate the reward for the current state.
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Changes to YAML file.
|
||||||
|
=====================
|
||||||
|
.. code:: YAML
|
||||||
|
|
||||||
|
There's no longer a need to provide a `dns_server` as an option in the simulation section
|
||||||
|
of the config file.
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
.. only:: comment
|
.. only:: comment
|
||||||
|
|
||||||
© Crown-owned copyright 2024, Defence Science and Technology Laboratory UK
|
© Crown-owned copyright 2025, Defence Science and Technology Laboratory UK
|
||||||
|
|
||||||
.. _network_node_adder:
|
.. _network_node_adder:
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
.. only:: comment
|
.. only:: comment
|
||||||
|
|
||||||
© Crown-owned copyright 2024, Defence Science and Technology Laboratory UK
|
© Crown-owned copyright 2025, Defence Science and Technology Laboratory UK
|
||||||
|
|
||||||
.. _Executed Notebooks:
|
.. _Executed Notebooks:
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
.. only:: comment
|
.. only:: comment
|
||||||
|
|
||||||
© Crown-owned copyright 2024, Defence Science and Technology Laboratory UK
|
© Crown-owned copyright 2025, Defence Science and Technology Laboratory UK
|
||||||
|
|
||||||
+-------------------+---------+------------------------------------+-------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------+
|
+-------------------+---------+------------------------------------+-------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------+
|
||||||
| Name | Version | License | Description | URL |
|
| Name | Version | License | Description | URL |
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
.. only:: comment
|
.. only:: comment
|
||||||
|
|
||||||
© Crown-owned copyright 2024, Defence Science and Technology Laboratory UK
|
© Crown-owned copyright 2025, Defence Science and Technology Laboratory UK
|
||||||
|
|
||||||
Request System
|
Request System
|
||||||
**************
|
**************
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
.. only:: comment
|
.. only:: comment
|
||||||
|
|
||||||
© Crown-owned copyright 2024, Defence Science and Technology Laboratory UK
|
© Crown-owned copyright 2025, Defence Science and Technology Laboratory UK
|
||||||
|
|
||||||
Rewards
|
Rewards
|
||||||
#######
|
#######
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
.. only:: comment
|
.. only:: comment
|
||||||
|
|
||||||
© Crown-owned copyright 2024, Defence Science and Technology Laboratory UK
|
© Crown-owned copyright 2025, Defence Science and Technology Laboratory UK
|
||||||
|
|
||||||
|
|
||||||
Simulation
|
Simulation
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
.. only:: comment
|
.. only:: comment
|
||||||
|
|
||||||
© Crown-owned copyright 2024, Defence Science and Technology Laboratory UK
|
© Crown-owned copyright 2025, Defence Science and Technology Laboratory UK
|
||||||
|
|
||||||
.. _airspace:
|
.. _airspace:
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
.. only:: comment
|
.. only:: comment
|
||||||
|
|
||||||
© Crown-owned copyright 2024, Defence Science and Technology Laboratory UK
|
© Crown-owned copyright 2025, Defence Science and Technology Laboratory UK
|
||||||
|
|
||||||
#############
|
#############
|
||||||
Base Hardware
|
Base Hardware
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
.. only:: comment
|
.. only:: comment
|
||||||
|
|
||||||
© Crown-owned copyright 2024, Defence Science and Technology Laboratory UK
|
© Crown-owned copyright 2025, Defence Science and Technology Laboratory UK
|
||||||
|
|
||||||
.. _network:
|
.. _network:
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
.. only:: comment
|
.. only:: comment
|
||||||
|
|
||||||
© Crown-owned copyright 2024, Defence Science and Technology Laboratory UK
|
© Crown-owned copyright 2025, Defence Science and Technology Laboratory UK
|
||||||
|
|
||||||
#################################
|
#################################
|
||||||
Network Interface Hierarchy Model
|
Network Interface Hierarchy Model
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
.. only:: comment
|
.. only:: comment
|
||||||
|
|
||||||
© Crown-owned copyright 2024, Defence Science and Technology Laboratory UK
|
© Crown-owned copyright 2025, Defence Science and Technology Laboratory UK
|
||||||
|
|
||||||
########
|
########
|
||||||
Firewall
|
Firewall
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
.. only:: comment
|
.. only:: comment
|
||||||
|
|
||||||
© Crown-owned copyright 2024, Defence Science and Technology Laboratory UK
|
© Crown-owned copyright 2025, Defence Science and Technology Laboratory UK
|
||||||
|
|
||||||
|
|
||||||
#########
|
#########
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
.. only:: comment
|
.. only:: comment
|
||||||
|
|
||||||
© Crown-owned copyright 2024, Defence Science and Technology Laboratory UK
|
© Crown-owned copyright 2025, Defence Science and Technology Laboratory UK
|
||||||
|
|
||||||
############
|
############
|
||||||
Network Node
|
Network Node
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
.. only:: comment
|
.. only:: comment
|
||||||
|
|
||||||
© Crown-owned copyright 2024, Defence Science and Technology Laboratory UK
|
© Crown-owned copyright 2025, Defence Science and Technology Laboratory UK
|
||||||
|
|
||||||
######
|
######
|
||||||
Router
|
Router
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
.. only:: comment
|
.. only:: comment
|
||||||
|
|
||||||
© Crown-owned copyright 2024, Defence Science and Technology Laboratory UK
|
© Crown-owned copyright 2025, Defence Science and Technology Laboratory UK
|
||||||
|
|
||||||
######
|
######
|
||||||
Switch
|
Switch
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
.. only:: comment
|
.. only:: comment
|
||||||
|
|
||||||
© Crown-owned copyright 2024, Defence Science and Technology Laboratory UK
|
© Crown-owned copyright 2025, Defence Science and Technology Laboratory UK
|
||||||
|
|
||||||
######
|
######
|
||||||
Wireless Router
|
Wireless Router
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
.. only:: comment
|
.. only:: comment
|
||||||
|
|
||||||
© Crown-owned copyright 2024, Defence Science and Technology Laboratory UK
|
© Crown-owned copyright 2025, Defence Science and Technology Laboratory UK
|
||||||
|
|
||||||
Transport Layer to Data Link Layer
|
Transport Layer to Data Link Layer
|
||||||
==================================
|
==================================
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
.. only:: comment
|
.. only:: comment
|
||||||
|
|
||||||
© Crown-owned copyright 2024, Defence Science and Technology Laboratory UK
|
© Crown-owned copyright 2025, Defence Science and Technology Laboratory UK
|
||||||
|
|
||||||
.. _C2_Suite:
|
.. _C2_Suite:
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
.. only:: comment
|
.. only:: comment
|
||||||
|
|
||||||
© Crown-owned copyright 2024, Defence Science and Technology Laboratory UK
|
© Crown-owned copyright 2025, Defence Science and Technology Laboratory UK
|
||||||
|
|
||||||
.. _DataManipulationBot:
|
.. _DataManipulationBot:
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
.. only:: comment
|
.. only:: comment
|
||||||
|
|
||||||
© Crown-owned copyright 2024, Defence Science and Technology Laboratory UK
|
© Crown-owned copyright 2025, Defence Science and Technology Laboratory UK
|
||||||
|
|
||||||
.. _DatabaseClient:
|
.. _DatabaseClient:
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
.. only:: comment
|
.. only:: comment
|
||||||
|
|
||||||
© Crown-owned copyright 2024, Defence Science and Technology Laboratory UK
|
© Crown-owned copyright 2025, Defence Science and Technology Laboratory UK
|
||||||
|
|
||||||
.. _DoSBot:
|
.. _DoSBot:
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
.. only:: comment
|
.. only:: comment
|
||||||
|
|
||||||
© Crown-owned copyright 2024, Defence Science and Technology Laboratory UK
|
© Crown-owned copyright 2025, Defence Science and Technology Laboratory UK
|
||||||
|
|
||||||
.. _NMAP:
|
.. _NMAP:
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
.. only:: comment
|
.. only:: comment
|
||||||
|
|
||||||
© Crown-owned copyright 2024, Defence Science and Technology Laboratory UK
|
© Crown-owned copyright 2025, Defence Science and Technology Laboratory UK
|
||||||
|
|
||||||
.. _RansomwareScript:
|
.. _RansomwareScript:
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
.. only:: comment
|
.. only:: comment
|
||||||
|
|
||||||
© Crown-owned copyright 2024, Defence Science and Technology Laboratory UK
|
© Crown-owned copyright 2025, Defence Science and Technology Laboratory UK
|
||||||
|
|
||||||
.. _WebBrowser:
|
.. _WebBrowser:
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
.. only:: comment
|
.. only:: comment
|
||||||
|
|
||||||
© Crown-owned copyright 2024, Defence Science and Technology Laboratory UK
|
© Crown-owned copyright 2025, Defence Science and Technology Laboratory UK
|
||||||
|
|
||||||
.. _Common Configuration:
|
.. _Common Configuration:
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
.. only:: comment
|
.. only:: comment
|
||||||
|
|
||||||
© Crown-owned copyright 2024, Defence Science and Technology Laboratory UK
|
© Crown-owned copyright 2025, Defence Science and Technology Laboratory UK
|
||||||
|
|
||||||
.. _Database Payload List:
|
.. _Database Payload List:
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
.. only:: comment
|
.. only:: comment
|
||||||
|
|
||||||
© Crown-owned copyright 2024, Defence Science and Technology Laboratory UK
|
© Crown-owned copyright 2025, Defence Science and Technology Laboratory UK
|
||||||
|
|
||||||
.. _internal_frame_processing:
|
.. _internal_frame_processing:
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
.. only:: comment
|
.. only:: comment
|
||||||
|
|
||||||
© Crown-owned copyright 2024, Defence Science and Technology Laboratory UK
|
© Crown-owned copyright 2025, Defence Science and Technology Laboratory UK
|
||||||
|
|
||||||
.. toctree::
|
.. toctree::
|
||||||
:maxdepth: 1
|
:maxdepth: 1
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
.. only:: comment
|
.. only:: comment
|
||||||
|
|
||||||
© Crown-owned copyright 2024, Defence Science and Technology Laboratory UK
|
© Crown-owned copyright 2025, Defence Science and Technology Laboratory UK
|
||||||
|
|
||||||
.. toctree::
|
.. toctree::
|
||||||
:maxdepth: 1
|
:maxdepth: 1
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
.. only:: comment
|
.. only:: comment
|
||||||
|
|
||||||
© Crown-owned copyright 2024, Defence Science and Technology Laboratory UK
|
© Crown-owned copyright 2025, Defence Science and Technology Laboratory UK
|
||||||
|
|
||||||
``system applications``
|
``system applications``
|
||||||
"""""""""""""""""""""""
|
"""""""""""""""""""""""
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
.. only:: comment
|
.. only:: comment
|
||||||
|
|
||||||
© Crown-owned copyright 2024, Defence Science and Technology Laboratory UK
|
© Crown-owned copyright 2025, Defence Science and Technology Laboratory UK
|
||||||
|
|
||||||
``system services``
|
``system services``
|
||||||
"""""""""""""""""""
|
"""""""""""""""""""
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
.. only:: comment
|
.. only:: comment
|
||||||
|
|
||||||
© Crown-owned copyright 2024, Defence Science and Technology Laboratory UK
|
© Crown-owned copyright 2025, Defence Science and Technology Laboratory UK
|
||||||
|
|
||||||
PCAP
|
PCAP
|
||||||
====
|
====
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
.. only:: comment
|
.. only:: comment
|
||||||
|
|
||||||
© Crown-owned copyright 2024, Defence Science and Technology Laboratory UK
|
© Crown-owned copyright 2025, Defence Science and Technology Laboratory UK
|
||||||
|
|
||||||
.. _DatabaseService:
|
.. _DatabaseService:
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
.. only:: comment
|
.. only:: comment
|
||||||
|
|
||||||
© Crown-owned copyright 2024, Defence Science and Technology Laboratory UK
|
© Crown-owned copyright 2025, Defence Science and Technology Laboratory UK
|
||||||
|
|
||||||
.. _DNSClient:
|
.. _DNSClient:
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
.. only:: comment
|
.. only:: comment
|
||||||
|
|
||||||
© Crown-owned copyright 2024, Defence Science and Technology Laboratory UK
|
© Crown-owned copyright 2025, Defence Science and Technology Laboratory UK
|
||||||
|
|
||||||
.. _DNSServer:
|
.. _DNSServer:
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
.. only:: comment
|
.. only:: comment
|
||||||
|
|
||||||
© Crown-owned copyright 2024, Defence Science and Technology Laboratory UK
|
© Crown-owned copyright 2025, Defence Science and Technology Laboratory UK
|
||||||
|
|
||||||
.. _FTPClient:
|
.. _FTPClient:
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
.. only:: comment
|
.. only:: comment
|
||||||
|
|
||||||
© Crown-owned copyright 2024, Defence Science and Technology Laboratory UK
|
© Crown-owned copyright 2025, Defence Science and Technology Laboratory UK
|
||||||
|
|
||||||
.. _FTPServer:
|
.. _FTPServer:
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
.. only:: comment
|
.. only:: comment
|
||||||
|
|
||||||
© Crown-owned copyright 2024, Defence Science and Technology Laboratory UK
|
© Crown-owned copyright 2025, Defence Science and Technology Laboratory UK
|
||||||
|
|
||||||
.. _NTPClient:
|
.. _NTPClient:
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
.. only:: comment
|
.. only:: comment
|
||||||
|
|
||||||
© Crown-owned copyright 2024, Defence Science and Technology Laboratory UK
|
© Crown-owned copyright 2025, Defence Science and Technology Laboratory UK
|
||||||
|
|
||||||
.. _NTPServer:
|
.. _NTPServer:
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
.. only:: comment
|
.. only:: comment
|
||||||
|
|
||||||
© Crown-owned copyright 2024, Defence Science and Technology Laboratory UK
|
© Crown-owned copyright 2025, Defence Science and Technology Laboratory UK
|
||||||
|
|
||||||
.. _Terminal:
|
.. _Terminal:
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
.. only:: comment
|
.. only:: comment
|
||||||
|
|
||||||
© Crown-owned copyright 2024, Defence Science and Technology Laboratory UK
|
© Crown-owned copyright 2025, Defence Science and Technology Laboratory UK
|
||||||
|
|
||||||
.. _WebServer:
|
.. _WebServer:
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
.. only:: comment
|
.. only:: comment
|
||||||
|
|
||||||
© Crown-owned copyright 2024, Defence Science and Technology Laboratory UK
|
© Crown-owned copyright 2025, Defence Science and Technology Laboratory UK
|
||||||
|
|
||||||
Session and Software Manager
|
Session and Software Manager
|
||||||
============================
|
============================
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
.. only:: comment
|
.. only:: comment
|
||||||
|
|
||||||
© Crown-owned copyright 2024, Defence Science and Technology Laboratory UK
|
© Crown-owned copyright 2025, Defence Science and Technology Laboratory UK
|
||||||
|
|
||||||
.. _software:
|
.. _software:
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
.. only:: comment
|
.. only:: comment
|
||||||
|
|
||||||
© Crown-owned copyright 2024, Defence Science and Technology Laboratory UK
|
© Crown-owned copyright 2025, Defence Science and Technology Laboratory UK
|
||||||
|
|
||||||
SysLog
|
SysLog
|
||||||
======
|
======
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
.. only:: comment
|
.. only:: comment
|
||||||
|
|
||||||
© Crown-owned copyright 2024, Defence Science and Technology Laboratory UK
|
© Crown-owned copyright 2025, Defence Science and Technology Laboratory UK
|
||||||
|
|
||||||
|
|
||||||
Simulation Structure
|
Simulation Structure
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
.. only:: comment
|
.. only:: comment
|
||||||
|
|
||||||
© Crown-owned copyright 2024, Defence Science and Technology Laboratory UK
|
© Crown-owned copyright 2025, Defence Science and Technology Laboratory UK
|
||||||
|
|
||||||
Simulation State
|
Simulation State
|
||||||
================
|
================
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
.. only:: comment
|
.. only:: comment
|
||||||
|
|
||||||
© Crown-owned copyright 2024, Defence Science and Technology Laboratory UK
|
© Crown-owned copyright 2025, Defence Science and Technology Laboratory UK
|
||||||
|
|
||||||
Defining variations in the config files
|
Defining variations in the config files
|
||||||
=======================================
|
=======================================
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# © Crown-owned copyright 2024, Defence Science and Technology Laboratory UK
|
# © Crown-owned copyright 2025, Defence Science and Technology Laboratory UK
|
||||||
import datetime as datetime
|
import datetime as datetime
|
||||||
import logging
|
import logging
|
||||||
import logging.config
|
import logging.config
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# © Crown-owned copyright 2024, Defence Science and Technology Laboratory UK
|
# © Crown-owned copyright 2025, Defence Science and Technology Laboratory UK
|
||||||
"""
|
"""
|
||||||
This module contains the ActionManager class which belongs to the Agent class.
|
This module contains the ActionManager class which belongs to the Agent class.
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# © Crown-owned copyright 2024, Defence Science and Technology Laboratory UK
|
# © Crown-owned copyright 2025, Defence Science and Technology Laboratory UK
|
||||||
"""Provides a CLI using Typer as an entry point."""
|
"""Provides a CLI using Typer as an entry point."""
|
||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
# © Crown-owned copyright 2024, Defence Science and Technology Laboratory UK
|
# © Crown-owned copyright 2025, Defence Science and Technology Laboratory UK
|
||||||
"""Configuration parameters for running experiments."""
|
"""Configuration parameters for running experiments."""
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# © Crown-owned copyright 2024, Defence Science and Technology Laboratory UK
|
# © Crown-owned copyright 2025, Defence Science and Technology Laboratory UK
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import Dict, Final, Union
|
from typing import Dict, Final, Union
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# © Crown-owned copyright 2024, Defence Science and Technology Laboratory UK
|
# © Crown-owned copyright 2025, Defence Science and Technology Laboratory UK
|
||||||
class PrimaiteError(Exception):
|
class PrimaiteError(Exception):
|
||||||
"""The root PrimAITE Error."""
|
"""The root PrimAITE Error."""
|
||||||
|
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
# © Crown-owned copyright 2024, Defence Science and Technology Laboratory UK
|
# © Crown-owned copyright 2025, Defence Science and Technology Laboratory UK
|
||||||
"""PrimAITE Game Layer."""
|
"""PrimAITE Game Layer."""
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
# © Crown-owned copyright 2024, Defence Science and Technology Laboratory UK
|
# © Crown-owned copyright 2025, Defence Science and Technology Laboratory UK
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# © Crown-owned copyright 2024, Defence Science and Technology Laboratory UK
|
# © Crown-owned copyright 2025, Defence Science and Technology Laboratory UK
|
||||||
import logging
|
import logging
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# © Crown-owned copyright 2024, Defence Science and Technology Laboratory UK
|
# © Crown-owned copyright 2025, Defence Science and Technology Laboratory UK
|
||||||
"""Interface for agents."""
|
"""Interface for agents."""
|
||||||
from abc import ABC, abstractmethod
|
from abc import ABC, abstractmethod
|
||||||
from typing import Any, Dict, List, Optional, Tuple, TYPE_CHECKING
|
from typing import Any, Dict, List, Optional, Tuple, TYPE_CHECKING
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# © Crown-owned copyright 2024, Defence Science and Technology Laboratory UK
|
# © Crown-owned copyright 2025, Defence Science and Technology Laboratory UK
|
||||||
# flake8: noqa
|
# flake8: noqa
|
||||||
# Pre-import all the observations when we load up the observations module so that they can be resolved by the parser.
|
# Pre-import all the observations when we load up the observations module so that they can be resolved by the parser.
|
||||||
from primaite.game.agent.observations.acl_observation import ACLObservation
|
from primaite.game.agent.observations.acl_observation import ACLObservation
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# © Crown-owned copyright 2024, Defence Science and Technology Laboratory UK
|
# © Crown-owned copyright 2025, Defence Science and Technology Laboratory UK
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
from ipaddress import IPv4Address
|
from ipaddress import IPv4Address
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# © Crown-owned copyright 2024, Defence Science and Technology Laboratory UK
|
# © Crown-owned copyright 2025, Defence Science and Technology Laboratory UK
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
from typing import Dict, Iterable, List, Optional
|
from typing import Dict, Iterable, List, Optional
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# © Crown-owned copyright 2024, Defence Science and Technology Laboratory UK
|
# © Crown-owned copyright 2025, Defence Science and Technology Laboratory UK
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
from typing import Dict, List, Optional
|
from typing import Dict, List, Optional
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# © Crown-owned copyright 2024, Defence Science and Technology Laboratory UK
|
# © Crown-owned copyright 2025, Defence Science and Technology Laboratory UK
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
from typing import Dict, List, Optional
|
from typing import Dict, List, Optional
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# © Crown-owned copyright 2024, Defence Science and Technology Laboratory UK
|
# © Crown-owned copyright 2025, Defence Science and Technology Laboratory UK
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
from typing import Any, Dict, List
|
from typing import Any, Dict, List
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user