Giter Site home page Giter Site logo

evolutionary-algorithm's Introduction

Evolutionary-Algorithm

Knapsack Problem algorithm In the supermarket there are n items (n ≤ 50) the item i has weight W[i] ≤ 50 and value V[i] ≤ 50. A thief breaks into the supermarket, the thief cannot carry weight exceeding M (M ≤ 50). The problem to be solved here is: which packages the thief will take away to get the highest value?

Thief will randomly select item unitl it reaches maximum weight Then we will evaluate fitness by taking the sum of value in picked item list

Parent Selection selecting parents from binary tournament

Crossover I took two crossover points, cross1 = randomly select from 0 to length of parent1 cross2 = randomly select from 0 to length of parent2 so child1 will get items [0:cross1] of parent1 + [cross2:] of parent2 and child2 will get items [0:cross2] of parent2 + [cross1:] of parent1 then we will sort them first by thier value and then select items until it reaches its maximum weight and then I am evaluating fitness

Mutation I am taking an item from my chromosome and replacing it with population's chromosome item

Survival Selection To select the new population I am simply picking best from the overall population

evolutionary-algorithm's People

Contributors

harislania 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.