Package teamwork :: Package multiagent :: Module Historical :: Class HistoricalAgents
[hide private]
[frames] | no frames]

Class HistoricalAgents

source code

             object --+                
                      |                
                   dict --+            
                          |            
Multiagent.MultiagentSystem --+        
                              |        
Simulation.MultiagentSimulation --+    
                                  |    
            PsychAgents.PsychAgents --+
                                      |
                                     HistoricalAgents

Instance Methods [hide private]
new empty dictionary

__init__(self)
Initializes a simulation to contain the given list of agents.
source code
 
getHistory(self) source code
 
microstep(self, turns=[], hypothetical=False, explain=False, suggest=False, debug=Debugger (0))
Step forward by the action of the given entities
source code

Inherited from PsychAgents.PsychAgents: __copy__, __deepcopy__, __xml__, addMember, applyChanges, applyDefaults, applyOrder, compileDynamics, compilePolicy, detectViolations, explainAction, explainDecision, explainEffect, explainExpectation, explainMessage, generateWorlds, getActionDynamics, getActions, getDynamics, getDynamicsMatrix, getMember, getStateDynamics, hypotheticalAct, individualObs, initialize, parse, performAct, performMsg, reachable, setModelChange, suggest, suggestAll, toHTML, updateAll, verifyTree

Inherited from Simulation.MultiagentSimulation: actionCount, activeMembers, actorCount, applyTurn, createTurnDynamics, deleteState, generateActions, generateOrder, getSequence, getState, getStateKeys, initializeOrder, next, updateTurn

Inherited from Multiagent.MultiagentSystem: __str__, members, save

Inherited from dict: __cmp__, __contains__, __delitem__, __eq__, __ge__, __getattribute__, __getitem__, __gt__, __hash__, __iter__, __le__, __len__, __lt__, __ne__, __new__, __repr__, __setitem__, clear, copy, fromkeys, get, has_key, items, iteritems, iterkeys, itervalues, keys, pop, popitem, setdefault, update, values

Inherited from object: __delattr__, __reduce__, __reduce_ex__, __setattr__

Class Variables [hide private]

Inherited from PsychAgents.PsychAgents: __VERIFY__, observationDecay, threaded

Inherited from Simulation.MultiagentSimulation: threshold, turnFeature

Instance Variables [hide private]

Inherited from Simulation.MultiagentSimulation: order, time

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

source code 

Initializes a simulation to contain the given list of agents. If you would like to create your own turn state and dynamics, override the methods generateOrder and createTurnDynamics.

Parameters:
  • entities - list or dictionary of Agent instances
Returns:
new empty dictionary

Overrides: object.__init__
(inherited documentation)

microstep(self, turns=[], hypothetical=False, explain=False, suggest=False, debug=Debugger (0))

source code 

Step forward by the action of the given entities

Parameters:
  • turns - the agents to act next (defaults to result of next), each entry in the list should be a dictionary:
    • name: the name of the agent to act
    • choices: the list of possible options this agent can consider in this turn (defaults to the list of all possible actions if omitted, or if the list is empty)
  • hypothetical - if True, then this is only a hypothetical microstep; otherwise, it is real
  • explain - if True, then add an explanation to the result
  • suggest - if True, then suggest possible belief changes to ensure that the behavior in this step meets whatever objectives have been specifieid (default is False)
Returns:
a dictionary of results:
  • decision: the dictionary of actions performed in this turn
  • delta: the changes to the state (suitable for passing in to applyChanges)
  • explanation: an XML document explaining what happened in this step and why
Overrides: PsychAgents.PsychAgents.microstep
(inherited documentation)