An open API service indexing awesome lists of open source software.

https://github.com/stopyransky/to-be-or-not-to-be-genetic-algorithm

Simple genetic algorithm simulation as described in book "Nature of Code" by Daniel Shiffman. Originally written in processing, here adapted to JavaScript and runnable in Node.
https://github.com/stopyransky/to-be-or-not-to-be-genetic-algorithm

Last synced: 2 months ago
JSON representation

Simple genetic algorithm simulation as described in book "Nature of Code" by Daniel Shiffman. Originally written in processing, here adapted to JavaScript and runnable in Node.

Awesome Lists containing this project

README

        

Simple genetic algorithm simulation as described in book "Nature of Code" by Daniel Shiffman.
Originally written in processing, here adapted to JavaScript and runnable in Node.

To run, navigate to repository directory, enter "node" in terminal and type:

```javascript
.load main.js;
sim.printInfo(); // to get info, pass true for verbose, false for short info
sim.runOnce(); // to move simulation one generation further
sim.run(); // to move simulation 100 generations or > 90% fitness further
sim.setFitnessFunction( yourFunctionReturningNormalizedFitness );
```