0.2.9 • Published 7 years ago

genetics-node v0.2.9

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

Genetics-node

0.2.8

Introduction

Genetics-node is a node.js framework which implements Evolutionary Algorithm. Genetics-node is written in C++. The framework is in early phase and has a lot of work.

Motivation

Evolutionary Algorithms (EA) gives us the possibility to know the input of a certain system by using the system and defining output.

explain

Simple example: if we have y = 2 ⋅ x. Then our system is 2 ⋅ x, our function is y. If we define the output y (e.g. y = 2) then we can solve for x.

Installation

npm install genetics-node

Code Example

const genetics = require('genetics-node');

let result = genetics.evolution(
    1000,               // population size
    "Hello World",      // string goal
    0.1,                // mutation rate
    true,               // print every evolution
    0.2,                // ratio between crossover and mutation
    50                  // amount of elites
);

console.log(result);

The evolution function takes:

  • population-size
  • string as goal
  • mutation-rate between 0 and 1
  • ratio between crossover versus mutation
  • the number of elites
  • print each evolution or not. Set true or false

Example

Hello World test command:

node test

To do (current priorities)

  • custom choice of random characters (only numbers, only low cases, all symbols, etc.)
  • possibility to write a personal fitness function
  • funny examples
  • error handling
  • better code

Author

Lashi Dugagjin

License

MIT

0.2.9

7 years ago

0.2.8

7 years ago

0.2.7

7 years ago

0.2.6

7 years ago

0.2.5

7 years ago

0.2.4

7 years ago

0.2.3

7 years ago

0.2.2

7 years ago

0.2.1

7 years ago

0.2.0

7 years ago

0.1.5

7 years ago

0.1.4

7 years ago

0.1.3

7 years ago

0.1.2

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago