Skip to content
This repository has been archived by the owner on Dec 14, 2023. It is now read-only.

michaeloa/hackgp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Best Algorithm

Generation=29 Avg Fitness=0.2584831019694403 Best Fitness=0.20585418661781238 Avg Size=483.26838

Best Individual:

((2.644255857026728 + ((2.302299742347829 * (1.3369549393583302 - (X2 / 1.7991742908058974))) / ((((1.0775915119338002 - 1.7771468995979536) * -2.7969290992389126) / (((((4.10672915751247 / (-3.598254805249701 - -3.945983547915617)) / ((2.2775540897083335 / ((3.095788075074328 - -3.598254805249701) / (X3 - (-0.04176314846116025 + X2 )))) + 2.892279864816473)) / (((-4.340479503064768 + (-3.223235132592902 / (1.9579753190569784 - (((((X1 / -1.5204797343894105) / 2.521485525348986) / 4.666170629394514) / (1.7991742908058974 + 4.3960633386899435)) / -2.0360784865024484)))) / ((4.666170629394514 / ((0.2124516223658235 * (2.546964928899272 / ((3.317279544663812 + ((-1.2525633847923965 / 3.317279544663812) + -4.340479503064768)) / (2.302151168093199 - (((((-3.7236080854143703 - (-2.0435139835402847 * 3.740684156162594)) / (1.7991742908058974 + -2.35602562771531)) - ((X3 + -3.0842712822655214) - (2.054680220325209 * (4.91097011724502 * -3.6174714703022626)))) / (-2.6709025126709127 + -4.390036842517249)) - (-4.390036842517249 * (-1.0408139227602096 / 1.0775915119338002))))))) + (2.546964928899272 - -4.589825850020251))) - 2.892279864816473)) - -1.068771864223116)) / ((1.7771468995979536 + 3.277310503156748) - 1.170516182089206)) * -1.4001609506381207)) + ((4.91271527114716 * -3.914202713906938) + -1.2525633847923965)))) - ((-2.0360784865024484 + (((-2.445522200614035 / ((((1.1138115792765273 / 1.3369549393583302) / (-3.991213143501117 - -3.5721280120969565)) * (2.521485525348986 * ((1.68945133142336 / 1.9261173158370344) / -3.945983547915617))) / (((2.2775540897083335 + -1.1997206717116624) + 3.317279544663812) * (X3 + (3.921586546385834 + X10 ))))) * 2.892279864816473) * 0.3095406808429848)) / (-3.6174714703022626 - (((1.9261173158370344 / (4.91271527114716 * (-3.1859387634103253 - X7 ))) + ((4.91271527114716 + X4 ) / (((X2 + -2.445522200614035) + ((-0.6943768398594159 - ((X2 + -3.7236080854143703) * (X3 - 4.91097011724502))) / 1.641912985961742)) / -4.495221868589074))) * (X3 / 3.353169317538404)))))

Fitness function:

 double fitness_function(char[] Prog) {
        int i = 0, len;
        double result, fit = 0.0;

        len = traverse(Prog, 0);
        int failures = 0;
        for (i = 0; i < fitnesscases; i++) {
                for (int j = 0; j < varnumber; j++)
                        x[j] = targets[i][j];
                program = Prog;
                PC = 0;
                result = run();
                if (Math.abs(result - targets[i][varnumber]) > 0.499) {
                        failures++;
                }
        }
        return -((double)failures/(double)fitnesscases);
 }

With up to 99 random constants, where -5 <= value <= 5

hackgp install

sudo apt-get install git git clone https://github.com/michaeloa/hackgp.git hackgp/bootstrap.sh

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published