|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--MACS.MACSActionSelector
The MACSActionSelector class is in charge of choosing the next action both in the context of actual action and in the context of "mental" propagation of values. In order to choose the best action, it must access both the model of transitions and the models of payoff.
Field Summary | |
---|---|
protected Classifier.Action[] |
actions
|
private MACS.HierarchicalAgregator |
agregator
|
protected Classifier.Perception[] |
anticipations
|
static boolean |
DEBUG
|
private MACS.ExploMemory |
exploMemory
|
protected double |
maxValueOfPossibleActions
|
private int[] |
modelNumber
|
protected MACS.MultiModelOfPayoff |
modelOfPayoff
|
protected MACS.ClassifierSystem |
modelOfTransitions
|
protected int |
nbPossibilities
|
protected MACS.ModularClassifierSystemTraceManager |
traceManager
|
Constructor Summary | |
---|---|
protected |
MACSActionSelector(MACS.ModularClassifierSystemTraceManager tm,
MACS.ClassifierSystem modTrans,
MACS.MultiModelOfPayoff mp,
MACS.ExploMemory explo)
|
Method Summary | |
---|---|
protected Classifier.Action |
chooseActualAction(Classifier.Perception currentPerception)
Performing actual actions nb : several selection modes can be performed in parallel |
protected void |
fillArrays(java.util.Vector[] possib,
Classifier.Perception currentPerception)
|
MACS.MultiModelOfPayoff |
getModelOfPayoff()
|
MACS.PerceptionList |
getPerceptionList()
|
protected void |
initArrays(int nbPoss)
Init all the tables |
Classifier.Action |
selectAction(Classifier.Action lastAction,
Classifier.Perception currentPerception,
boolean actualAction,
java.util.Vector[] possib)
Choose the action to be performed if actualAction = true, it is the action of the agent. |
private Classifier.Action |
selectActionAtRandom()
Choose a random action |
private int |
selectBestPossibility(int hierarchyLevel,
boolean totallyGreedy)
This method returns the index of the best possible action -> positive or null if there is one -> -1 if there is no -> -2 if the possibilities are equivalent The algorithm is the following: for each action, retreive the best anticipated situation corresponding to that action and its value. |
private int |
selectPossibility(int hierarchyLevel,
Classifier.Action action,
boolean best)
This method is slightly less efficient than Pierre's (calling selectWorstPossibilityForAction and selectBestPossibilityForAction), but far more clear... |
void |
setModelNumber(int model,
int value)
|
java.lang.String |
toString()
|
protected void |
updateModels(Classifier.Perception currentPerception)
Performing a mental action nb : several selection modes can be performed in parallel |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static boolean DEBUG
protected MACS.ClassifierSystem modelOfTransitions
protected MACS.MultiModelOfPayoff modelOfPayoff
protected MACS.ModularClassifierSystemTraceManager traceManager
protected double maxValueOfPossibleActions
protected int nbPossibilities
private MACS.HierarchicalAgregator agregator
private MACS.ExploMemory exploMemory
protected Classifier.Action[] actions
protected Classifier.Perception[] anticipations
private int[] modelNumber
Constructor Detail |
protected MACSActionSelector(MACS.ModularClassifierSystemTraceManager tm, MACS.ClassifierSystem modTrans, MACS.MultiModelOfPayoff mp, MACS.ExploMemory explo)
tm
- modTrans
- Method Detail |
public MACS.MultiModelOfPayoff getModelOfPayoff()
public MACS.PerceptionList getPerceptionList()
private Classifier.Action selectActionAtRandom()
public void setModelNumber(int model, int value)
protected final void initArrays(int nbPoss)
nbPoss
- : number of situations that are supposed to be reachableprotected final void fillArrays(java.util.Vector[] possib, Classifier.Perception currentPerception)
possib
- private int selectBestPossibility(int hierarchyLevel, boolean totallyGreedy)
hierarchyLevel
- : actionSelection Mode : 0 = information, 1 = external reward, 2 = rehearsaltotallyGreedy
- : if true, choose the best action. If not, choose the worst
protected final void updateModels(Classifier.Perception currentPerception)
currentPerception
- private int selectPossibility(int hierarchyLevel, Classifier.Action action, boolean best)
protected final Classifier.Action chooseActualAction(Classifier.Perception currentPerception)
currentPerception
-
public Classifier.Action selectAction(Classifier.Action lastAction, Classifier.Perception currentPerception, boolean actualAction, java.util.Vector[] possib)
lastAction
- currentPerception
- actualAction
-
public final java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |