An entity mix-in class that has a reward function based on
maximization/minimization of features/actions
|
|
|
|
|
setGoals(self,
goals)
Sets the goals to the provided list, after normalizing weights |
source code
|
|
|
|
normalizeGoals(self)
Scales all goal weights to sum to 1. |
source code
|
|
|
|
|
Distribution over float
|
applyGoals(self,
entity=None,
world=None,
debug=None)
Returns:
expected reward of the entity in current world |
source code
|
|
|
PWLGoal[]
|
|
|
float
|
|
|
KeyedVector instance
|
getGoalVector(self)
Returns a vector representing the goal weights |
source code
|
|
|
teamwork.math.ProbabilityTree
|
|
|
|
actionValue(self,
actions,
horizon=1,
state=None,
debug=None)
Compute the expected value of performing the given action |
source code
|
|
|
|
expectedValue(self,
horizon=1,
start={},
goals=None,
state=None,
debug=None)
Returns:
the expected reward from the current state |
source code
|
|
|
KeyedVector
|
|
|
dict[]
|
generateConstraints(self,
desired,
horizon=-1,
state=None)
Computes a set of constraints on possible goal weights for this agent
that, if satisfied, will cause the agent to prefer the desired action
in the given state. |
source code
|
|
|
KeyedVector (str)
|
fit(self,
desired,
horizon=-1,
state=None,
granularity=0.01,
label=None)
Computes a new set of goal weights for this agent that will cause the
agent to prefer the desired action in the given state. |
source code
|
|
|
|
|
|
|
|
|
|
|
|
|
parse(self,
element)
Extracts this agent's recursive belief structure from the given XML
Element |
source code
|
|
|
Inherited from RecursiveAgent.RecursiveAgent:
__deepcopy__,
__eq__,
__getitem__,
__ne__,
ancestry,
applyChanges,
applyPolicy,
beliefDepth,
findObservation,
freeze,
getActionKeys,
getAllBeliefs,
getBelief,
getBeliefKeys,
getDynamics,
getEntities,
getEntity,
getEntityBeliefs,
getNestedBelief,
getObservation,
getObservations,
getSelfBelief,
getState,
getStateFeatures,
hasBelief,
incorporateMessage,
initialStateEstimator,
invalidateCache,
multistep,
observe,
preComStateEstimator,
resetHistory,
saveObservations,
setBelief,
setEntity,
setName,
setObservation,
setRecursiveBelief,
setSelfBelief,
setState,
stateEstimator,
step,
toHTML,
updateStateDict
Inherited from Agent.Agent:
__cmp__,
generateAllObservations,
generateHistories,
legalActions,
legalMessages,
observable,
postComStateEstimator
|