#1648 - Updated file header from 'Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence.' to '© Crown-owned copyright 2023, Defence Science and Technology Laboratory UK'
This commit is contained in:
@@ -62,7 +62,7 @@ observation_space:
|
|||||||
- name: LINK_TRAFFIC_LEVELS
|
- name: LINK_TRAFFIC_LEVELS
|
||||||
|
|
||||||
# Number of episodes for training to run per session
|
# Number of episodes for training to run per session
|
||||||
num_train_episodes: 500
|
num_train_episodes: 10
|
||||||
|
|
||||||
# Number of time_steps for training per episode
|
# Number of time_steps for training per episode
|
||||||
num_train_steps: 256
|
num_train_steps: 256
|
||||||
|
|||||||
@@ -393,11 +393,7 @@ def _plot_all_benchmarks_combined_session_av():
|
|||||||
metadata_dict = json.load(file)
|
metadata_dict = json.load(file)
|
||||||
df = _get_df_from_episode_av_reward_dict(metadata_dict["combined_av_reward_per_episode"])
|
df = _get_df_from_episode_av_reward_dict(metadata_dict["combined_av_reward_per_episode"])
|
||||||
|
|
||||||
fig.add_trace(
|
fig.add_trace(go.Scatter(x=df["episode"], y=df["rolling_av_reward"], mode="lines", name=dir.name))
|
||||||
go.Scatter(
|
|
||||||
x=df["episode"], y=df["rolling_av_reward"], mode="lines", name=dir.name, line={"color": "#FF0000"}
|
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
||||||
# Set the layout of the graph
|
# Set the layout of the graph
|
||||||
fig.update_layout(
|
fig.update_layout(
|
||||||
@@ -417,7 +413,7 @@ def run():
|
|||||||
"""Run the PrimAITE benchmark."""
|
"""Run the PrimAITE benchmark."""
|
||||||
start_datetime = datetime.now()
|
start_datetime = datetime.now()
|
||||||
av_reward_per_episode_dicts = {}
|
av_reward_per_episode_dicts = {}
|
||||||
for i in range(1, 11):
|
for i in range(1, 3):
|
||||||
print(f"Starting Benchmark Session: {i}")
|
print(f"Starting Benchmark Session: {i}")
|
||||||
with _get_benchmark_primaite_session() as session:
|
with _get_benchmark_primaite_session() as session:
|
||||||
session.learn()
|
session.learn()
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 119 KiB After Width: | Height: | Size: 87 KiB |
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 (C) Dstl 2023. DEFCON 703. Shared in confidence.
|
© Crown-owned copyright 2023, 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 (C) Dstl 2023. DEFCON 703. Shared in confidence.
|
© Crown-owned copyright 2023, 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.
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
.. only:: comment
|
.. only:: comment
|
||||||
|
|
||||||
Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence.
|
© Crown-owned copyright 2023, 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 (C) Dstl 2023. DEFCON 703. Shared in confidence.
|
# © Crown-owned copyright 2023, 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 (C) Dstl 2023. DEFCON 703. Shared in confidence.
|
© Crown-owned copyright 2023, 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 (C) Dstl 2023. DEFCON 703. Shared in confidence.
|
© Crown-owned copyright 2023, Defence Science and Technology Laboratory UK
|
||||||
|
|
||||||
.. _about:
|
.. _about:
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
.. only:: comment
|
.. only:: comment
|
||||||
|
|
||||||
Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence.
|
© Crown-owned copyright 2023, Defence Science and Technology Laboratory UK
|
||||||
|
|
||||||
.. _config:
|
.. _config:
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
.. only:: comment
|
.. only:: comment
|
||||||
|
|
||||||
Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence.
|
© Crown-owned copyright 2023, Defence Science and Technology Laboratory UK
|
||||||
|
|
||||||
Custom Agents
|
Custom Agents
|
||||||
=============
|
=============
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
.. only:: comment
|
.. only:: comment
|
||||||
|
|
||||||
Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence.
|
© Crown-owned copyright 2023, 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 (C) Dstl 2023. DEFCON 703. Shared in confidence.
|
© Crown-owned copyright 2023, Defence Science and Technology Laboratory UK
|
||||||
|
|
||||||
.. _getting-started:
|
.. _getting-started:
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
.. only:: comment
|
.. only:: comment
|
||||||
|
|
||||||
Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence.
|
© Crown-owned copyright 2023, Defence Science and Technology Laboratory UK
|
||||||
|
|
||||||
Glossary
|
Glossary
|
||||||
=============
|
=============
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
.. only:: comment
|
.. only:: comment
|
||||||
|
|
||||||
Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence.
|
© Crown-owned copyright 2023, Defence Science and Technology Laboratory UK
|
||||||
|
|
||||||
v1.2 to v2.0 Migration guide
|
v1.2 to v2.0 Migration guide
|
||||||
============================
|
============================
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
.. only:: comment
|
.. only:: comment
|
||||||
|
|
||||||
Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence.
|
© Crown-owned copyright 2023, Defence Science and Technology Laboratory UK
|
||||||
|
|
||||||
.. _run a primaite session:
|
.. _run a primaite session:
|
||||||
|
|
||||||
|
|||||||
2
setup.py
2
setup.py
@@ -1,4 +1,4 @@
|
|||||||
# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence.
|
# © Crown-owned copyright 2023, Defence Science and Technology Laboratory UK
|
||||||
from setuptools import setup
|
from setuptools import setup
|
||||||
from wheel.bdist_wheel import bdist_wheel as _bdist_wheel # noqa
|
from wheel.bdist_wheel import bdist_wheel as _bdist_wheel # noqa
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence.
|
# © Crown-owned copyright 2023, Defence Science and Technology Laboratory UK
|
||||||
import logging
|
import logging
|
||||||
import logging.config
|
import logging.config
|
||||||
import shutil
|
import shutil
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence.
|
# © Crown-owned copyright 2023, Defence Science and Technology Laboratory UK
|
||||||
"""Access Control List. Models firewall functionality."""
|
"""Access Control List. Models firewall functionality."""
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence.
|
# © Crown-owned copyright 2023, Defence Science and Technology Laboratory UK
|
||||||
"""A class that implements the access control list implementation for the network."""
|
"""A class that implements the access control list implementation for the network."""
|
||||||
import logging
|
import logging
|
||||||
from typing import Dict, Final, List, Union
|
from typing import Dict, Final, List, Union
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence.
|
# © Crown-owned copyright 2023, Defence Science and Technology Laboratory UK
|
||||||
"""A class that implements an access control list rule."""
|
"""A class that implements an access control list rule."""
|
||||||
from primaite.common.enums import RulePermissionType
|
from primaite.common.enums import RulePermissionType
|
||||||
|
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence.
|
# © Crown-owned copyright 2023, Defence Science and Technology Laboratory UK
|
||||||
"""Common interface between RL agents from different libraries and PrimAITE."""
|
"""Common interface between RL agents from different libraries and PrimAITE."""
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence.
|
# © Crown-owned copyright 2023, Defence Science and Technology Laboratory UK
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
import json
|
import json
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence.
|
# © Crown-owned copyright 2023, Defence Science and Technology Laboratory UK
|
||||||
import time
|
import time
|
||||||
from abc import abstractmethod
|
from abc import abstractmethod
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence.
|
# © Crown-owned copyright 2023, Defence Science and Technology Laboratory UK
|
||||||
from typing import Dict, List, Union
|
from typing import Dict, List, Union
|
||||||
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence.
|
# © Crown-owned copyright 2023, Defence Science and Technology Laboratory UK
|
||||||
import numpy as np
|
import numpy as np
|
||||||
|
|
||||||
from primaite.agents.hardcoded_abc import HardCodedAgentSessionABC
|
from primaite.agents.hardcoded_abc import HardCodedAgentSessionABC
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence.
|
# © Crown-owned copyright 2023, Defence Science and Technology Laboratory UK
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
import json
|
import json
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence.
|
# © Crown-owned copyright 2023, Defence Science and Technology Laboratory UK
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
import json
|
import json
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence.
|
# © Crown-owned copyright 2023, Defence Science and Technology Laboratory UK
|
||||||
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence.
|
# © Crown-owned copyright 2023, Defence Science and Technology Laboratory UK
|
||||||
from typing import Dict, List, Union
|
from typing import Dict, List, Union
|
||||||
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence.
|
# © Crown-owned copyright 2023, 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 (C) Dstl 2023. DEFCON 703. Shared in confidence.
|
# © Crown-owned copyright 2023, Defence Science and Technology Laboratory UK
|
||||||
"""Objects which are shared between many PrimAITE modules."""
|
"""Objects which are shared between many PrimAITE modules."""
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence.
|
# © Crown-owned copyright 2023, Defence Science and Technology Laboratory UK
|
||||||
"""Enumerations for APE."""
|
"""Enumerations for APE."""
|
||||||
|
|
||||||
from enum import Enum, IntEnum
|
from enum import Enum, IntEnum
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence.
|
# © Crown-owned copyright 2023, Defence Science and Technology Laboratory UK
|
||||||
"""The protocol class."""
|
"""The protocol class."""
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence.
|
# © Crown-owned copyright 2023, Defence Science and Technology Laboratory UK
|
||||||
"""The Service class."""
|
"""The Service class."""
|
||||||
|
|
||||||
from primaite.common.enums import SoftwareState
|
from primaite.common.enums import SoftwareState
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence.
|
# © Crown-owned copyright 2023, Defence Science and Technology Laboratory UK
|
||||||
"""Configuration parameters for running experiments."""
|
"""Configuration parameters for running experiments."""
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence.
|
# © Crown-owned copyright 2023, Defence Science and Technology Laboratory UK
|
||||||
from logging import Logger
|
from logging import Logger
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import Any, Dict, Final, Union
|
from typing import Any, Dict, Final, Union
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence.
|
# © Crown-owned copyright 2023, Defence Science and Technology Laboratory UK
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
from dataclasses import dataclass, field
|
from dataclasses import dataclass, field
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence.
|
# © Crown-owned copyright 2023, Defence Science and Technology Laboratory UK
|
||||||
"""Utility to generate plots of sessions metrics after PrimAITE."""
|
"""Utility to generate plots of sessions metrics after PrimAITE."""
|
||||||
from enum import Enum
|
from enum import Enum
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence.
|
# © Crown-owned copyright 2023, Defence Science and Technology Laboratory UK
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import Dict, Optional, Union
|
from typing import Dict, Optional, Union
|
||||||
|
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence.
|
# © Crown-owned copyright 2023, Defence Science and Technology Laboratory UK
|
||||||
"""Gym/Gymnasium environment for RL agents consisting of a simulated computer network."""
|
"""Gym/Gymnasium environment for RL agents consisting of a simulated computer network."""
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence.
|
# © Crown-owned copyright 2023, Defence Science and Technology Laboratory UK
|
||||||
"""Module for handling configurable observation spaces in PrimAITE."""
|
"""Module for handling configurable observation spaces in PrimAITE."""
|
||||||
import logging
|
import logging
|
||||||
from abc import ABC, abstractmethod
|
from abc import ABC, abstractmethod
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence.
|
# © Crown-owned copyright 2023, Defence Science and Technology Laboratory UK
|
||||||
"""Main environment module containing the PRIMmary AI Training Evironment (Primaite) class."""
|
"""Main environment module containing the PRIMmary AI Training Evironment (Primaite) class."""
|
||||||
import copy
|
import copy
|
||||||
import logging
|
import logging
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence.
|
# © Crown-owned copyright 2023, Defence Science and Technology Laboratory UK
|
||||||
"""Implements reward function."""
|
"""Implements reward function."""
|
||||||
from logging import Logger
|
from logging import Logger
|
||||||
from typing import Dict, TYPE_CHECKING, Union
|
from typing import Dict, TYPE_CHECKING, Union
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence.
|
# © Crown-owned copyright 2023, 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 (C) Dstl 2023. DEFCON 703. Shared in confidence.
|
# © Crown-owned copyright 2023, Defence Science and Technology Laboratory UK
|
||||||
"""Network connections between nodes in the simulation."""
|
"""Network connections between nodes in the simulation."""
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence.
|
# © Crown-owned copyright 2023, Defence Science and Technology Laboratory UK
|
||||||
"""The link class."""
|
"""The link class."""
|
||||||
from typing import List
|
from typing import List
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence.
|
# © Crown-owned copyright 2023, Defence Science and Technology Laboratory UK
|
||||||
"""The main PrimAITE session runner module."""
|
"""The main PrimAITE session runner module."""
|
||||||
import argparse
|
import argparse
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence.
|
# © Crown-owned copyright 2023, Defence Science and Technology Laboratory UK
|
||||||
"""Nodes represent network hosts in the simulation."""
|
"""Nodes represent network hosts in the simulation."""
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence.
|
# © Crown-owned copyright 2023, Defence Science and Technology Laboratory UK
|
||||||
"""An Active Node (i.e. not an actuator)."""
|
"""An Active Node (i.e. not an actuator)."""
|
||||||
import logging
|
import logging
|
||||||
from typing import Final
|
from typing import Final
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence.
|
# © Crown-owned copyright 2023, Defence Science and Technology Laboratory UK
|
||||||
"""The base Node class."""
|
"""The base Node class."""
|
||||||
from typing import Final
|
from typing import Final
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence.
|
# © Crown-owned copyright 2023, Defence Science and Technology Laboratory UK
|
||||||
"""Defines node behaviour for Green PoL."""
|
"""Defines node behaviour for Green PoL."""
|
||||||
from typing import TYPE_CHECKING, Union
|
from typing import TYPE_CHECKING, Union
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence.
|
# © Crown-owned copyright 2023, Defence Science and Technology Laboratory UK
|
||||||
"""Defines node behaviour for Green PoL."""
|
"""Defines node behaviour for Green PoL."""
|
||||||
from typing import TYPE_CHECKING, Union
|
from typing import TYPE_CHECKING, Union
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence.
|
# © Crown-owned copyright 2023, Defence Science and Technology Laboratory UK
|
||||||
"""The Passive Node class (i.e. an actuator)."""
|
"""The Passive Node class (i.e. an actuator)."""
|
||||||
from primaite.common.enums import HardwareState, NodeType, Priority
|
from primaite.common.enums import HardwareState, NodeType, Priority
|
||||||
from primaite.config.training_config import TrainingConfig
|
from primaite.config.training_config import TrainingConfig
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence.
|
# © Crown-owned copyright 2023, Defence Science and Technology Laboratory UK
|
||||||
"""A Service Node (i.e. not an actuator)."""
|
"""A Service Node (i.e. not an actuator)."""
|
||||||
import logging
|
import logging
|
||||||
from typing import Dict, Final
|
from typing import Dict, Final
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence.
|
# © Crown-owned copyright 2023, Defence Science and Technology Laboratory UK
|
||||||
"""Contains default jupyter notebooks which demonstrate PrimAITE functionality."""
|
"""Contains default jupyter notebooks which demonstrate PrimAITE functionality."""
|
||||||
|
|
||||||
import importlib.util
|
import importlib.util
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence.
|
# © Crown-owned copyright 2023, Defence Science and Technology Laboratory UK
|
||||||
"""Pattern of Life- Represents the actions of users on the network."""
|
"""Pattern of Life- Represents the actions of users on the network."""
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence.
|
# © Crown-owned copyright 2023, Defence Science and Technology Laboratory UK
|
||||||
"""Implements Pattern of Life on the network (nodes and links)."""
|
"""Implements Pattern of Life on the network (nodes and links)."""
|
||||||
from typing import Dict
|
from typing import Dict
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence.
|
# © Crown-owned copyright 2023, Defence Science and Technology Laboratory UK
|
||||||
"""
|
"""
|
||||||
Information Exchange Requirements for APE.
|
Information Exchange Requirements for APE.
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence.
|
# © Crown-owned copyright 2023, Defence Science and Technology Laboratory UK
|
||||||
"""Implements POL on the network (nodes and links) resulting from the red agent attack."""
|
"""Implements POL on the network (nodes and links) resulting from the red agent attack."""
|
||||||
from typing import Dict
|
from typing import Dict
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence.
|
# © Crown-owned copyright 2023, Defence Science and Technology Laboratory UK
|
||||||
"""Main entry point to PrimAITE. Configure training/evaluation experiments and input/output."""
|
"""Main entry point to PrimAITE. Configure training/evaluation experiments and input/output."""
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence.
|
# © Crown-owned copyright 2023, Defence Science and Technology Laboratory UK
|
||||||
"""Utilities to prepare the user's data folders."""
|
"""Utilities to prepare the user's data folders."""
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence.
|
# © Crown-owned copyright 2023, Defence Science and Technology Laboratory UK
|
||||||
|
|
||||||
from primaite import getLogger
|
from primaite import getLogger
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence.
|
# © Crown-owned copyright 2023, Defence Science and Technology Laboratory UK
|
||||||
import filecmp
|
import filecmp
|
||||||
import os
|
import os
|
||||||
import shutil
|
import shutil
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence.
|
# © Crown-owned copyright 2023, Defence Science and Technology Laboratory UK
|
||||||
import filecmp
|
import filecmp
|
||||||
import os
|
import os
|
||||||
import shutil
|
import shutil
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence.
|
# © Crown-owned copyright 2023, Defence Science and Technology Laboratory UK
|
||||||
"""Record data of the system's state and agent's observations and actions."""
|
"""Record data of the system's state and agent's observations and actions."""
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence.
|
# © Crown-owned copyright 2023, Defence Science and Technology Laboratory UK
|
||||||
"""The Transaction class."""
|
"""The Transaction class."""
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from typing import List, Optional, Tuple, TYPE_CHECKING, Union
|
from typing import List, Optional, Tuple, TYPE_CHECKING, Union
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence.
|
# © Crown-owned copyright 2023, Defence Science and Technology Laboratory UK
|
||||||
"""Utilities for PrimAITE."""
|
"""Utilities for PrimAITE."""
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence.
|
# © Crown-owned copyright 2023, Defence Science and Technology Laboratory UK
|
||||||
import os
|
import os
|
||||||
from logging import Logger
|
from logging import Logger
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence.
|
# © Crown-owned copyright 2023, Defence Science and Technology Laboratory UK
|
||||||
import json
|
import json
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import Any, Dict, Union
|
from typing import Any, Dict, Union
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence.
|
# © Crown-owned copyright 2023, Defence Science and Technology Laboratory UK
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import Any, Dict, Tuple, Union
|
from typing import Any, Dict, Tuple, Union
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence.
|
# © Crown-owned copyright 2023, Defence Science and Technology Laboratory UK
|
||||||
import csv
|
import csv
|
||||||
from logging import Logger
|
from logging import Logger
|
||||||
from typing import Final, List, Tuple, TYPE_CHECKING, Union
|
from typing import Final, List, Tuple, TYPE_CHECKING, Union
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence.
|
# © Crown-owned copyright 2023, Defence Science and Technology Laboratory UK
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import Final
|
from typing import Final
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence.
|
# © Crown-owned copyright 2023, Defence Science and Technology Laboratory UK
|
||||||
# Main Config File
|
# Main Config File
|
||||||
|
|
||||||
# Generic config values
|
# Generic config values
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence.
|
# © Crown-owned copyright 2023, Defence Science and Technology Laboratory UK
|
||||||
# Main Config File
|
# Main Config File
|
||||||
|
|
||||||
# Generic config values
|
# Generic config values
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence.
|
# © Crown-owned copyright 2023, Defence Science and Technology Laboratory UK
|
||||||
- item_type: PORTS
|
- item_type: PORTS
|
||||||
ports_list:
|
ports_list:
|
||||||
- port: '80'
|
- port: '80'
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence.
|
# © Crown-owned copyright 2023, Defence Science and Technology Laboratory UK
|
||||||
# Training Config File
|
# Training Config File
|
||||||
|
|
||||||
# Sets which agent algorithm framework will be used.
|
# Sets which agent algorithm framework will be used.
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence.
|
# © Crown-owned copyright 2023, Defence Science and Technology Laboratory UK
|
||||||
# Training Config File
|
# Training Config File
|
||||||
|
|
||||||
# Sets which agent algorithm framework will be used.
|
# Sets which agent algorithm framework will be used.
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence.
|
# © Crown-owned copyright 2023, Defence Science and Technology Laboratory UK
|
||||||
# Training Config File
|
# Training Config File
|
||||||
|
|
||||||
# Sets which agent algorithm framework will be used.
|
# Sets which agent algorithm framework will be used.
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence.
|
# © Crown-owned copyright 2023, Defence Science and Technology Laboratory UK
|
||||||
# Training Config File
|
# Training Config File
|
||||||
|
|
||||||
# Sets which agent algorithm framework will be used.
|
# Sets which agent algorithm framework will be used.
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence.
|
# © Crown-owned copyright 2023, Defence Science and Technology Laboratory UK
|
||||||
- item_type: PORTS
|
- item_type: PORTS
|
||||||
ports_list:
|
ports_list:
|
||||||
- port: '21'
|
- port: '21'
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence.
|
# © Crown-owned copyright 2023, Defence Science and Technology Laboratory UK
|
||||||
# Training Config File
|
# Training Config File
|
||||||
|
|
||||||
# Sets which agent algorithm framework will be used.
|
# Sets which agent algorithm framework will be used.
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence.
|
# © Crown-owned copyright 2023, Defence Science and Technology Laboratory UK
|
||||||
# Training Config File
|
# Training Config File
|
||||||
|
|
||||||
# Sets which agent algorithm framework will be used.
|
# Sets which agent algorithm framework will be used.
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence.
|
# © Crown-owned copyright 2023, Defence Science and Technology Laboratory UK
|
||||||
# Training Config File
|
# Training Config File
|
||||||
|
|
||||||
# Sets which agent algorithm framework will be used.
|
# Sets which agent algorithm framework will be used.
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence.
|
# © Crown-owned copyright 2023, Defence Science and Technology Laboratory UK
|
||||||
# Training Config File
|
# Training Config File
|
||||||
|
|
||||||
# Sets which agent algorithm framework will be used.
|
# Sets which agent algorithm framework will be used.
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence.
|
# © Crown-owned copyright 2023, Defence Science and Technology Laboratory UK
|
||||||
# Training Config File
|
# Training Config File
|
||||||
|
|
||||||
# Sets which agent algorithm framework will be used.
|
# Sets which agent algorithm framework will be used.
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence.
|
# © Crown-owned copyright 2023, Defence Science and Technology Laboratory UK
|
||||||
# Training Config File
|
# Training Config File
|
||||||
|
|
||||||
# Sets which agent algorithm framework will be used.
|
# Sets which agent algorithm framework will be used.
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence.
|
# © Crown-owned copyright 2023, Defence Science and Technology Laboratory UK
|
||||||
- item_type: PORTS
|
- item_type: PORTS
|
||||||
ports_list:
|
ports_list:
|
||||||
- port: '80'
|
- port: '80'
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence.
|
# © Crown-owned copyright 2023, Defence Science and Technology Laboratory UK
|
||||||
# Training Config File
|
# Training Config File
|
||||||
|
|
||||||
# Sets which agent algorithm framework will be used.
|
# Sets which agent algorithm framework will be used.
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence.
|
# © Crown-owned copyright 2023, Defence Science and Technology Laboratory UK
|
||||||
# Training Config File
|
# Training Config File
|
||||||
|
|
||||||
# Sets which agent algorithm framework will be used.
|
# Sets which agent algorithm framework will be used.
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence.
|
# © Crown-owned copyright 2023, Defence Science and Technology Laboratory UK
|
||||||
# Training Config File
|
# Training Config File
|
||||||
|
|
||||||
# Sets which agent algorithm framework will be used.
|
# Sets which agent algorithm framework will be used.
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence.
|
# © Crown-owned copyright 2023, Defence Science and Technology Laboratory UK
|
||||||
import datetime
|
import datetime
|
||||||
import shutil
|
import shutil
|
||||||
import tempfile
|
import tempfile
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence.
|
# © Crown-owned copyright 2023, Defence Science and Technology Laboratory UK
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence.
|
# © Crown-owned copyright 2023, Defence Science and Technology Laboratory UK
|
||||||
import tempfile
|
import tempfile
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence.
|
# © Crown-owned copyright 2023, Defence Science and Technology Laboratory UK
|
||||||
"""Used to tes the ACL functions."""
|
"""Used to tes the ACL functions."""
|
||||||
|
|
||||||
from primaite.acl.access_control_list import AccessControlList
|
from primaite.acl.access_control_list import AccessControlList
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence.
|
# © Crown-owned copyright 2023, Defence Science and Technology Laboratory UK
|
||||||
"""Used to test Active Node functions."""
|
"""Used to test Active Node functions."""
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence.
|
# © Crown-owned copyright 2023, Defence Science and Technology Laboratory UK
|
||||||
"""Test env creation and behaviour with different observation spaces."""
|
"""Test env creation and behaviour with different observation spaces."""
|
||||||
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence.
|
# © Crown-owned copyright 2023, Defence Science and Technology Laboratory UK
|
||||||
import os
|
import os
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence.
|
# © Crown-owned copyright 2023, Defence Science and Technology Laboratory UK
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
from primaite.config.lay_down_config import data_manipulation_config_path
|
from primaite.config.lay_down_config import data_manipulation_config_path
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence.
|
# © Crown-owned copyright 2023, Defence Science and Technology Laboratory UK
|
||||||
"""Used to test Active Node functions."""
|
"""Used to test Active Node functions."""
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user