1
0
Fork 0

readme rewrite work 1

This commit is contained in:
Lili (Tlapka) 2021-05-18 14:51:14 +02:00
parent 16146babe6
commit 4cbd3d6092
1 changed files with 27 additions and 7 deletions

View File

@ -1,14 +1,19 @@
# Adaptive game assistant # Adaptive game assistant
This adaptive assistant was written for the remote testing of the adaptive version of the Captain Slovakistan game. It is licensed under MIT license. The adaptive game assistant is a Python program allowing easy deployment and playing of adaptive cybersecurity games.
It requires Python version at least 3.7, and the Python yaml package (`pip install -r python-requirements.txt`) to run. The cybersecurity game the assistant runs requires Vagrant and VirtualBox. Full instructions for installing are in the the [installation guide](../wiki/installation-guide.md). The assistant was made as a part of my [bachelor's thesis]() for the university's KYPO lab,
so it mainly extends the design of games at the KYPO Cyber Range. The original version
included in the thesis appendix required that the player get some help from an instructor while playing.
This improved version allows for the player to play through the game completely on their own.
The assistant loads configuration from the `levels.yml` file. The games the assistant can help with must be made with Vagrant and Ansible (as other games for
the KYPO Cyber Range), and have all tasks in the Ansible playbooks tagged with tags.
There's also a need for some config files in the `resources` subfolder.
## Assistant usage ## Assistant usage
The adaptive game assistant is ran by running `./assistant.py` or `python assistant.py` in the project folder. The adaptive game assistant is ran by running `./assistant.py` or `python assistant.py` in the project folder.
Essentially, it automatically runs the commands listed below in manual usage, It automatically runs Vagrant commands to prepare levels of the game,
but all the user has to specify is that they want to advance to the next level. checks flags when player completes level and provides hints when needed.
Basic commands: Basic commands:
- (S)tart - starts the game from level 1. - (S)tart - starts the game from level 1.
@ -17,12 +22,21 @@ Basic commands:
- (C)eck - Checks versions of all required apps. - (C)eck - Checks versions of all required apps.
- (H)elp - displays a full list of commands. - (H)elp - displays a full list of commands.
For more information about the game, including the levels' instructions, see the [game text](../wiki/game-text.md). ## Requirements
The assistant requires Python 3.7 to run.
## Structure It also requires the PyYAML package of version 5.1 or higher.
(You can install it with `pip install -r python-requirements.txt`)
The game the assistant will require Vagrant and VirtualBox to be installed.
Virtualbox 6.0 or higher and Vagrant 2.2.5 or higher are recommended.
(The requirements of individual games may differ.)
## Python module structure
The assistant consists of a `Game` class, that represents the game itself, and a `game_loop()` function, which keeps an instance of a `Game` and translates inputs from the command line into method calls on the `Game` object. The assistant consists of a `Game` class, that represents the game itself, and a `game_loop()` function, which keeps an instance of a `Game` and translates inputs from the command line into method calls on the `Game` object.
The assistant is written with modularity in mind, so it should support other adaptive games, as long as they provide a correct `levels.yml` file, and has complete tagging in the Ansible playbooks. The assistant is written with modularity in mind, so it should support other adaptive games, as long as they provide a correct `levels.yml` file, and has complete tagging in the Ansible playbooks.
### Game and config files
### levels.yml ### levels.yml
`levels.yml` is the configuration file that tells the assistant what possible levels are in the game, what tags to run to set up that level, and what machines need to be provisioned for that level. `levels.yml` is the configuration file that tells the assistant what possible levels are in the game, what tags to run to set up that level, and what machines need to be provisioned for that level.
@ -30,6 +44,12 @@ The assistant is written with modularity in mind, so it should support other ada
Every line in the file represents a level, and each line must have the following format: Every line in the file represents a level, and each line must have the following format:
`level_name: {branch_name: [machines_to_provision]}` `level_name: {branch_name: [machines_to_provision]}`
### I want to try the assistant out, but I have no game on hand
## ??? Manual usage without the assistant
## ??? Common problems
- prolly delete
## Manual usage without assistant ## Manual usage without assistant
How to play the game without using the adaptive game assistant. How to play the game without using the adaptive game assistant.