|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectabp.Adaptive<C,A>
C - The parameter type of the context used in calls to suggest(C, java.util.Set). Note, if this adaptive is contextless (only involves one state, then the Void class and null reference will suffice perfectly. See suggest for a list of the constraints on this type.A - The type corresponding to permissible actions that calls to suggest(C, java.util.Set) can use.public class Adaptive<C,A>
Represents a contextual adaptive or simply adaptive. This is the most useful learning element and should represent a clear point of uncertainty in the program. Adaptives are created through an AdaptiveProcess. We request a value from the adaptive value via the suggest method.
| Method Summary | |
|---|---|
java.util.Map<C,A> |
constructPolicy()
This constructs an optimal policy for the given adaptive. |
void |
disableLearning()
Disables learning on this adaptive... |
void |
enableLearning()
Enables learning on this adaptive. |
A |
suggest(C ctx,
java.util.Set<A> actions)
For a given context and non-empty set of permissible actions, this method suggests a potential action. |
java.lang.String |
toShortString()
Returns a short unique representation of this adaptive object. |
java.lang.String |
toString()
This returns a string showing a table of all the contexts that this adaptive knows about and other related information. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public A suggest(C ctx,
java.util.Set<A> actions)
AdaptiveProcess.reward(double)
to indicate success or failure of a given suggestion.
Note: The context
argument may be hashed internally.
Hence, it should not be modified after it is initially
passed in. Moreover, if the context type's class
overrides Object.equals it must also
override Object.hashCode.
This is not a problem for immutable types such as
String and Integer. If one is using
some sort of complex world state object as the current context,
an immutable copy should be used instead.
java.lang.IllegalArgumentException - if the action set is emptyAdaptiveProcess.reward(double)public java.util.Map<C,A> constructPolicy()
public void disableLearning()
enableLearning(),
AdaptiveProcess.disableLearning()public void enableLearning()
disableLearning for further discussion.
disableLearning(),
AdaptiveProcess.enableLearning()public java.lang.String toShortString()
public 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 | |||||||