|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--xcseco.XClassifierSet
This class handles the different sets of classifiers. It stores each set in an array. The array is initialized to a sufficient large size so that no changes in the size of the array will be necessary. The class provides constructors for constructing
| Constructor Summary | |
XClassifierSet(int numberOfActions)
Creates a new, empty population initializing the population array to the maximal population size plus the number of possible actions. |
|
XClassifierSet(java.lang.String state,
XClassifierSet pop,
int time,
int numberOfActions)
Constructs a match set out of the population. |
|
XClassifierSet(XClassifierSet matchSet,
int action)
Constructs an action set out of the given match set. |
|
| Method Summary | |
void |
confirmClassifiersInSet()
Updates the numerositySum of the set and deletes all classifiers with numerosity 0. |
XClassifier |
elementAt(int i)
Returns the classifier at the specified position. |
int |
getNumerositySum()
Returns the number of micro-classifiers in the set. |
int |
getSize()
Returns the number of macro-classifiers in the set. |
void |
printSet()
Prints the classifier set to the control panel. |
void |
printSet(java.io.PrintWriter pW)
Prints the classifier set to the specified print writer (which usually refers to a file). |
void |
runGA(int time,
java.lang.String state,
int numberOfActions)
The Genetic Discovery in XCS takes place here. |
void |
updateSet(double maxPrediction,
double reward)
Updates all parameters in the current set (should be the action set). |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public XClassifierSet(int numberOfActions)
numberOfActions - The number of actions possible in the problem.XCSConstants.maxPopSize
public XClassifierSet(java.lang.String state,
XClassifierSet pop,
int time,
int numberOfActions)
state - The current situation/problem instance.time - The actual number of instances the XCS learned from so far.numberOfActions - The number of actions possible in the environment.XClassifier.XClassifier(double,int,String,int),
XCSConstants.maxPopSize,
#deleteFromPopulation
public XClassifierSet(XClassifierSet matchSet,
int action)
matchSet - The current match setaction - The chosen action for the action set.| Method Detail |
public void updateSet(double maxPrediction,
double reward)
maxPrediction - The maximum prediction value in the successive prediction array
(should be set to zero in single step environments).reward - The actual resulting reward after the execution of an action.XCSConstants.gamma,
XClassifier.increaseExperience(),
XClassifier.updatePreError(double),
XClassifier.updatePrediction(double),
XClassifier.updateActionSetSize(double),
#updateFitnessSet,
XCSConstants.doActionSetSubsumption,
#doActionSetSubsumption
public void runGA(int time,
java.lang.String state,
int numberOfActions)
time - The actual number of instances the XCS learned from so far.state - The current situation/problem instance.numberOfActions - The number of actions possible in the environment.XCSConstants.theta_GA,
#selectXClassifierRW,
XClassifier.twoPointCrossover(xcseco.XClassifier),
XClassifier.applyMutation(java.lang.String, int),
XCSConstants.predictionErrorReduction,
XCSConstants.fitnessReduction,
#insertDiscoveredXClassifierspublic void confirmClassifiersInSet()
public int getNumerositySum()
public XClassifier elementAt(int i)
public int getSize()
public void printSet()
public void printSet(java.io.PrintWriter pW)
pW - The print writer that normally refers to a file writer.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||