Skip to content

Commit df10cf7

Browse files
authored
Merge pull request #78 from rickhg12hs/README_spelling
Update README.md: minor spelling, grammar, formatting
2 parents caf76a8 + c8b9e38 commit df10cf7

File tree

1 file changed

+16
-18
lines changed

1 file changed

+16
-18
lines changed

README.md

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,25 @@
11
# NetSecGameAgents
2-
Agents located in this repository should be use in the [Network Security Game](https://github.com/stratosphereips/NetSecGame) environment. They are intented for a navigation and problem solving in the adversarial network-security based environment where they play role of attackers or defenders.
2+
Agents located in this repository should be used in the [Network Security Game](https://github.com/stratosphereips/NetSecGame) environment. They are intended for navigation and problem solving in the adversarial network-security based environment where they play the role of attackers or defenders.
33

44
## BaseAgent
5-
All future agents should extend BaseAgent - a minimal implementation of agent capable of interaction with he environment. The base agent also implement logging capabilities for the agent via the `logging` module of python. The logger can be accessed by property `logger`.
5+
All future agents should extend BaseAgent - a minimal implementation of agent capable of interaction with the environment. The base agent also implements logging capabilities for the agent via the `logging` python module. The logger can be accessed by property `logger`.
66

77
For creating an instance of a `BaseAgent`, three parameters have to be used:
8-
1. `host:str` - URL where the game server runs
9-
2. `port: int` - port number where game server runs
8+
1. `host: str` - URL where the game server runs
9+
2. `port: int` - port number where game server runs
1010
3. `role: str` - Intended role of the agent. Options are `Attacker`, `Defender`, `Human`
1111

12-
When extending the `BaseAgent`, these args should be passed to in the constructor by calling:
13-
```super().__init__(host, port, role)```
12+
When extending the `BaseAgent`, these args should be passed to the constructor by calling:
13+
```
14+
super().__init__(host, port, role)
15+
```
1416

1517
There are 4 important methods to be used for interaction with the environment:
1618

17-
1. `register()`: Should be used ONCE in the beginning of the interaction to register the agent in the game.
19+
1. `register()`: Should be used ONCE at the beginning of the interaction to register the agent in the game.
1820
- Uses the class name and `role` specified in the initialization for the registration in the game
1921
- returns `Observation` which contains the status of the registration and the initial `GameState` if the registration was successful
20-
2. `make_step(Action: action)`: Used for sending a `Action` object to be used as a next step of the agent. Returns `Observation` with new state fo the environment after the action was applied.
22+
2. `make_step(Action: action)`: Used for sending an `Action` object to be used as a next step of the agent. Returns `Observation` with new state of the environment after the action was applied.
2123
3. `request_game_reset()`: Used to RESET the state of the environment to its initial position (e.g. at the end of an episode). Returns `Observation` with state of the environment.
2224
4. `terminate_connection()`: Should be used ONCE at the end of the interaction to properly disconnect the agent from the game server.
2325

@@ -35,7 +37,7 @@ There are three types of roles an agent can play in NetSecEnv:
3537
Agents of each type are stored in the corresponding directory within this repository:
3638
```
3739
├── agents
38-
├── attakcers
40+
├── attackers
3941
├── concepts_q_learning
4042
├── double_q_learning
4143
├── gnn_reinforce
@@ -48,11 +50,11 @@ Agents of each type are stored in the corresponding directory within this reposi
4850
├── benign_random
4951
```
5052
### Agent utils
51-
Utility functions in [agent_utils.py](./agents/agent_utils.py) can be used by any agent to evaluate a `GameState`, generate set of valid `Actions` in a `GameState` etc.
53+
Utility functions in [`agent_utils.py`](./agents/agent_utils.py) can be used by any agent to evaluate a `GameState`, and generate a set of valid `Actions` in a `GameState`, etc.
5254
Additionally, there are several files with utils functions that can be used by any agents:
53-
- `[agent_utils.py](./agents/agent_utils.py) Formatting GameState and generation of valid actions
54-
- [graph_agent_utils.py](./agents/graph_agent_utils.py): GameState -> graph conversion
55-
- [llm_utils.py](./agents/llm_utils.py): utility functions for LLM-based agents
55+
- [`agent_utils.py`](./agents/agent_utils.py) Formatting GameState and generation of valid actions
56+
- [`graph_agent_utils.py`](./agents/graph_agent_utils.py): GameState -> graph conversion
57+
- [`llm_utils.py`](./agents/llm_utils.py): utility functions for LLM-based agents
5658

5759
## Agents' compatibility with the environment
5860

@@ -68,9 +70,6 @@ Additionally, there are several files with utils functions that can be used by a
6870
|[Random Defender](./agents/defenders/random/random_agent.py)| [main](https://github.com/stratosphereips/NetSecGame/tree/main) | | 👷🏼‍♀️ |
6971
|[Probabilistic Defender](./agents/defenders/probabilistic/probabilistic_agent.py)| [main](https://github.com/stratosphereips/NetSecGame/tree/main) | | 👷🏼‍♀️ |
7072

71-
### Agent utils
72-
Utility functions in [agent_utils.py](./agents/agent_utils.py) can be used by any agent to evaluate a `GameState`, generate set of valid `Actions` in a `GameState` etc.
73-
7473
## Export to mlflow
7574

7675
Every agent by default exports the experiment details to a local mlflow directory.
@@ -88,6 +87,5 @@ If you want to export the local mlflow to a remote mlflow you can use our util
8887
python utils/export_import_mlflow_exp.py --experiment_id 783457873620024898 --run_id 5f2e4a205b7745259a4ddedc12d71a74 --remote_mlflow_url http://127.0.0.1:8000 --mlruns_dir ./mlruns
8988
```
9089

91-
9290
## About us
93-
This code was developed at the [Stratosphere Laboratory at the Czech Technical University in Prague](https://www.stratosphereips.org/) as part of the AIDojo Project.
91+
This code was developed at the [Stratosphere Laboratory at the Czech Technical University in Prague](https://www.stratosphereips.org/) as part of the [AIDojo Project](https://www.stratosphereips.org/ai-dojo).

0 commit comments

Comments
 (0)