public class PTCFunctionSet extends GPFunctionSet implements PTCFunctionSetForm
| Modifier and Type | Field and Description |
|---|---|
static int |
CACHE_SIZE |
double[][] |
p_y
cache of nonterminal selection probabilities -- dense array
[size-1][type].
|
double[][] |
q_ny
nonterminal probabilities[type][thenodes], in organized form
|
double[][] |
q_ty
terminal probabilities[type][thenodes], in organized form
|
name, nodes, nodes_h, nodesByArity, nodesByName, nonterminals, nonterminals_h, nonterminalsOverArity, nonterminalsUnderArity, P_FUNC, P_NAME, P_SIZE, terminals, terminals_h| Constructor and Description |
|---|
PTCFunctionSet() |
| Modifier and Type | Method and Description |
|---|---|
double[] |
computeNonterminalSelectionProbabilities(int expectedTreeSize) |
double[] |
nonterminalProbabilities(int type)
Returns an organized distribution (see ec.util.RandomChoice) of likelihoods
that various nonterminals in the function set will be chosen over other nonterminals
with the same return type.
|
double[] |
nonterminalSelectionProbabilities(int expectedTreeSize)
Returns an array (by return type) of the probability that PTC1 must pick a
nonterminal over a terminal in order to guarantee the expectedTreeSize.
|
void |
setup(EvolutionState state,
Parameter base)
Must be done after GPType and GPNodeConstraints have been set up
|
double[] |
terminalProbabilities(int type)
Returns an organized distribution (see ec.util.RandomChoice) of likelihoods
that various terminals in the function set will be chosen over other terminals
with the same return type.
|
functionSetFor, postProcessFunctionSet, toStringpublic double[][] q_ty
public double[][] q_ny
public static final int CACHE_SIZE
public double[][] p_y
public double[] terminalProbabilities(int type)
PTCFunctionSetFormterminalProbabilities in interface PTCFunctionSetFormpublic double[] nonterminalProbabilities(int type)
PTCFunctionSetFormnonterminalProbabilities in interface PTCFunctionSetFormpublic void setup(EvolutionState state, Parameter base)
GPFunctionSetsetup in interface Setupsetup in class GPFunctionSetpublic double[] nonterminalSelectionProbabilities(int expectedTreeSize)
PTCFunctionSetFormnonterminalSelectionProbabilities in interface PTCFunctionSetFormpublic double[] computeNonterminalSelectionProbabilities(int expectedTreeSize)
Copyright © 2014 Evolutionary Computation Laboratory at George Mason University. All rights reserved.