|
JGAP | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jgap.gp.GPProblem
examples.gp.Fibonacci
public class Fibonacci
Example demonstrating Genetic Programming (GP) capabilities of JGAP.
Here, the Fibonacci sequence is calculated (only integers are used).
Please note: We try to find a program that computes Fibonacci iteratively.
This example utilizes a INodeValidator (see FibonacciNodeValidator).
Each new best solution found will be displayed as a graphical tree representing the GP. The tree is written to a PNG-imagefile onto harddisk.
Nested Class Summary | |
---|---|
static class |
Fibonacci.FormulaFitnessFunction
|
Constructor Summary | |
---|---|
Fibonacci(GPConfiguration a_conf)
|
Method Summary | |
---|---|
GPGenotype |
create()
Sets up the functions to use and other parameters. |
static void |
main(java.lang.String[] args)
Starts the example. |
static java.lang.Object |
readFromStream()
|
static void |
writeToStream(IGPProgram prog)
|
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 |
Constructor Detail |
---|
public Fibonacci(GPConfiguration a_conf) throws InvalidConfigurationException
InvalidConfigurationException
Method Detail |
---|
public GPGenotype create() throws InvalidConfigurationException
create
in class GPProblem
InvalidConfigurationException
public static void main(java.lang.String[] args)
args
- ignored
java.lang.Exception
public static void writeToStream(IGPProgram prog) throws java.lang.Exception
java.lang.Exception
public static java.lang.Object readFromStream() throws java.lang.Exception
java.lang.Exception
|
JGAP | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |