Base class for an agent that keeps recursive models of the other
agents in its world.
|
|
|
|
Distribution
|
|
|
setState(self,
feature,
value)
Sets this entity's state value for the specified feature |
source code
|
|
Distribution
|
|
|
|
str[]
|
|
RecursiveAgent
|
getEntity(self,
name)
Returns:
the agent representing the beliefs about the given entity |
source code
|
|
|
__getitem__(self,
index)
Allows indexing into entity beliefs (i.e.,
entity['Bill'] ) |
source code
|
|
boolean
|
|
str[]
|
|
Agent[]
|
|
StateKey[]
|
|
|
|
|
|
|
|
|
setBelief(self,
name,
feature,
value)
Shortcut for self.getEntity(entity).{setState}(feature,value) |
source code
|
|
|
setSelfBelief(self,
feature,
value)
Shortcut for self.setBelief(self,feature,value) |
source code
|
|
|
setEntity(self,
entity)
Sets my belief about the given entity to be the provided entity
object. |
source code
|
|
|
|
dict
|
|
(Action[],Element)
|
applyPolicy(self,
state=None,
actions=[ ] ,
history=None,
debug=None,
explain=False)
Generates a decision chosen according to the agent's current policy |
source code
|
|
|
invalidateCache(self)
Removes any cached policy value, as well as any cached policy values
of my parents |
source code
|
|
|
|
|
|
dict
|
preComStateEstimator(self,
beliefs,
actions,
epoch=-1,
debug=None)
Computes the hypothetical changes to the given beliefs in response to
the given actions |
source code
|
|
KeyedMatrix
|
|
KeyedMatrix
|
|
list
|
|
|
saveObservations(self,
obs)
Adds the given observation to the history |
source code
|
|
a tuple (boolean,int)
|
|
|
resetHistory(self,
beliefs=None)
Resets the observation history of the specified beliefs (defaults to
this entity's beliefs if none provided) |
source code
|
|
dict
|
observe(self,
actionDict={ } )
Returns:
observations this entity would make of the given actions, in the same
format as the provided action dictionary |
source code
|
|
teamwork.math.Keys.ActionKey[]
|
|
|
multistep(self,
horizon=1,
start={ } ,
state=None,
debug=None)
Steps this entity the specified number of steps into the future
(where a step is one entity performing its policy-specified action) |
source code
|
|
|
|
|
step(self,
actDict,
state=None,
debug=None)
Modifies the current entity in response to the policy-driven actions
selected by the provided dictionary of entities. |
source code
|
|
PWLDynamics
|
|
|
applyChanges(self,
beliefs,
delta,
descend=1,
rewind=0)
Takes changes and modifies the given beliefs accordingly |
source code
|
|
|
freeze(self)
Takes the current state of beliefs and marks it as the initial,
beginning-of-the-world state of beliefs. |
source code
|
|
str
|
ancestry(self)
Returns:
a string representation of this entity's position in the recursive
belief tree. |
source code
|
|
int
|
beliefDepth(self)
Returns:
the recursive depth of the current entity (0 is the depth of a root
entity) |
source code
|
|
|
|
|
|
|
__str__(self)
Returns a string representation of this entity |
source code
|
|
|
|
|
|
boolean
|
|
|
|
|
parse(self,
element)
Extracts this agent's recursive belief structure from the given XML
Element |
source code
|
|
Inherited from Agent.Agent :
__cmp__ ,
generateAllObservations ,
generateHistories ,
legalActions ,
legalMessages ,
observable ,
postComStateEstimator
|