Quantcast

about GP

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

about GP

stevenboa
Hi guys,

I'm a rookie of GP and I got a bunck of quesitons needed for your favorable anwsers. The one most confuses me is that, is GP able to evolve real programs?

I have seen some examples about GP which is used to evolve some so-called program, like x^2-x^6-8 etc.. But from my perspective, it is a expression, rather than a program.

So I just wanna know, is GP ableo to evolve a real program, say "hello world" or something?

Thanks!
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: about GP

disgruntled_young_man
Yes, but you'd have to make the nodesets relevant to the language.  Like with php, you could do:

CommandGene nodeSets[][] = {
  {
     new EchoCommand(config, PHPCommandClass.class),
     new Alphabet(config, AlphabetClass.class)
  }
}

and EchoCommand would only take AlphabetClass children, and your output (Class[] types) would be PHPCommandClass.class.  You'd have to wrap everything in <?php ?> and "", and you'd get ridiculous outputs like

echo "a";
echo "asbga4gag";

for a long time.  you'd have to make your fitness function train towards the text "hello world", and you'd have to have the fitness function run a compiler and get the STDOUT text.

What would be the point though?  You can't say "make me a game" and just have it go.  your fitness function would be impossible to maintain, and you'd be better off writing it yourself outright.
Loading...