net.sourceforge.jabm.learning
Class AbstractLearner

java.lang.Object
  extended by net.sourceforge.jabm.learning.AbstractLearner
All Implemented Interfaces:
java.io.Serializable, Learner
Direct Known Subclasses:
DumbLearner, DumbRandomLearner, MetaLearner, QLearner, RothErevLearner, SlidingWindowLearner, StatelessQLearner, WidrowHoffLearner

public abstract class AbstractLearner
extends java.lang.Object
implements Learner, java.io.Serializable

See Also:
Serialized Form
 

Field Summary
protected  LearnerMonitor monitor
           
 
Constructor Summary
AbstractLearner()
           
 
Method Summary
abstract  void dumpState(DataWriter out)
          Write out our state data to the specified data writer.
abstract  double getLearningDelta()
          Return a value indicative of the amount of learning that occured during the last iteration.
 void monitor()
          A hook to provide monitoring functionality.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

monitor

protected LearnerMonitor monitor
Constructor Detail

AbstractLearner

public AbstractLearner()
Method Detail

monitor

public void monitor()
Description copied from interface: Learner
A hook to provide monitoring functionality. Implementations of learning algorithms should either log, or provide a visualisation of, their state in response to this method.

Specified by:
monitor in interface Learner

getLearningDelta

public abstract double getLearningDelta()
Description copied from interface: Learner
Return a value indicative of the amount of learning that occured during the last iteration. Values close to 0.0 indicate that the learner has converged to an equilibrium state.

Specified by:
getLearningDelta in interface Learner
Returns:
A double representing the amount of learning that occured.

dumpState

public abstract void dumpState(DataWriter out)
Description copied from interface: Learner
Write out our state data to the specified data writer.

Specified by:
dumpState in interface Learner