|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.dllearner.algorithms.gp.GPUtilities
public class GPUtilities
A utility class, which implements crossover, mutation and tree creation methods. Schwaechen: Der Code ist ziemlich komplex und die Performance nicht besonders gut, da oefter Baeume komplett neu erstellt statt geklont werden etc. Wenn der Code erstmal lauffaehig ist, dann kann man hier noch mit Optimierungen ansetzen. Notiz: Wenn man den einzelnen Knoten noch eine Stelligkeit zuweist, dann koennte man diese Klasse komplett generisch halten, d.h. unabhaengig davon, dass DLs gelernt werden sollen.
| Field Summary | |
|---|---|
static int |
crossover
|
static int |
fitnessEvaluations
|
static int |
hillClimbing
|
static int |
mutation
|
| Constructor Summary | |
|---|---|
GPUtilities()
|
|
| Method Summary | |
|---|---|
static boolean |
checkProgram(Program prog)
|
static void |
checkPrograms(Program[] progs)
|
static boolean |
checkTree(Description node,
boolean isRootNode)
|
static Program |
createFullRandomProgram(AbstractLearningProblem learningProblem,
AbstractReasonerComponent rs,
int depth,
boolean adc)
Create a program using the full method. |
static Program |
createGrowRandomProgram(AbstractLearningProblem learningProblem,
AbstractReasonerComponent rs,
int depth,
boolean adc)
Create a program using the grow method. |
static Description |
createGrowRandomTree(AbstractLearningProblem learningProblem,
AbstractReasonerComponent rs,
int depth,
boolean useADC)
|
static Program |
createProgram(AbstractLearningProblem learningProblem,
Description mainTree)
|
static Program[] |
crossover(AbstractLearningProblem learningProblem,
Program p1,
Program p2)
Perform crossover on two programs. |
static Program |
hillClimbing(AbstractLearningProblem learningProblem,
AbstractReasonerComponent rs,
Program p)
|
static Program |
mutation(AbstractLearningProblem learningProblem,
AbstractReasonerComponent rs,
Program p)
Perform a point mutation on the given program. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static int fitnessEvaluations
public static int crossover
public static int mutation
public static int hillClimbing
| Constructor Detail |
|---|
public GPUtilities()
| Method Detail |
|---|
public static Program createProgram(AbstractLearningProblem learningProblem,
Description mainTree)
public static Program mutation(AbstractLearningProblem learningProblem,
AbstractReasonerComponent rs,
Program p)
p - The program to be mutated.
public static Program[] crossover(AbstractLearningProblem learningProblem,
Program p1,
Program p2)
p1 - First parent.p2 - Second parent.
public static Program hillClimbing(AbstractLearningProblem learningProblem,
AbstractReasonerComponent rs,
Program p)
public static Program createFullRandomProgram(AbstractLearningProblem learningProblem,
AbstractReasonerComponent rs,
int depth,
boolean adc)
depth - Depth of the tree.
public static Program createGrowRandomProgram(AbstractLearningProblem learningProblem,
AbstractReasonerComponent rs,
int depth,
boolean adc)
depth - The maximum depth of the program tree.
public static Description createGrowRandomTree(AbstractLearningProblem learningProblem,
AbstractReasonerComponent rs,
int depth,
boolean useADC)
public static void checkPrograms(Program[] progs)
public static boolean checkProgram(Program prog)
public static boolean checkTree(Description node,
boolean isRootNode)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||