JSPM

eukaryote

2.0.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 8
  • Score
    100M100P100Q40168F
  • License MIT

Evolutionary algorithm framework and tutorial.

Package Exports

  • eukaryote

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (eukaryote) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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.