Package teamwork :: Package agent :: Module Agent :: Class Agent
[hide private]
[frames] | no frames]

Class Agent

source code

Known Subclasses:

Top-level agent class

Nested Classes [hide private]
Action subclass (default is action) actionClass
the Python class for this agent's option instances
Instance Methods [hide private]
 
__init__(self, name='Generic Agent') source code
 
setName(self, name)
Sets the name of this agent
source code
 
legalActions(self, state)
Default method for specifying the set (i.e., list) of actions that this agent can choose from in the given state
source code
 
legalMessages(self, state)
Default method for specifying the set (i.e., list) of messages that this agent can choose from in the given state
source code
 
generateAllObservations(self) source code
 
generateHistories(self, length) source code
 
initialStateEstimator(self)
Generates the initial belief state for the specified agent
source code
 
preComStateEstimator(self, beliefs, obs, epoch=-1)
Updates the agent's beliefs based on its observations
source code
 
postComStateEstimator(self, beliefs, msgs, epoch=-1)
Updates the agent's beliefs based on received messages
source code
bool
observable(self)
Returns: True iff this agent has perfect observability of all actions
source code
 
__cmp__(self, agent)
Default comparison function...treats all agents equally
source code
 
__copy__(self) source code
 
__xml__(self) source code
 
parse(self, element) source code
Instance Variables [hide private]
DecisionSpace actions
the space of possible actions this agent can perform
string name
the unique label for this agent
  omega
set of possible observations
Method Details [hide private]

__init__(self, name='Generic Agent')
(Constructor)

source code 
Parameters:
  • name (str) - a label string

setName(self, name)

source code 

Sets the name of this agent

Parameters:
  • name (str) - the unique ID for this agent

observable(self)

source code 
Returns: bool
True iff this agent has perfect observability of all actions

Warning: This is a superficial check that the observation function specifies True for all action combinations. It will return False if there are branches, non-True leaf nodes, even if the end result is equivalent to perfect observability