|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--Manager
This class is a manager, containing the main loop of the manager's XCS. The XCS is implemented following Martin V. Butz and Steward Wilson (2001) "An algorithmic description of XCS". Moreover, it handles the evaluation of performance.
| Field Summary | |
(package private) int |
actionWinner
The index of the last best agent |
private static XCSConstantsManager |
cons
Stores the relevant constants for XCS. |
private XClassifierSetManager |
gpop
Stores the current population of XCS. |
private XClassifierSetManager |
matchSet
The Match set for each problem |
private static int |
nrActions
The number of actions of the manager (=total number of agents) |
private double |
reward
The reward the manager receives from the environment for a given answer |
private java.lang.String |
state
the environment state corresponding to the actual problem |
| Constructor Summary | |
Manager(int conditionLength,
int nrAgents)
Constructs the XCS system of the manager. |
|
| Method Summary | |
int |
getActualAgent(java.lang.String actualState,
int time,
AgentsPopulations wholePopulation,
int selector0)
The task of the manager is to choose the most qualified agent to fulfill the task submitted by the environment (to answer the problem submitted by the environment). |
double |
getPerformance()
return the reward received by the agent |
XClassifierSetManager |
getPopulation()
Return the population of rules of an agent |
int |
pickUpAgentAtRandom(AgentsPopulations wholePop,
java.lang.String actualState,
int time,
int selector0)
Choose an agent to perform the task at hand. |
void |
showPopStructure()
Display the proportion of each advocated action in the set of rules of the manager |
void |
updatePop(double reward,
int counter)
The manager learns from the reward it received from the environment after the chosen agent has answered. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private static int nrActions
private XClassifierSetManager gpop
private XClassifierSetManager matchSet
int actionWinner
private static XCSConstantsManager cons
XCSConstantsManagerprivate double reward
private java.lang.String state
| Constructor Detail |
public Manager(int conditionLength,
int nrAgents)
conditionLength - The bit-string length of the condition parts of classifiersnrAgents - Total number of agents in the population; also the number
of possible actions for the manager.XCSConstantsManager.XCSConstantsManager(),
XClassifierSetManager.XClassifierSetManager(int, int)| Method Detail |
public double getPerformance()
public XClassifierSetManager getPopulation()
public int getActualAgent(java.lang.String actualState,
int time,
AgentsPopulations wholePopulation,
int selector0)
actualState - The current problemtime - A time counter (nb of experiments)wholePopulation - Total number of Agents in the systemselector0 - mode of classifier selection by the manager (1->bestAction; 0->rouletteWheel)XClassifierSetManager.XClassifierSetManager(String, XClassifierSetManager, int, AgentsPopulations, int),
PredictionArray.PredictionArray(XClassifierSetManager, int),
PredictionArray.bestActionWinner(),
PredictionArray.rouletteActionWinner()
public void updatePop(double reward,
int counter)
reward - The reward received from the environment after an answer to
the problem has been fired. It is used to update both manager's and agent's classifiercounter - A time counterXClassifierSetManager.XClassifierSetManager(XClassifierSetManager, int),
XClassifierSetManager.updateSet(double, double),
XClassifierSetManager.runGAManager(int, String, int)
public int pickUpAgentAtRandom(AgentsPopulations wholePop,
java.lang.String actualState,
int time,
int selector0)
wholePop - The total population of agentsactualState - the current problemtime - A time counterselector0 - mode of classifiers selectionAgent.getCloseState(String, AgentsPopulations),
XClassifierManager#XClassifierManager(int, int, String, int),
XClassifierSetManager.addXClassifierToPopulation(XClassifierManager),
XClassifierSetManager.deleteFromPopulation(),
XClassifierSetManager.XClassifierSetManager(String, XClassifierSetManager, int, AgentsPopulations, int),
PredictionArray.PredictionArray(XClassifierSetManager, int),
PredictionArray.bestActionWinner(),
PredictionArray#roultetteActionWinner()public void showPopStructure()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||