Git Product home page Git Product logo

geneticalgorithm's Introduction

GeneticAlgorithm

This is a generic genetic algorithm with a knapsack problem model

How do it uses?

For the knapsack problem you must put some parameters.

Parameter Description
n_items Number of items
worth and weight Worth and weight separated by a space
capacity Size of knapsack
size_sample Number of agents for iteration

If you want to try with other problem type, you can make a class with the next methods:

  • generator of agents: this is able to create the agents.
  • fitness function: this is used in the selection phase, able to select the best agents by epoch.
  • crossover: this is used in the crossover phase, able to cross the agents.
  • mutator: this able to mutate the agents.

Warning: I recommend to use Python version > 3.8.


If you have any question, you can contact me at Twitter: @fabianmativeal

geneticalgorithm's People

Contributors

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