NodEO includes the functions necessary to create a simple evolutionary algorithm in JavaScript in CommonJS format, for node.js and anything else that uses that format. Can be (and indeed has been) converted to the browser using Browserify. Check out the presentation I did for FOSDEM in case you want to know more about evolutionary algorithms and how they have been implemented in JavaScript.
Hints on installing and running it.
npm install nodeo
You can also clone it from this repo:
git clone [email protected]:JJ/nodeo.git
If you have downloaded it from npm
, it's already tested. If you have cloned it,
npm install
npm test
There's a simple evolutionary algorithm in the app
directory,
cd node_modules/nodeo
node app/ea.js
or
node app/classic-ea.js
for the version with a bit more complicated data structures and no cached fitness function (lighter on the memory front).
You can try and add your own stuff. Start here
You will have to install a bit of more stuff, including Grunt, which, for the time being, is used to check code and generate documentation. That is
npm install -g grunt-cli
And then
grunt docco
to generate documentation (if you've installed docco previously) or
grunt jshint
to check the code or
grunt browsify
to generate a browser-ready evolutionary algorithm based on the classic
version.
Please use GitHub issues and I'll try to help you. Can't guarantee I'll be in Gitter, but if that's your thing, please go ahead and try it, I'll arrive eventually.