JGAP

examples.gp
Class KarubProblem

java.lang.Object
  extended by org.jgap.gp.GPProblem
      extended by examples.gp.KarubProblem

public class KarubProblem
extends GPProblem

Sort of minimal GP problem definition. Does not stop when best solution found. Discovers a very simple formula (see comments in code!). Only there to show the general setup. Inspired by user Karub (who wrote most of the code in this class), therefor "KarubProblem"

Since:
3.5

Nested Class Summary
static class KarubProblem.FormulaFitnessFunction
           
 
Field Summary
static Variable vx
           
 
Constructor Summary
KarubProblem(GPConfiguration a_conf)
           
 
Method Summary
 GPGenotype create()
           
static void main(java.lang.String[] args)
           
 
Methods inherited from class org.jgap.gp.GPProblem
createTree, getGPConfiguration, setGPConfiguration, showTree, showTree
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

vx

public static Variable vx
Constructor Detail

KarubProblem

public KarubProblem(GPConfiguration a_conf)
             throws InvalidConfigurationException
Throws:
InvalidConfigurationException
Method Detail

create

public GPGenotype create()
                  throws InvalidConfigurationException
Specified by:
create in class GPProblem
Returns:
newly created GPGenotype
Throws:
InvalidConfigurationException

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Throws:
java.lang.Exception

JGAP