MACS
Class PayoffModel
java.lang.Object
|
+--java.util.AbstractMap
|
+--java.util.TreeMap
|
+--MACS.PayoffModel
- All Implemented Interfaces:
- java.lang.Cloneable, java.util.Map, java.io.Serializable, java.util.SortedMap
- final class PayoffModel
- extends java.util.TreeMap
The PayoffModel class implements a list of immediate values and expected values
associated to each possible perception.
It is organized as a Map whose key is a Perception and whose value
is a couple of doubles : the immediate value and the expected value.
- Author:
- Olivier Sigaud and Pierre Gérard.
Fields inherited from class java.util.TreeMap |
|
Fields inherited from class java.util.AbstractMap |
|
Constructor Summary |
PayoffModel(java.lang.String mt,
double ilr,
double dlr,
double df)
|
Methods inherited from class java.util.TreeMap |
clear, clone, comparator, containsKey, containsValue, entrySet, firstKey, get, headMap, keySet, lastKey, put, putAll, remove, size, subMap, tailMap, values |
Methods inherited from class java.util.AbstractMap |
equals, hashCode, isEmpty |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.Map |
equals, hashCode, isEmpty |
modeltype
private java.lang.String modeltype
discount_factor
private double discount_factor
incr_learning_rate
private double incr_learning_rate
decr_learning_rate
private double decr_learning_rate
traceFlag
public static boolean traceFlag
localTraceFlag
public static boolean localTraceFlag
PayoffModel
public PayoffModel(java.lang.String mt,
double ilr,
double dlr,
double df)
- Parameters:
ilr
- dlr
- df
-
getCouple
public MACS.CoupleDoubles getCouple(Classifier.Perception p)
- Parameters:
p
-
- Returns:
- MACS.CoupleDoubles
setTraceFlag
public void setTraceFlag(boolean f)
- Parameters:
f
-
init
public void init(Classifier.Perception p)
- Parameters:
p
-
getImmediateValue
public double getImmediateValue(Classifier.Perception p)
- Parameters:
p
-
- Returns:
- double
setImmediateValue
public void setImmediateValue(Classifier.Perception p,
double v)
- Parameters:
p
- v
-
put
public void put(Classifier.Perception p,
MACS.CoupleDoubles v)
- Parameters:
p
- v
-
getExpectedValue
public double getExpectedValue(Classifier.Perception p)
- Parameters:
p
-
- Returns:
- double
setExpectedValue
public void setExpectedValue(Classifier.Perception p,
double v)
- Parameters:
p
- v
-
updateImmediateValue
public final void updateImmediateValue(Classifier.Perception currentPerception,
double currentReward)
- widrow-hoff himself (c'est le cas où on augmente, pour l'external reward)
- Parameters:
currentReward
- currentPerception
-
getUpdatedExpectedValue
public final double getUpdatedExpectedValue(Classifier.Perception perception)
updateImmediateRehearsal
public final void updateImmediateRehearsal(Classifier.Perception currentPerception,
double proba)
- Update the rehearsal values of situations depending on whether they are visited or not
Stochastic version
- Parameters:
currentPerception
- : the situation visitedproba
- : the probability to update
updateImmediateRehearsal
public final void updateImmediateRehearsal(Classifier.Perception currentPerception)
- Update the rehearsal values of situations depending on whether they are visited or not
Deterministic version
- Parameters:
currentPerception
- : the situation visited
setImmediateInfoValue
public final void setImmediateInfoValue(MACS.InfoValueEstimator infoEstimator,
java.util.Vector anticip)
- Update the information values of situations from the infoValueEstimator
- Parameters:
infoEstimator
- : the infoValueEstimator
resetExpectedValues
protected final void resetExpectedValues()
resetImmediateValues
protected final void resetImmediateValues()
isPossibleToResetExpectedValues
protected final boolean isPossibleToResetExpectedValues()
- Manifestement, on ne peut faire un reset sur les ExpectedValues qui si toutes
les ImmediateValues sont nulles
- Returns:
- boolean
getMaxExpectedValue
protected final double getMaxExpectedValue()
- Returns:
- double
toString
public final java.lang.String toString()
- Overrides:
toString
in class java.util.AbstractMap
- Returns:
- String