Commit Graph

836 Commits

Author SHA1 Message Date
Jake Walker
92dabe59f7 Fix data manipulation bot configuration 2023-11-24 10:04:19 +00:00
Jake Walker
b13a9d3daf Add application execution action for data manipulation bot 2023-11-24 09:25:55 +00:00
Jake Walker
5f1a5af1b4 Add data manipulation bot action manager 2023-11-23 16:06:19 +00:00
Jake Walker
c93705867f Move configuration from agent to data manipulation bot 2023-11-23 15:53:47 +00:00
Jake Walker
061e508187 Add repeat option to data manipulation bot 2023-11-22 16:24:17 +00:00
Jake Walker
aa65c53a95 Pass probability of success through to functions 2023-11-21 15:09:51 +00:00
Jake Walker
48af022963 Run agent at configured timesteps 2023-11-21 13:41:38 +00:00
Jake Walker
d8154bbebd Add tests for data manipulation bot attack stages 2023-11-21 11:43:47 +00:00
Jake Walker
2975aa8827 Execute data manipulation bots from agent 2023-11-21 11:42:01 +00:00
Jake Walker
7e0e8a4768 Pass agent settings from config to agent 2023-11-20 10:38:01 +00:00
Jake Walker
227e73602f Pass execution definition from config to agent 2023-11-17 11:51:19 +00:00
Jake Walker
1c5ff66d26 Pass execution definition from config to agent 2023-11-16 13:26:30 +00:00
Chris McCarthy
23fd9c3839 #1859 - Started giving the red agent some 'intelligence' and a sense of a state. Changed Application.run to .execute. 2023-11-13 15:55:14 +00:00
Czar Echavez
815bdfe603 Merged PR 206: 1962-Folder and File restore
## Summary
- Implement the folder/file restore
- Split the FileSystem and its classes into their own files so that it is easier to maintain.
- Reimplement how deleted folders and files are stored in a deleted list, so that it is possible to restore later

## Test process
See https://dev.azure.com/ma-dev-uk/PrimAITE/_git/PrimAITE/pullrequest/206?_a=files&path=/tests/unit_tests/_primaite/_simulator/_file_system
- Unit tests written to make sure methods work as intended
- Integration tests with the apply_request method which tests that the agents can send the request to the simulation to affect it

## Checklist
- [X] PR is linked to a **work item**
- [X] **acceptance criteria** of linked ticket are met
- [X] performed **self-review** of the code
- [X] written **tests** for any new functionality added with this PR
- [ ] updated the **documentation** if this PR changes or adds functionality
- [ ] written/updated **design docs** if this PR implements new functionality
- [ ] updated the **change log**
- [X] ran **pre-commit** checks for code style
- [ ] attended to any **TO-DOs** left in the code

Related work items: #1962
2023-11-09 11:55:53 +00:00
Czar.Echavez
6e1f9bd63d #1962: add gate installation for docs build pipeline 2023-11-08 13:00:07 +00:00
Czar.Echavez
be4a467877 #1962: revert pulling from src 2023-11-08 10:48:41 +00:00
Czar.Echavez
f5df1366a7 #1962: merge dev into branch + fix minor diffs + ensure that imports pull from src 2023-11-08 10:36:47 +00:00
Marek Wolan
c060991084 Merged PR 207: Game layer
## Summary
- Remove v2-specific code, documentation, and tests
- Reconnect CLI, to new v3 classes and functions
- Add Game layer
- Minor changes to simulation layer to ensure compatibility with game layer actions and observations

### Game layer
- Add a primaite session, which is the main entry point to running a session. This encompasses agents, the simulation, and a connection with GATE.
- Add an agent interface, random agents, and RL agents.
- Add new observation space management
- Add new action space management
- Add new reward function management

## Test process
Ran primaite session without crash. Majority of integration and unit tests have not been written yet. (sorry)

I know it's not ideal to merge in this not-tested-state, but it doesn't make sense to continue diverging `dev` and `dev-game-layer`.

Instead of reviewing the diff, I would recommend downloading this code and getting familiarised with the new `game` module by reading the code and playing around with it.

Related work items: #1622, #1759, #1760, #1761, #1764, #1765, #1766, #1767, #1768, #1879, #1924, #1986, #1987, #1988, #1989, #1990, #1998
2023-11-07 16:03:43 +00:00
Czar Echavez
729ef2ebac Merged PR 208: #2025: added GATE installation as part of pipeline
## Summary
Installing GATE before running the primaite setup command so that the pipeline passes

