|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectart.ga.Chromosome
art.cs.Classifier
The Classifier consists in a string of fixed length and binary alphabet. The classifier is the basic object of a CS and is divided in two part: action and condition.
From a internal point of view it is implemented as a chromosome with 2 genomes, the genome 0 is the condition part and the genome 1 is the action part.
| Constructor Summary | |
Classifier(CsConfiguration configuration,
Population population)
Constructor of the class. |
|
| Method Summary | |
void |
addActivatorToList(Author author)
Add the author to the activators list. |
void |
clearActivatorsList()
Clear the activators list. |
void |
collect(double money)
The implementing class collect the money payed by the winner of the auction to it's author. |
double |
computeBid()
Compute the bid for auction if not already computed. |
Gene[] |
getAction()
Return the action part (genome 1) |
java.util.ArrayList |
getActivatorsList()
List of message that activate the classifier. |
java.lang.String |
getAlleleWithWildcard(int a)
Return the allele in a printable format. |
double |
getBid()
Get the bid for auction, compute it first. |
Gene[] |
getCondition()
Return the condition part (genome 0) |
double |
getSpecificity()
Specificity of the chromosome. |
void |
initializeChromosome()
Initialize the Chromosome with generated genomes. |
boolean |
isBidComputed()
Check if bid has been computed. |
boolean |
isSpecificityEvaluated()
Check if specificity has been computed. |
double |
payBidTax()
Pay bid tax for auction. |
double |
payLifeTax()
Pay life tax at every cycle. |
void |
payToActivators()
Pay bid/numberOfActivators to each activator of the classifier (BucketBrigade algorithm) |
void |
print()
Print to screen some Chromosome's information. |
void |
setAction(Gene[] action)
Set the action part (genome 1). |
void |
setBidComputed(boolean bidComputed)
Set bid computed. |
void |
setCondition(Gene[] condition)
Set the condition part (genome 0). |
void |
setSpecificityEvaluated(boolean specificityEvaluated)
Set specificity evaluated. |
| Methods inherited from class art.ga.Chromosome |
getAge, getBody, getChild, getFitness, getGenome, getMyPopulation, getNumberOfRules, getRescaledFitness, getRule, getSelectedForDie, getSelectedForReproduction, isFitnessEvaluated, print, setAge, setBody, setChild, setFitness, setFitnessEvaluated, setRescaledFitness, setRescaledFitnessEvaluated, setSelectedForDie, setSelectedForReproduction |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Classifier(CsConfiguration configuration,
Population population)
configuration - COnfiguration.population - Population belonging to.| Method Detail |
public java.util.ArrayList getActivatorsList()
public void payToActivators()
public void collect(double money)
Author
collect in interface Authormoney - Money collected.public double payBidTax()
public double payLifeTax()
public void clearActivatorsList()
public Gene[] getAction()
public double computeBid()
public double getBid()
public Gene[] getCondition()
public double getSpecificity()
public void setAction(Gene[] action)
action - The action to set.public void setCondition(Gene[] condition)
condition - The condition to set.public void addActivatorToList(Author author)
author - author to add.public boolean isSpecificityEvaluated()
public void setSpecificityEvaluated(boolean specificityEvaluated)
specificityEvaluated - The specificityEvaluated to set.public boolean isBidComputed()
public void setBidComputed(boolean bidComputed)
bidComputed - The bidComputed to set.public void initializeChromosome()
Chromosome
initializeChromosome in class Chromosomepublic void print()
Chromosome
print in interface GaSolutionprint in class Chromosomepublic java.lang.String getAlleleWithWildcard(int a)
a - String to verify (use getAllele()).
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||