Code Monkey home page Code Monkey logo

mindefuse's Introduction

mindefuse

Build Status

Hostage situation negotiator simulation

Prerequisites

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.

Installation

python make.py setup

How to run

python make.py run

Commands

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

Example run

To exercise some of the available commands, one can try:

  1. 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
  1. 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!!!
  1. 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!!!
  1. 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!!!

License

This project is licensed under the MIT License - see LICENSE file for details.

Disclaimer

This software was develop as an academic project, therefore, no enterprise level reliability assurances can be provided.

mindefuse's People

Contributors

henriquearaujocm avatar kronostheus avatar sinistro14 avatar

Watchers

 avatar  avatar

mindefuse's Issues

Windows multiprocessing API bug

Uncover and fix the following bug.
Manifests when running Knuth with secrets of size > 2, given that multiprocessing is used.

win_error

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.