Coder Social home page Coder Social logo

computationalbiologyass2's Introduction

ComputationalBiologyAss2

What is this all about?

The goal

Simulating a Genetic Algorithm to solve a problem of Mono-Alphabetic encryption on a text file.

Types of algorithms

There are three types of algorithms:

  • Regular - Runs a regular GA.
  • Darwin - Runs a Darwin GA with local optimization on the solutions that are not passed on to the next generation.
  • Lamarck - Runs a Lamarck GA with local optimization on the solutions that are passed on to the next generation.

Files to provide

  1. enc.txt
  2. Letter_Freq.txt
  3. Letter2_Freq.txt
  4. dict.txt

These files should be in the executable's directory.

Setting up the environment

Python version should be 3.6 or above.

Install all the requirements by running:

pip install -r requirements.txt

Running the program

To run in CLI mode run:

python main.py [required flags] [optional flags]

The available flag are:

Optional:

-n: Setting the number of max tries the algorithm will run [default 10].
-ps: Setting the size of the population [default 300].
-acc: Setting the fitness goal of the algorithm [default 0.99].

Required flags:

-r: Run a regular Genetic Algorithm.
-d: Run a Darwin Genetic Algorithm.
-l: Run a Lamarck Genetic Algorithm.

Notice: Only one of the required flags can be chosen.

Create executable file

Install pyinstaller:

pip install pyinstaller

Create executable:

pyinstaller -wF -p src main.py

Running the Executable

To run the executable in CLI mode run:

main.exe [required flags] [optional flags]

Notice: The flags here are the same as the flags to the python file.

computationalbiologyass2's People

Contributors

shimoncohen avatar nspitzern avatar litalshoshani avatar

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.