|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--MACS.ConditionCoveringManager
The ConditionCoveringManager class is in charge of adding new classifiers when no one matches the last situation experienced. The difficulty consists in setting the added classifier to the good level of generality. The only method called from outside is run().
Field Summary | |
---|---|
private MACS.ClassifierSystem |
classifierSystem
|
static boolean |
DEBUG
|
Constructor Summary | |
---|---|
protected |
ConditionCoveringManager(MACS.ClassifierSystem cs)
|
Method Summary | |
---|---|
private Classifier.Perception |
buildCoveringCondition(Classifier.Perception lastPerception,
MACS.AnticipatoryClassifierList classifierList)
This method builds a general condition part for a new classifier that will be added in the system to cover the last transition. |
private static MACS.PerceptionList |
generalizeByLevels(MACS.PerceptionList L1,
MACS.PerceptionList L2,
MACS.AnticipatoryClassifierList classifierList,
int level)
This method generates recursively a list of condition parts more general than those of the list it receives, checking that no condition in the list is in conflict with those of the classifierList |
private Classifier.Perception |
generalizeEvenMore(Classifier.Perception condition,
MACS.AnticipatoryClassifierList classifierList)
This method generalizes a condition part as much as possible to build a covering classifier. |
private boolean |
isTakenIntoAccount(MACS.AnticipatoryClassifierList classifierList,
Classifier.Perception perception)
This method checks whether the given Perception is matched by the condition part of any member of the classifierList, given that this list contains classifier whose action and effect part match the last action and the current situation. |
protected void |
run(Classifier.Perception lastPerception,
Classifier.Action lastAction,
Classifier.Perception currentPerception)
The main method of the condition covering process. |
private MACS.AnticipatoryClassifierList[] |
splitClassifierSystemIntoConcernedSubsets(Classifier.Action lastAction,
Classifier.Perception currentPerception)
This method scatters the model of Transitions into subsets For each classifier, if the classifier matches the current perception/action couple, it is put into a set whose index corresponds to its first specialized symbol. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static boolean DEBUG
private MACS.ClassifierSystem classifierSystem
Constructor Detail |
protected ConditionCoveringManager(MACS.ClassifierSystem cs)
cs
- Method Detail |
private MACS.AnticipatoryClassifierList[] splitClassifierSystemIntoConcernedSubsets(Classifier.Action lastAction, Classifier.Perception currentPerception)
lastAction
- currentPerception
-
private boolean isTakenIntoAccount(MACS.AnticipatoryClassifierList classifierList, Classifier.Perception perception)
classifierList
- the list among which we look for a matcherperception
- the perception to be matched by the group
private static MACS.PerceptionList generalizeByLevels(MACS.PerceptionList L1, MACS.PerceptionList L2, MACS.AnticipatoryClassifierList classifierList, int level)
L1
- the initial list of conditions to be genralizedL2
- a list of more general conditions than those in L1classifierList
- the list of similar classifiers matching the action and the effect, but not the last perception
private Classifier.Perception generalizeEvenMore(Classifier.Perception condition, MACS.AnticipatoryClassifierList classifierList)
condition
- a tentative condition part matching the last perception that should be generalized further
private Classifier.Perception buildCoveringCondition(Classifier.Perception lastPerception, MACS.AnticipatoryClassifierList classifierList)
lastPerception
- the perception to be coveredclassifierList
- the list of similar classifiers matching the action and the effect, but not the last perception
protected void run(Classifier.Perception lastPerception, Classifier.Action lastAction, Classifier.Perception currentPerception)
lastPerception
- the previous perception of the agentlastAction
- the previous action of the agentcurrentPerception
- the current perception of the agent
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |