Gentic Algorithm implementation, customisable