Package pyrobot :: Package brain :: Module governor :: Class Governor
[frames | no frames]

Class Governor

Known Subclasses:
GovernorNetwork, GovernorSRN

An RAVQ vitual baseclass for combination with Network.

Method Summary
  __nextitem__(self)
For use in iterable positions: >>> govnet = GovernorNetwork() >>> for item in govnet: ...
  distancesTo(self, vector)
Computes euclidean distance from a vector to all model vectors.
  incompatibility(self)
For each model, how different is it from each of the buffer items? Returns list of incompatibilities.
  input(self, vector)
Wrapper around ravq.input() which returns index and mapped-to m.v.
  loadRAVQ(self, filename)
Loads RAVQ data from a file.
  map(self, vector)
Returns the index and vector of winning position.
  nextItem(self)
Public interface for getting next item from RAVQ.
  saveRAVQ(self, filename)
Saves RAVQ data to a file.
  setBalancedMask(self)
Give each layer an equal weighting, so that all weights sum to one.
  setMask(self, **args)
Takes a dictionary of layer names and mask weights.
  winner(self)
Get's winning name, m.v.

Method Details

__nextitem__(self)

For use in iterable positions:
>>> govnet = GovernorNetwork()
>>> for item in govnet:
...    print item
...

distancesTo(self, vector)

Computes euclidean distance from a vector to all model vectors. Note: uses mask
to scale.

incompatibility(self)

For each model, how different is it from each of the buffer items? Returns list of
incompatibilities. Note: uses mask to scale.

input(self, vector)

Wrapper around ravq.input() which returns index and mapped-to m.v. Here, we convert
index to "name".

loadRAVQ(self, filename)

Loads RAVQ data from a file.

map(self, vector)

Returns the index and vector of winning position. Side effect: records
index of winning pos in histogram and decayHistogram.

nextItem(self)

Public interface for getting next item from RAVQ.

saveRAVQ(self, filename)

Saves RAVQ data to a file.

setBalancedMask(self)

Give each layer an equal weighting, so that all weights sum to one.

setMask(self, **args)

Takes a dictionary of layer names and mask weights.

winner(self)

Get's winning name, m.v. of last winner.

Generated by Epydoc 2.1 on Mon Jul 25 01:39:28 2005 http://epydoc.sf.net