examples/simple-example.js
/* 

This example illustrates the simplest use of the library

You define how to create an individual
You define how to measure the fittness of an individual
and you define how to mutate an individual

*/
This example illustrates the simplest use of the library
You define how to create an individual
You define how to measure the fittness of an individual
and you define how to mutate an individual
This example illustrates the simplest use of the library You define how to create an individual You define how to measure the fittness of an individual and you define how to mutate an individual
function generateIndividual() {
	let array = [];
	for(var i = 0; i < 10; i++){
		array.push(Math.round(Math.random()));
	}
	return array;
}
function generateIndividual ( ) { let array = [ ] ; for ( var i = 0 ; i < 10 ; i ++ ) { array . push ( Math . round ( Math . random ( ) ) ) ; } return array ; }
This example illustrates the simplest use of the library
You define how to create an individual
You define how to measure the fittness of an individual
and you define how to mutate an individual
This example illustrates the simplest use of the library You define how to create an individual You define how to measure the fittness of an individual and you define how to mutate an individual