mal-simulator 0.2.5__tar.gz → 0.2.7__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {mal_simulator-0.2.5/mal_simulator.egg-info → mal_simulator-0.2.7}/PKG-INFO +12 -3
- {mal_simulator-0.2.5 → mal_simulator-0.2.7}/README.md +9 -0
- {mal_simulator-0.2.5 → mal_simulator-0.2.7/mal_simulator.egg-info}/PKG-INFO +12 -3
- {mal_simulator-0.2.5 → mal_simulator-0.2.7}/mal_simulator.egg-info/requires.txt +2 -2
- {mal_simulator-0.2.5 → mal_simulator-0.2.7}/malsim/__init__.py +2 -2
- {mal_simulator-0.2.5 → mal_simulator-0.2.7}/malsim/mal_simulator.py +4 -2
- {mal_simulator-0.2.5 → mal_simulator-0.2.7}/pyproject.toml +3 -3
- {mal_simulator-0.2.5 → mal_simulator-0.2.7}/AUTHORS +0 -0
- {mal_simulator-0.2.5 → mal_simulator-0.2.7}/LICENSE +0 -0
- {mal_simulator-0.2.5 → mal_simulator-0.2.7}/mal_simulator.egg-info/SOURCES.txt +0 -0
- {mal_simulator-0.2.5 → mal_simulator-0.2.7}/mal_simulator.egg-info/dependency_links.txt +0 -0
- {mal_simulator-0.2.5 → mal_simulator-0.2.7}/mal_simulator.egg-info/entry_points.txt +0 -0
- {mal_simulator-0.2.5 → mal_simulator-0.2.7}/mal_simulator.egg-info/top_level.txt +0 -0
- {mal_simulator-0.2.5 → mal_simulator-0.2.7}/malsim/__main__.py +0 -0
- {mal_simulator-0.2.5 → mal_simulator-0.2.7}/malsim/agents/__init__.py +0 -0
- {mal_simulator-0.2.5 → mal_simulator-0.2.7}/malsim/agents/decision_agent.py +0 -0
- {mal_simulator-0.2.5 → mal_simulator-0.2.7}/malsim/agents/heuristic_agent.py +0 -0
- {mal_simulator-0.2.5 → mal_simulator-0.2.7}/malsim/agents/keyboard_input.py +0 -0
- {mal_simulator-0.2.5 → mal_simulator-0.2.7}/malsim/agents/passive_agent.py +0 -0
- {mal_simulator-0.2.5 → mal_simulator-0.2.7}/malsim/agents/searchers.py +0 -0
- {mal_simulator-0.2.5 → mal_simulator-0.2.7}/malsim/envs/__init__.py +0 -0
- {mal_simulator-0.2.5 → mal_simulator-0.2.7}/malsim/envs/base_classes.py +0 -0
- {mal_simulator-0.2.5 → mal_simulator-0.2.7}/malsim/envs/gym_envs.py +0 -0
- {mal_simulator-0.2.5 → mal_simulator-0.2.7}/malsim/envs/malsim_vectorized_obs_env.py +0 -0
- {mal_simulator-0.2.5 → mal_simulator-0.2.7}/malsim/scenario.py +0 -0
- {mal_simulator-0.2.5 → mal_simulator-0.2.7}/setup.cfg +0 -0
- {mal_simulator-0.2.5 → mal_simulator-0.2.7}/tests/test_main.py +0 -0
- {mal_simulator-0.2.5 → mal_simulator-0.2.7}/tests/test_mal_simulator.py +0 -0
- {mal_simulator-0.2.5 → mal_simulator-0.2.7}/tests/test_scenario.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: mal-simulator
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.7
|
|
4
4
|
Summary: A MAL compliant simulator.
|
|
5
5
|
Author-email: Andrei Buhaiu <buhaiu@kth.se>, Joakim Loxdal <loxdal@kth.se>, Jakob Nyberg <jaknyb@kth.se>, Nikolaos Kakouros <nkak@kth.se>
|
|
6
6
|
License: Apache Software License
|
|
@@ -19,12 +19,12 @@ Description-Content-Type: text/markdown
|
|
|
19
19
|
License-File: LICENSE
|
|
20
20
|
License-File: AUTHORS
|
|
21
21
|
Requires-Dist: py2neo>=2021.2.3
|
|
22
|
-
Requires-Dist: mal-toolbox
|
|
22
|
+
Requires-Dist: mal-toolbox~=0.3.0
|
|
23
23
|
Requires-Dist: PyYAML>=6.0.1
|
|
24
24
|
Provides-Extra: ml
|
|
25
25
|
Requires-Dist: numpy>=1.21.4; extra == "ml"
|
|
26
26
|
Requires-Dist: pettingzoo>=1.24.2; extra == "ml"
|
|
27
|
-
Requires-Dist: gymnasium
|
|
27
|
+
Requires-Dist: gymnasium~=1.0; extra == "ml"
|
|
28
28
|
Provides-Extra: dev
|
|
29
29
|
Requires-Dist: pytest; extra == "dev"
|
|
30
30
|
Requires-Dist: mypy; extra == "dev"
|
|
@@ -37,8 +37,17 @@ Requires-Dist: ruff; extra == "dev"
|
|
|
37
37
|
A MAL compliant simulator.
|
|
38
38
|
|
|
39
39
|
## Installation
|
|
40
|
+
|
|
40
41
|
```pip install mal-simulator```
|
|
41
42
|
|
|
43
|
+
To also get ML dependencies (numpy, pettingzoo, gymnasium):
|
|
44
|
+
|
|
45
|
+
```pip install mal-simulator[ml]```
|
|
46
|
+
|
|
47
|
+
For additional dev tools:
|
|
48
|
+
|
|
49
|
+
```pip install mal-simulator[dev]```
|
|
50
|
+
|
|
42
51
|
## MalSimulator
|
|
43
52
|
|
|
44
53
|
A `sims.mal_simulator.MalSimulator` can be created to be able to run simulations.
|
|
@@ -5,8 +5,17 @@
|
|
|
5
5
|
A MAL compliant simulator.
|
|
6
6
|
|
|
7
7
|
## Installation
|
|
8
|
+
|
|
8
9
|
```pip install mal-simulator```
|
|
9
10
|
|
|
11
|
+
To also get ML dependencies (numpy, pettingzoo, gymnasium):
|
|
12
|
+
|
|
13
|
+
```pip install mal-simulator[ml]```
|
|
14
|
+
|
|
15
|
+
For additional dev tools:
|
|
16
|
+
|
|
17
|
+
```pip install mal-simulator[dev]```
|
|
18
|
+
|
|
10
19
|
## MalSimulator
|
|
11
20
|
|
|
12
21
|
A `sims.mal_simulator.MalSimulator` can be created to be able to run simulations.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: mal-simulator
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.7
|
|
4
4
|
Summary: A MAL compliant simulator.
|
|
5
5
|
Author-email: Andrei Buhaiu <buhaiu@kth.se>, Joakim Loxdal <loxdal@kth.se>, Jakob Nyberg <jaknyb@kth.se>, Nikolaos Kakouros <nkak@kth.se>
|
|
6
6
|
License: Apache Software License
|
|
@@ -19,12 +19,12 @@ Description-Content-Type: text/markdown
|
|
|
19
19
|
License-File: LICENSE
|
|
20
20
|
License-File: AUTHORS
|
|
21
21
|
Requires-Dist: py2neo>=2021.2.3
|
|
22
|
-
Requires-Dist: mal-toolbox
|
|
22
|
+
Requires-Dist: mal-toolbox~=0.3.0
|
|
23
23
|
Requires-Dist: PyYAML>=6.0.1
|
|
24
24
|
Provides-Extra: ml
|
|
25
25
|
Requires-Dist: numpy>=1.21.4; extra == "ml"
|
|
26
26
|
Requires-Dist: pettingzoo>=1.24.2; extra == "ml"
|
|
27
|
-
Requires-Dist: gymnasium
|
|
27
|
+
Requires-Dist: gymnasium~=1.0; extra == "ml"
|
|
28
28
|
Provides-Extra: dev
|
|
29
29
|
Requires-Dist: pytest; extra == "dev"
|
|
30
30
|
Requires-Dist: mypy; extra == "dev"
|
|
@@ -37,8 +37,17 @@ Requires-Dist: ruff; extra == "dev"
|
|
|
37
37
|
A MAL compliant simulator.
|
|
38
38
|
|
|
39
39
|
## Installation
|
|
40
|
+
|
|
40
41
|
```pip install mal-simulator```
|
|
41
42
|
|
|
43
|
+
To also get ML dependencies (numpy, pettingzoo, gymnasium):
|
|
44
|
+
|
|
45
|
+
```pip install mal-simulator[ml]```
|
|
46
|
+
|
|
47
|
+
For additional dev tools:
|
|
48
|
+
|
|
49
|
+
```pip install mal-simulator[dev]```
|
|
50
|
+
|
|
42
51
|
## MalSimulator
|
|
43
52
|
|
|
44
53
|
A `sims.mal_simulator.MalSimulator` can be created to be able to run simulations.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
|
2
|
-
# MAL Simulator v0.2.
|
|
2
|
+
# MAL Simulator v0.2.7
|
|
3
3
|
# Copyright 2025, Andrei Buhaiu.
|
|
4
4
|
#
|
|
5
5
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -24,7 +24,7 @@ MAL Simulator
|
|
|
24
24
|
"""
|
|
25
25
|
|
|
26
26
|
__title__ = "malsim"
|
|
27
|
-
__version__ = "0.2.
|
|
27
|
+
__version__ = "0.2.7"
|
|
28
28
|
__authors__ = ["Andrei Buhaiu", "Joakim Loxdal", "Jakob Nyberg", "Nikolaos Kakouros"]
|
|
29
29
|
__license__ = "Apache 2.0"
|
|
30
30
|
__docformat__ = "restructuredtext en"
|
|
@@ -228,7 +228,8 @@ class MalSimulator():
|
|
|
228
228
|
for agent in self._get_attacker_agents():
|
|
229
229
|
attacker = agent.attacker
|
|
230
230
|
agent.reward = sum(
|
|
231
|
-
n.extras.get("reward", 0)
|
|
231
|
+
n.extras.get("reward", 0)
|
|
232
|
+
for n in attacker.reached_attack_steps
|
|
232
233
|
)
|
|
233
234
|
|
|
234
235
|
lost_reward = sum(
|
|
@@ -238,7 +239,8 @@ class MalSimulator():
|
|
|
238
239
|
)
|
|
239
240
|
|
|
240
241
|
for agent in self._get_defender_agents():
|
|
241
|
-
|
|
242
|
+
# Defenders get negative reward for pre-enabled nodes
|
|
243
|
+
agent.reward = -lost_reward
|
|
242
244
|
|
|
243
245
|
def _init_agent_action_surfaces(self):
|
|
244
246
|
"""Set agent action surfaces according to current state"""
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "mal-simulator"
|
|
3
|
-
version = "0.2.
|
|
3
|
+
version = "0.2.7"
|
|
4
4
|
authors = [
|
|
5
5
|
{ name="Andrei Buhaiu", email="buhaiu@kth.se" },
|
|
6
6
|
{ name="Joakim Loxdal", email="loxdal@kth.se" },
|
|
@@ -12,7 +12,7 @@ readme = "README.md"
|
|
|
12
12
|
requires-python = ">=3.10"
|
|
13
13
|
dependencies = [
|
|
14
14
|
"py2neo>=2021.2.3",
|
|
15
|
-
"mal-toolbox
|
|
15
|
+
"mal-toolbox~=0.3.0",
|
|
16
16
|
"PyYAML>=6.0.1"
|
|
17
17
|
]
|
|
18
18
|
license = {text = "Apache Software License"}
|
|
@@ -30,7 +30,7 @@ classifiers = [
|
|
|
30
30
|
ml = [
|
|
31
31
|
"numpy>=1.21.4",
|
|
32
32
|
"pettingzoo>=1.24.2",
|
|
33
|
-
"gymnasium
|
|
33
|
+
"gymnasium~=1.0",
|
|
34
34
|
]
|
|
35
35
|
dev = [
|
|
36
36
|
"pytest",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|