## Test process
*How have you tested this (if applicable)?*

## Checklist
- [X] PR is linked to a **work item**
- [X] **acceptance criteria** of linked ticket are met
- [X] performed **self-review** of the code
- [ ] written **tests** for any new functionality added with this PR
- [ ] updated the **documentation** if this PR changes or adds functionality
- [ ] written/updated **design docs** if this PR implements new functionality
- [ ] updated the **change log**
- [X] ran **pre-commit** checks for code style
- [X] attended to any **TO-DOs** left in the code

#2025: added GATE installation as part of pipeline

Related work items: #2025
2023-11-07 15:03:00 +00:00
Czar.Echavez
d4679bb0e3 #2025: Missing character for GATE path 2023-11-07 14:09:22 +00:00
Czar.Echavez
e0d694a736 #2025: added GATE installation as part of pipeline 2023-11-07 14:00:08 +00:00
Marek Wolan
0ea282166d Merge remote-tracking branch 'origin/dev' into dev-game-layer 2023-11-06 16:23:29 +00:00
Czar.Echavez
eba10ae5ef #1962: clean up tests + improve the show command which shows the folders and files in file system 2023-11-06 11:56:44 +00:00
Czar.Echavez
535c1b19ab #1962: attempt to make the timestep actions look neater + adding logic that allows restoring a folder take multiple timesteps 2023-11-06 11:12:06 +00:00
Czar.Echavez
e70ceec716 #1962: folder/file restore logic 2023-11-06 10:22:08 +00:00
Czar.Echavez
51713bad74 #1962: split tests into managable files + implement deletion of folders and files + tests 2023-11-03 15:15:18 +00:00
Czar.Echavez
b2c3e273b7 #1962: separating file system into more managable files 2023-11-02 15:10:51 +00:00
Czar.Echavez
b67eb1bb34 #1962: separating file system into more managable files 2023-11-02 13:14:08 +00:00
Czar.Echavez
11848aa180 #1962: keeping track of deleted files 2023-10-31 15:52:44 +00:00
Czar Echavez
870707f86b Merged PR 200: Implement node scan and reset
## Summary
Implementing the ability for the simulation to scan all node components as well as the ability for the red agent to reveal the node and its components.

Implementing the ability for the simulation to reset a node

## Test process
Unit tests added

## Checklist
- [X] PR is linked to a **work item**
- [X] **acceptance criteria** of linked ticket are met
- [X] performed **self-review** of the code
- [X] written **tests** for any new functionality added with this PR
- [ ] updated the **documentation** if this PR changes or adds functionality
- [ ] written/updated **design docs** if this PR implements new functionality
- [ ] updated the **change log**
- [X] ran **pre-commit** checks for code style
- [ ] attended to any **TO-DOs** left in the code

Related work items: #1961
2023-10-30 16:47:28 +00:00
Czar.Echavez
98ca33e994 #1961: scanning no longer happens every timestep - the scan is all done in one timestep after the required timestep countdown is complete 2023-10-30 15:34:13 +00:00
Czar.Echavez
1ddf400d6f #1961: node resetting 2023-10-27 18:28:34 +01:00
Czar.Echavez
68b22b6444 #1961: node scanning + applying timestep to all components within node + node revealing to red 2023-10-27 17:50:41 +01:00
Marek Wolan
2923921559 Merged PR 199: Fix setup and session commands
## Summary
Make PrimAITE work with the new:
- configs
- CLI commands

## Test process
I ran primaite setup and primaite session to check that they work

## Checklist
- [x] PR is linked to a **work item**
- [x] **acceptance criteria** of linked ticket are met
- [x] performed **self-review** of the code
- [ ] written **tests** for any new functionality added with this PR
- [ ] updated the **documentation** if this PR changes or adds functionality
- [ ] written/updated **design docs** if this PR implements new functionality
- [ ] updated the **change log**
- [x] ran **pre-commit** checks for code style
- [ ] attended to any **TO-DOs** left in the code

Related work items: #1987, #1998
2023-10-27 15:14:06 +00:00
Marek Wolan
a37ce051c5 Add ARCD GATE setup to primaite setup 2023-10-27 14:50:31 +01:00
Marek Wolan
75d1fd20c3 Remove temporary files 2023-10-27 14:41:53 +01:00
Marek Wolan
b81c1739f8 Fix CLI and Session to work with new classes 2023-10-27 14:26:52 +01:00
Marek Wolan
6378ff3087 Merged PR 198: Updates to documentation
* STILL IN PROGRESS *

