Package teamwork :: Package multiagent :: Module sequential :: Class SequentialAgents
[hide private]
[frames] | no frames]

Class SequentialAgents

source code

             object --+                
                      |                
                   dict --+            
                          |            
Multiagent.MultiagentSystem --+        
                              |        
Simulation.MultiagentSimulation --+    
                                  |    
            PsychAgents.PsychAgents --+
                                      |
                                     SequentialAgents
Known Subclasses:

A utility class that supports sequential turns by a group of agents. The order is determined by the ordering methods on the component agent classes.


Warning: sequentiality is required, so don't try having multiple agents act at the same time.

Instance Methods [hide private]
KeyedVector
generateOrder(self, entities=None)
Creates a new order vector.
source code
KeyedTree
createTurnDynamics(self, actions)
Computes the change in turn due to the specified actions
source code

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

Inherited from Simulation.MultiagentSimulation: actionCount, activeMembers, actorCount, applyTurn, deleteState, generateActions, 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]

generateOrder(self, entities=None)

source code 

Creates a new order vector. Orders the agents according to the comparison method on the member agents

Parameters:
  • entities (teamwork.agent.Agent.Agent[]) - the ordered list of entities to use (if omitted, defaults to the sorted list of active members)
Returns: KeyedVector
the turn state vector suitable for the initial state of the simulation
Overrides: Simulation.MultiagentSimulation.generateOrder

createTurnDynamics(self, actions)

source code 

Computes the change in turn due to the specified actions

Parameters:
Returns: KeyedTree
a decision tree representing the changes to the standing turn order vector based on the specified actions
Overrides: Simulation.MultiagentSimulation.createTurnDynamics