examples.gp
Class SimpleExample
java.lang.Object
org.jgap.gp.GPProblem
examples.gp.SimpleExample
public class SimpleExample
- extends GPProblem
Simple example of Genetic Programming to discover the formula
(X > 0) OR (X == -8) OR (X == - 5)
given a set of inputs from -10 to 10 and expected outputs (true or false).
The fitness function used in this example cares about deviation from the
expected result as well as the complexity of the solution (the easier the
solution, the better it is, mutatis mutandis).
- Since:
- 3.5
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
vx
protected static Variable vx
SimpleExample
public SimpleExample()
create
public GPGenotype create()
throws InvalidConfigurationException
- Specified by:
create
in class GPProblem
- Returns:
- newly created GPGenotype
- Throws:
InvalidConfigurationException
start
public void start()
throws java.lang.Exception
- Throws:
java.lang.Exception
main
public static void main(java.lang.String[] args)
throws java.lang.Exception
- Throws:
java.lang.Exception