com.anji.floatingeye
Class AnjiNetFloatingEye

java.lang.Object
  extended bycom.anji.floatingeye.AnjiNetFloatingEye
All Implemented Interfaces:
XmlPersistable

public class AnjiNetFloatingEye
extends java.lang.Object
implements XmlPersistable

TODO - non square surface & non square eyes Implements a floating eye that integrates with an AnjiNet ANN.

Author:
Philip Tucker

Constructor Summary
AnjiNetFloatingEye(AnjiNet aNet, Surface aSurface, int anEyeDim, EyeMovementParms movementParms, AffinityListener anAffinityListener, java.util.List additionalInputConnections)
          Connects and AnjiNet to a FloatingEye.
 
Method Summary
 long cost()
           
 FloatingEye getFloatingEye()
           
 int getStepNum()
           
 java.lang.String getXmld()
           
 java.lang.String getXmlRootTag()
           
 void reset()
          reset neural net and state of eye
 void step()
          load eye, step network, and update position from network output
 void step(int count)
           
 java.lang.String toString()
           
 java.lang.String toXml()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AnjiNetFloatingEye

public AnjiNetFloatingEye(AnjiNet aNet,
                          Surface aSurface,
                          int anEyeDim,
                          EyeMovementParms movementParms,
                          AffinityListener anAffinityListener,
                          java.util.List additionalInputConnections)
Connects and AnjiNet to a FloatingEye.

Parameters:
aNet - in general, input dimensions must be at least 5 (x, y, z, theta, bias) + 2*eyeDim (1 input for each coordinate in eye) + number of connections in additionalInputConnections, and output dimension must be at least 5 (x, y, z, rotate, affinity); but, any input for which the corresponding maxMovePerStep parameter is 0 is omitted
aSurface - 2-d matrix of ints
anEyeDim -
movementParms - paramaters controlling movement of eye
anAffinityListener - updated when affinity is updated
additionalInputConnections - input connections in addition to x, y, z, theta, and bias
Method Detail

toXml

public java.lang.String toXml()
Specified by:
toXml in interface XmlPersistable
Returns:
String XML representation of object

toString

public java.lang.String toString()
See Also:
Object.toString()

reset

public void reset()
reset neural net and state of eye


step

public void step(int count)
Parameters:
count - number of times to step
See Also:
step()

step

public void step()
load eye, step network, and update position from network output


getStepNum

public int getStepNum()
Returns:
number of steps eye has performed

cost

public long cost()
Returns:
cost
See Also:
AnjiNet.cost()

getFloatingEye

public FloatingEye getFloatingEye()
Returns:
floating eye

getXmlRootTag

public java.lang.String getXmlRootTag()
Specified by:
getXmlRootTag in interface XmlPersistable
Returns:
root tag
See Also:
XmlPersistable.getXmlRootTag()

getXmld

public java.lang.String getXmld()
Specified by:
getXmld in interface XmlPersistable
Returns:
id
See Also:
XmlPersistable.getXmld()