Giter Site home page Giter Site logo

luisarojas / genetic-alg Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 1012 KB

Parallelized genetic algorithm implementation using pthreads and java-concurrency.

Python 10.34% C 65.53% Makefile 2.01% Java 22.12%
parallelism genetic-algorithm pthreads java-concurrency concurrency multithreading fitness fitness-function optimization

genetic-alg's Introduction

Parallel Genetic Algorithm

Proposal

Our proposal consists on implementing and parallelizing a genetic algorithm. We will generate a final solution, which the program will reach based on different generated parameters and transformations. Some of these will include a fitness criterion, as well as a mutation, a migration and a cross-over process.

The parent selection and crossover processes will be modified to enable parallelization and optimize execution. Both global single-population and multi-population approaches will be considered for further parallelization.

Since there are multiple unknowns in the scope of the project, we will approach it by implementing a serial genetic algorithm program in Python first, and then mapping it over to a serial implementation in C or Java, and finally paralleling it using pthreads/java-concurrency.

After, run times between the sequential and parallelized program(s) will be compared and analyzed. The comparison will also involve times between varying number of threads for the parallel version of the program, which will be outlined in a report.

Pseudocode

Generate Gene pool
    -> New random DNA (SAME)
    -> New fitness calculation (SAME)
    -> Append to genepool (SAME)
    
While (true)
    -> If the best fitness in the
       genepool is 0, break - found a match. (SAME)
    -> Get 2 random parents to generate a new
       child (Luisa's) ***
        o Crossover: Portions of BOTH parents' DNAs
          are combined into the child (Luisa's) ***
        o Mutation: Select a random character in the
          resulting child's DNA, and switch it to a
          different character in a change of 5,
          following its ASCII representation (SAME)
    -> If the resulting child has better fitness than
       the current worst in the genepool, replace it (SAME)

Resources

genetic-alg's People

Contributors

amihaylo avatar lrojas12 avatar luisarojas avatar

Stargazers

 avatar  avatar

Watchers

 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.