public class ZLCS extends ClassifierSystem
Bibliothek demoZLCS
Klasse ZLCS
Copyright by Klaus Hufschlag 2004,2005,2006
This file is part of the Generic Classifier Library. The Generic Classifier Library is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. The Generic Classifier Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with the Generic Classifier Library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
Constructor and Description |
---|
ZLCS()
Construktor creating an empty instance of ZLCS
|
ZLCS(java.lang.String name,
StandardClassifier sample,
int size,
boolean randomized)
Construktor creating an instance of ZLCS, using a given sample Classifier
for filling the instance up to a defined size.
|
Modifier and Type | Method and Description |
---|---|
StandardClassifier |
chooseClassifier()
Roulettewheel-choice of a StandardClassifier, using the classifiers'
strength for determining probabilities.
|
StandardClassifier |
cover(Situation sit)
Covering: Generation of a new StandardClassifier matching a given
Situation.
|
void |
GA()
Genetic Algorithm, only performed with a probability of Rho
|
Situation |
getActionChoice(Situation condition)
ZLCS-Choice of an action matching a given condition
|
ZLCS |
getActionSet(Situation action)
Returns the action-set matchin a given action as a new instance.
|
double |
getBeta()
Reading accessor-method for beta.
|
double |
getChi()
Reading accessor-method for chi.
|
double |
getGamma()
Reading accessor-method for gamma.
|
ZLCS |
getMatchSet(Situation situation)
Returns the match-set (before covering) to a given Situation as a new
instance.
|
double |
getMy()
Reading accessor-method for my.
|
int |
getNumVictimsGA()
Reading accessor-method for numVictimsGA.
|
double |
getP_wild()
Reading accessor-method for p_wild.
|
double |
getPhi()
Reading accessor-method for phi.
|
double |
getRho()
Reading accessor-method for rho.
|
double |
getS_init()
Reading accessor-method for s_init.
|
double |
getTau()
Reading accessor-method for tau.
|
ZLCS |
match_n_cover(Situation sit)
Returns the match-set (after covering) to a given Situation as a new
instance.
|
void |
processReward(double reward)
Processing of a reward
|
ZLCS |
returnActionSet() |
void |
setBeta(double beta)
Writing accessor-method for beta.
|
void |
setChi(double chi)
Writing accessor-method for chi.
|
void |
setGamma(double gamma)
Writing accessor-method for gamma.
|
void |
setMy(double my)
Writing accessor-method for my.
|
void |
setNumVictimsGA(int numVictimsGA)
Writing accessor-method for numVictimsGA.
|
void |
setP_wild(double p_wild)
Writing accessor-method for p_wild.
|
void |
setPhi(double phi)
Writing accessor-method for phi.
|
void |
setRho(double rho)
Writing accessor-method for rho.
|
void |
setS_init(double s_init)
Writing accessor-method for s_init.
|
void |
setTau(double tau)
Writing accessor-method for tau.
|
add, add, allWithCondition, clone, crossover, csSelection, debug_out, filterbyaction, filterbyaction, filterByCondition, filterByCondition, getAverage, getClassifier, getConditionCount, getExtremeValues, getName, getSample, getTotal, init, iterator, mutation, randomSubset, remove, remove, remove, RoulettewheelChoice, setName, size
public ZLCS()
public ZLCS(java.lang.String name, StandardClassifier sample, int size, boolean randomized)
name
- Name of the ClassifierSystemsample
- Sample classifier for filling the instancesize
- Number of classifiers for initial fillingrandomized
- If true, the classifiers rule components will be
randomizedpublic double getBeta()
public void setBeta(double beta)
beta
- Value to be setpublic double getChi()
public void setChi(double chi)
chi
- Value to be setpublic double getGamma()
public void setGamma(double gamma)
gamma
- Value to be setpublic double getMy()
public void setMy(double my)
my
- Value to be setpublic int getNumVictimsGA()
public void setNumVictimsGA(int numVictimsGA)
numVictimsGA
- Value to be setpublic double getP_wild()
public void setP_wild(double p_wild)
p_wild
- Value to be setpublic double getPhi()
public void setPhi(double phi)
phi
- Value to be setpublic double getRho()
public void setRho(double rho)
rho
- Value to be setpublic double getS_init()
public void setS_init(double s_init)
s_init
- Value to be setpublic double getTau()
public void setTau(double tau)
tau
- Value to be setpublic ZLCS getMatchSet(Situation situation)
situation
- Situation to matchpublic ZLCS match_n_cover(Situation sit)
sit
- Situation to matchpublic ZLCS getActionSet(Situation action)
action
- Action to matchpublic Situation getActionChoice(Situation condition)
condition
- Condition to match.public StandardClassifier chooseClassifier()
public StandardClassifier cover(Situation sit)
sit
- Situation to matchpublic void GA()
public void processReward(double reward)
reward
- Value of the reward to process.public ZLCS returnActionSet()