Hostage situation negotiator simulation
The application is compatible with Windows and Linux based systems. Python version 3.6 or above is assumed to be installed, as well as pip package manager utility and setuptools module.
python make.py setup
python make.py run
Further information can be provided while running the application by using <command> -h instruction.
- help - list the available commands
- exit | quit - exit the application
- generate_problem - Generates a secret of a given type and size
- run_strategy - Generates and solves a problem in a given number of rounds, using the requested strategy
To exercise some of the available commands, one can try:
- Generate a problem of size 10 and type string, that must be solved in less than 12 rounds.
(mindefuse) > generate_problem -r 12 -t string -s 10
EhGnaXhAOH
- Generate and solve a problem with secret sequence 378 in less than 12 rounds, using Knuth strategy.
(mindefuse) > run_strategy -r 12 -a knuth --secret 378
-----------------------------------History-----------------------------------
Round: 1 | Secret: 378 | Guess: 001 | Result: (0, 0) | Time: 000.0000 s
Round: 2 | Secret: 378 | Guess: 223 | Result: (1, 0) | Time: 003.9081 s
Round: 3 | Secret: 378 | Guess: 445 | Result: (0, 0) | Time: 004.7819 s
Round: 4 | Secret: 378 | Guess: 662 | Result: (0, 0) | Time: 005.1764 s
Round: 5 | Secret: 378 | Guess: 377 | Result: (0, 2) | Time: 005.3405 s
Round: 6 | Secret: 378 | Guess: 378 | Result: (0, 3) | Time: 005.3870 s
The game was won!!!
- Generate and solve a problem with secret sequence iekl in less than 12 rounds, using Genetic strategy.
(mindefuse) > run_strategy -r 12 -a genetic --secret iekl
-----------------------------------History-----------------------------------
Round: 1 | Secret: iekl | Guess: aabb | Result: (0, 0) | Time: 000.0000 s
Round: 2 | Secret: iekl | Guess: ogdg | Result: (0, 0) | Time: 000.0094 s
Round: 3 | Secret: iekl | Guess: nxxh | Result: (0, 0) | Time: 000.0391 s
Round: 4 | Secret: iekl | Guess: ukyv | Result: (1, 0) | Time: 000.0873 s
Round: 5 | Secret: iekl | Guess: jeve | Result: (0, 1) | Time: 000.2677 s
Round: 6 | Secret: iekl | Guess: mrvw | Result: (0, 0) | Time: 001.1918 s
Round: 7 | Secret: iekl | Guess: ieuf | Result: (0, 2) | Time: 004.2101 s
Round: 8 | Secret: iekl | Guess: ceut | Result: (0, 1) | Time: 007.6359 s
Round: 9 | Secret: iekl | Guess: kepf | Result: (1, 1) | Time: 011.5047 s
Round: 10 | Secret: iekl | Guess: iekz | Result: (0, 3) | Time: 015.8030 s
Round: 11 | Secret: iekl | Guess: iekl | Result: (0, 4) | Time: 039.8143 s
The game was won!!!
- Generate and solve a problem with a randomly generated secret of numeric elements with size 4, in less than 12 rounds, using Genetic strategy. The generated secret was 8984.
(mindefuse) > run_strategy -r 12 -a genetic -t numeric -s 4
-----------------------------------History-----------------------------------
Round: 1 | Secret: 8984 | Guess: 0011 | Result: (0, 0) | Time: 000.0000 s
Round: 2 | Secret: 8984 | Guess: 8866 | Result: (1, 1) | Time: 000.0173 s
Round: 3 | Secret: 8984 | Guess: 8287 | Result: (0, 2) | Time: 000.1418 s
Round: 4 | Secret: 8984 | Guess: 3286 | Result: (0, 1) | Time: 001.8032 s
Round: 5 | Secret: 8984 | Guess: 8989 | Result: (0, 3) | Time: 003.8772 s
Round: 6 | Secret: 8984 | Guess: 8985 | Result: (0, 3) | Time: 006.3854 s
Round: 7 | Secret: 8984 | Guess: 8988 | Result: (0, 3) | Time: 009.4058 s
Round: 8 | Secret: 8984 | Guess: 8984 | Result: (0, 4) | Time: 012.7700 s
The game was won!!!
This project is licensed under the MIT License - see LICENSE file for details.
This software was develop as an academic project, therefore, no enterprise level reliability assurances can be provided.