eukaryote

2.0.1 • Public • Published

Eukaryote

Usage - NPM

Install:

npm install eukaryote --save-dev

Require:

var Eukaryote = require('eukaryote');

Use:

var environment = new Eukaryote.Genetic.Environment({
  fitnessSync: function(individual) {
    // calculate fitness score for individual
    return fitness;
  },
  mutateSync: function(individual) {
    // mutate this individuals' genes
  }
});
 
// create a population from individual and begin evolution
var individual = { ... }; // create individual to seed environment
environment.seed(individual, function(error) {
  if (error) console.error('Unexpected error has occurred: ', error);
  else {
    // genetic algorithm has completed successfully
    console.log('Most fit individual:', environment.population[0]);
  }
});

Usage - Browser

Distribution files are provided for browser support within the dist/ folder.

Documentation

API documentation can be viewed in markdown format and html format after generating with grunt in dist/api/index.html.

Examples

Coming soon...

Tutorial

Tutorial can be seen here.

Package Sidebar

Install

npm i eukaryote

Weekly Downloads

8

Version

2.0.1

License

MIT

Last publish

Collaborators

  • coreyferguson