clarion.system
Class QLearningMatchCalculator

java.lang.Object
  extended by clarion.system.AbstractMatchCalculator
      extended by clarion.system.QLearningMatchCalculator

public class QLearningMatchCalculator
extends AbstractMatchCalculator

This class implements a Q-learning match calculator within CLARION. It extends the AbstractMatchCalculator class.

Usage:

This class can be used within the subsystems of CLARION (mainly the ACS) for calculating match statistics for any components within the CLARION Library that implement InterfaceTracksMatchStatistics. Usually the subsystem itself will contain a match calculator which is used communally by all of the components within that subsystem. However, if a component implements InterfaceHasMatchCalculator, then that component will use its own match calculator.

The method used by the Q-learning match calculator for determining positivity is:

Discount * Max(Q(y,b)) + Feedback - Q(x,a) >= Positive Match Threshold

Version:
6.0.4
Author:
Nick Wilson

Field Summary
private  InterfaceUsesQLearning Q
          The Q-learning object that is used for calculating positivity.
 
Constructor Summary
QLearningMatchCalculator(InterfaceUsesQLearning q)
          Initializes the Q-learning match calculator with Q-learning object specified.
 
Method Summary
 boolean isPositive(double feedback, double threshold)
          Checks to see if an outcome was positive based on the feedback received and a specified pre-defined threshold parameter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

Q

private InterfaceUsesQLearning Q
The Q-learning object that is used for calculating positivity. This can be anything that implements the InterfaceUsesQLearning interface (although most commonly it is a QBPNet).

Constructor Detail

QLearningMatchCalculator

public QLearningMatchCalculator(InterfaceUsesQLearning q)
Initializes the Q-learning match calculator with Q-learning object specified.

Parameters:
q - The Q-learning object to use for determining positivity.
Method Detail

isPositive

public boolean isPositive(double feedback,
                          double threshold)
Checks to see if an outcome was positive based on the feedback received and a specified pre-defined threshold parameter.

The method used by the Q-learning match calculator for determining positivity is:

Discount * Max(Q(y,b)) + Feedback - Q(x,a) >= Positive Match Threshold

Specified by:
isPositive in class AbstractMatchCalculator
Parameters:
feedback - The feedback received.
threshold - The threshold that must be passed in order for the outcome to be considered positive.
Returns:
True if the outcome was positive, otherwise false.