org.simnet.neurons
Class TraceNeuron

java.lang.Object
  extended by org.simnet.interfaces.Neuron
      extended by org.simnet.neurons.LinearNeuron
          extended by org.simnet.neurons.TraceNeuron
All Implemented Interfaces:
GaugeSource

public class TraceNeuron
extends LinearNeuron

TraceNeuron is used to model Sutton and Barto's model of conditioning via "eligibility traces."


Field Summary
 
Fields inherited from class org.simnet.interfaces.Neuron
activation, fanIn, fanOut, lowerBound, upperBound
 
Constructor Summary
TraceNeuron()
          Default constructor needed for external calls which create neurons then set their parameters.
TraceNeuron(Neuron n)
          This constructor is used when creating a neuron of one type from another neuron of another type Only values common to different types of neuron are copied.
 
Method Summary
 void clear()
          Set activation to 0; override for other "clearing" behavior.
 Neuron duplicate()
          Returns a duplicate TraceNeuron (used, e.g., in copy/paste).
 double getC1()
           
 double getC2()
           
 double getDifference()
          Returns the difference betwen the predicted and actual output of this neuron.
 double getDifferenceHistory()
          Returns the difference betwen the predicted and actual output of this neuron.
static String getName()
           
 int getTimeType()
           
 String getToolTipText()
          Returns string for tool tip or short description.
 double getTrace()
           
 double getTraceHistory()
           
 void setC1(double c1)
          Sets the c1 value.
 void setC2(double c2)
          Sets the c2 value.
 void update()
          Update neuron.
 
Methods inherited from class org.simnet.neurons.LinearNeuron
getAddNoise, getBias, getClipping, getNoiseGenerator, getSlope, setAddNoise, setBias, setClipping, setNoiseGenerator, setSlope
 
Methods inherited from class org.simnet.interfaces.Neuron
addActivation, addSource, addTarget, checkBounds, clip, connectedToWeight, containsString, debug, decrementActivation, deleteConnectedSynapses, deleteFanIn, deleteFanOut, duplicate, getActivation, getAverageInput, getBuffer, getFanIn, getFanOut, getGaugeValue, getHelp, getId, getIncrement, getInputValue, getLowerBound, getMotorCoupling, getNeuronTypeIndex, getNumberOfActiveInputs, getParentNetwork, getSensoryCoupling, getSummedIncomingWeights, getTotalInput, getType, getTypeList, getUpperBound, getWeightedInputs, getX, getY, incrementActivation, initCastor, isInput, isOutput, randomize, randomizeBuffer, round, setActivation, setBuffer, setFanIn, setFanOut, setId, setIncrement, setInputValue, setLowerBound, setMotorCoupling, setParentNetwork, setSensoryCoupling, setTypeList, setUpperBound, setX, setY, toString, updateConnectedOutward
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TraceNeuron

public TraceNeuron()
Default constructor needed for external calls which create neurons then set their parameters.


TraceNeuron

public TraceNeuron(Neuron n)
This constructor is used when creating a neuron of one type from another neuron of another type Only values common to different types of neuron are copied.

Parameters:
n - Neuron to make the type
Method Detail

getTimeType

public int getTimeType()
Overrides:
getTimeType in class LinearNeuron
Returns:
time type.

duplicate

public Neuron duplicate()
Returns a duplicate TraceNeuron (used, e.g., in copy/paste).

Overrides:
duplicate in class LinearNeuron
Returns:
Duplicated neuron

update

public void update()
Update neuron.

Overrides:
update in class LinearNeuron

getDifference

public double getDifference()
Returns the difference betwen the predicted and actual output of this neuron.

Returns:
activation - trace

getDifferenceHistory

public double getDifferenceHistory()
Returns the difference betwen the predicted and actual output of this neuron.

Returns:
activation - tracehistory

getTrace

public double getTrace()
Returns:
Returns the trace.

getName

public static String getName()
Returns:
Name of neuron type.

getC1

public double getC1()
Returns:
c1 value.

setC1

public void setC1(double c1)
Sets the c1 value.

Parameters:
c1 - value to be set

getC2

public double getC2()
Returns:
c2 value.

setC2

public void setC2(double c2)
Sets the c2 value.

Parameters:
c2 - value to set

clear

public void clear()
Description copied from class: Neuron
Set activation to 0; override for other "clearing" behavior.

Overrides:
clear in class Neuron
See Also:
Neuron

getToolTipText

public String getToolTipText()
Description copied from class: Neuron
Returns string for tool tip or short description.

Overrides:
getToolTipText in class Neuron
Returns:
tool tip text
See Also:
Neuron

getTraceHistory

public double getTraceHistory()
Returns:
Returns the tracehistory.