peoplenarthax / chromosome-js

Democratizing Genetic Algorithms
https://peoplenarthax.github.io/chromosome-js/#/
MIT License
1 stars 0 forks source link

npm bundle size (version)

ChromosomeJS 🐒

A small library to help curious people to develop their own Genetic Algorithms.

General

ChromosomeJS has arrived to the town to help you develop in a easier / faster-paced way your own Genetic Algorithms. In order to achieve this goals, this open-project try to help you in 3 different ways:

Documentation

The documentation is under development

An essential part of ChromosomeJS is to help people understand better Genetic Algorithms by example. The documentation does not exclusively aim to cover the developer API but also to offer a nice introduction to genetic algorithms, present the library through examples and contain references to good sources of information.

How to contribute?

Do you know about Genetic Algorithms and want to explain some concept? Are you eager to help us improve the language that we use? Do you have any doubt or something that we could make clearer? Please open an issue starting with [Documentation]


Utils

Utility library is still expanding for the first version ChromosomeJS offers a serie of utility functions to help out with different part of your Genetic Algorithm.

Individual Generation and Population Generation

Crossover CrossoverFunction = (genome1: Genome, genome2: Genome) => [Genome, Genome]

Mutation MutationFunction = (probability: number, genome: Genome) => Genome

Selection SelectionFunction = (amount: number, population: Individual[], options?: object) : Individual[]

How to contribute?

You can help ChromosomeJS to extend the utils functions library, define a better API to interact with it or simply make a feature request. Just open an issue starting with [Utils].


Chromosome Framework

The framework is under development ChromosomeJS also makes easy to 'plug-n-play', so we just choose/define our genetic algorithm and it will take care of run it for you interacting through callbacks. It needs you to define the different cycle functions (Crossover, mutation...) and constants (probabilities, population and individual size...) and then just run your algorithm. Right now there is a very rough implementation that does not consider many aspects. The plan is to try to abstract it to being able to run it on a Worker, abstract you from your types and complex operations reducing it to array operations, make it more efficient for node and browser environments.

Genetic Algorithm Class

The Genetic Algorithm will instanciate a new Genetic Algorithm (you specify seed, mutation, crossover, fitness, selection), the meta parameters (probabilities, population size, options for the selectors...) and hooks (onGeneration). It enables you to do a simple step using your parameters.

Runner

Runner is just an abstraction on top of genetic algorithm that helps you run your GA Class asynchronously (specially thought for the browser) until it meets certain conditions (number of generations).

How to contribute?

To help ChromosomeJS offer a more performant framework, improve the API, extend it to fit other Evolutionary Algorithms you could start by opening an issue starting with [Framework].