|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectart.ga.GaManager
art.cs.CsManager
This is the most important class for the user.
It allows to create an instance of cs and manage all the related operations. For a standard use of the Classifier System two steps are sufficient:
Detector defining the
method get condition as described
in the class documentation. Create an instance of the implemented Detector class and
pass it to the constructor. Once the CsManager is created call the buildMessage() method to invoke
the Detector
and create a message. When the desired number of message are created call
go() to
make the cs compute the action(s).
After the actions are computed use getEffector() to obtain an instance of Effector and extract the actions using Effector.hasNext() and @see{Effector#getNextAction}.
IMPORTANT: Every action must be evaluated and the reward of the action must be set one by one using setReward(double).
| Constructor Summary | |
CsManager(java.lang.String ConfigurationFileName,
java.lang.String project,
Detector detect)
Constructor of the class |
|
| Method Summary | |
boolean |
buildMessage()
Used to pass to the CS the messages, this method call the interface Detector.getMessage()
that must be implemented. |
void |
clearMsgList()
Clear the message list, can be used to initialize the CS or in special case when chains of CS are realized |
Effector |
getEffector()
Method used to obtain an instance of Effector. |
int |
getMAWinners()
Get the number of winner actions within the time lag specified by the parameter "movingAverageLag". |
void |
go()
Method that execute one cycle of computations of the CS. |
void |
printClassifierList()
Print the current classifiers present in classifierList and some complementary information to screen. |
void |
saveClassifierList(java.lang.String fileName)
Save the current classifiers present in classifierList and some complementary information in a file. |
void |
setReward(double reward)
For every action returned by the Effector a reward must be set by this method. |
| Methods inherited from class art.ga.GaManager |
computeBestSolution, getGenerationNumber, getNextSolution, setFitness |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public CsManager(java.lang.String ConfigurationFileName,
java.lang.String project,
Detector detect)
ConfigurationFileName - File name included relative path to the configuration file.project - Project name in the configuration filedetect - Detector implemented by the user from the interface Detector| Method Detail |
public void go()
buildMessage().
public void clearMsgList()
public boolean buildMessage()
Detector.getMessage()
that must be implemented. This method must be used many times as many message must be compute
togethers (in a standard easy case only once).
public void setReward(double reward)
reward - Reward of the current action.public Effector getEffector()
Effector.
public void printClassifierList()
public void saveClassifierList(java.lang.String fileName)
fileName - Destination filename with relative path.public int getMAWinners()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||