## Summary
Delete old documentation, write some more up-to-date documentation.

## Test process

## Checklist
- [ ] PR is linked to a **work item**
- [ ] **acceptance criteria** of linked ticket are met
- [ ] performed **self-review** of the code
- [ ] written **tests** for any new functionality added with this PR
- [ ] updated the **documentation** if this PR changes or adds functionality
- [ ] written/updated **design docs** if this PR implements new functionality
- [ ] updated the **change log**
- [ ] ran **pre-commit** checks for code style
- [ ] attended to any **TO-DOs** left in the code

Updates to documentation

Related work items: #1988, #1990
2023-10-27 11:33:09 +00:00
Marek Wolan
1ec1b319e5 Fix formatting in docs 2023-10-27 12:24:22 +01:00
Marek Wolan
d4eb499729 Start fixing up cli and setup 2023-10-27 12:20:23 +01:00
Marek Wolan
a06629ed0b Bump version 2023-10-27 11:48:54 +01:00
Marek Wolan
6ac7dcf9ac Update README.md 2023-10-27 11:48:22 +01:00
Marek Wolan
318c9f8c5a Fix formatting issues 2023-10-27 11:43:11 +01:00
Czar.Echavez
8783574442 #1961: os scan set up 2023-10-27 10:17:59 +01:00
Marek Wolan
11fad5084e Merged PR 197: Remove deprecated functionality
## Summary
* Delete many files which are not used with the new V3 approach. Including all the previous simulation files, as well as the old config, old session, etc.
* Delete tests for the removed functionality
* Note: this PR can only be merged after !195

## Test process
This PR Changes our Unit Test suite to only keep tests related to V3 code. All tests pass as of my recent attempt.

## Checklist
- [x] PR is linked to a **work item**
- [x] **acceptance criteria** of linked ticket are met
- [x] performed **self-review** of the code
- [~] written **tests** for any new functionality added with this PR
- [~] updated the **documentation** if this PR changes or adds functionality
- [n] written/updated **design docs** if this PR implements new functionality
- [x] updated the **change log**
- [x] ran **pre-commit** checks for code style
- [n] attended to any **TO-DOs** left in the code

Related work items: #1989, #1986
2023-10-26 14:33:31 +00:00
Marek Wolan
4f387cf092 Merged PR 195: Initial game layer functionality
## Summary
* add a new module `game` to PrimAITE
* this includes a new PrimaiteSession which creates a simulation, and multiple agents, and talks to GATE
* agent interface
* agent actions to work with Simulator requests
* agent observations that work with Simulator State
* agent rewards also with Simulator state

**note** that this branch is currently still in a broken state. Still need to do things like updating readme, install instructions, refactoring some poorly designed classes, and removing legacy code. These will be done in subsequent PRs to avoid making this PR even bigger than it needs to be. Still, please review this to familiarise yourself.

## Test process
Some unit tests exist but their coverage will be expanded.
I performed some test runs with to train a SB3 agent in GATE with a primaite simulation.

## Checklist
- [y] PR is linked to a **work item**
- [y] **acceptance criteria** of linked ticket are met
- [~] performed **self-review** of the code
- [n] written **tests** for any new functionality added with this PR
- [~] updated the **documentation** if this PR changes or adds functionality
- [~] written/updated **design docs** if this PR implements new functionality
- [~] updated the **change log**
- [y] ran **pre-commit** checks for code style
- [n] attended to any **TO-DOs** left in the code

Related work items: #1622, #1759, #1760, #1761, #1764, #1765, #1766, #1767, #1768, #1879, #1924
2023-10-26 12:49:11 +00:00
Marek Wolan
afa7916db0 Updates to documentation 2023-10-25 23:32:52 +01:00
Marek Wolan
450aa150ae Merge remote-tracking branch 'origin/dev-game-layer' into feature/1989-remove-v2-modules 2023-10-25 19:19:34 +01:00
Marek Wolan
02901a7c99 Apply suggestions from code review. 2023-10-25 19:07:45 +01:00
Marek Wolan
38b71c0c8e Update CHANGELOG 2023-10-25 18:06:33 +01:00