Package teamwork :: Package policy :: Module policyTable
[hide private]
[frames] | no frames]

Module policyTable

source code

Classes [hide private]
  PolicyTable
Super-nifty class for representing policies as tables and using policy iteration to optimize them.
Functions [hide private]
 
adjustInterval(intervals, index, key, row)
Adjust a specific interval by the effect of the given row
source code
 
insertBranch(new, oldList)
Adds the new branch to the old list if neither it (nor its inverse) is already present
source code
Variables [hide private]
  EMPTY_NAMESPACE = None
  EMPTY_PREFIX = None
  StringTypes = (<type 'str'>, <type 'unicode'>)
  XMLNS_NAMESPACE = 'http://www.w3.org/2000/xmlns/'
Function Details [hide private]

adjustInterval(intervals, index, key, row)

source code 

Adjust a specific interval by the effect of the given row

Parameters:
  • intervals - the intervals the state currently lies in
  • index - the index of the current interval of relevance
  • key - the state feature key being adjusted
  • row - the effect row on the state feature
Returns:
the adjusted interval

insertBranch(new, oldList)

source code 

Adds the new branch to the old list if neither it (nor its inverse) is already present

Parameters:
  • new (KeyedPlane) - branch to be added
  • oldList (KeyedPlane[]) - the branches already found (modified directly)