clarion.coordinate
Class StochasticComb

java.lang.Object
  extended byclarion.coordinate.StochasticComb

public class StochasticComb
extends java.lang.Object


Constructor Summary
StochasticComb(int mode, int compNum, double[] arr)
          constructor.
StochasticComb(int mode, int compNum, double[] arr, Global g)
          constructor.
 
Method Summary
 void calcProbabilities()
          Calculates the probabilities.
 int selectAction(double[] utilArr)
          Selects one action from the action-decision network (such as EX, GS, WM action-decision network) using "boltzmann distribution based on utility" approach based on a chosen component.
 int selectAction(int actNum)
          Selects randomly one action from the action-decision network (such as EX, GS, WM action-decision network) using "randomly selected" approach based on a chosen component.
 int selectAction(int netIdx, int knowledgeType, double[] utilArr)
          Selects one action from the action-decision network (such as EX, GS, WM action-decision network) using "boltzmann distribution based on utility" approach based on a chosen component.
 int selectComponent()
          using "radomly selected" approach to select one component on which the chosen actions are based, such as action chosing is based on BL, FR, RER, IRL etc.
 void setSuccRate(double[] arr)
          Sets the success rates.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StochasticComb

public StochasticComb(int mode,
                      int compNum,
                      double[] arr)
constructor.

Parameters:
mode - = 0: fixed method which means the probs are fixed, mode = 1: variable method which means the probs are got by calculation.
compNum - the number of components.
arr - the array of parameter values. mode = 0: carries the values of probabilities. mode = 1: carries the values of beta.

StochasticComb

public StochasticComb(int mode,
                      int compNum,
                      double[] arr,
                      Global g)
constructor.

Parameters:
mode - = 0: fixed method which means the probs are fixed, mode = 1: variable method which means the probs are got by calculation.
compNum - the number of components.
arr - the array of parameter values. mode = 0: carries the values of probabilities. mode = 1: carries the values of beta.
g - the global settings.
Method Detail

setSuccRate

public void setSuccRate(double[] arr)
Sets the success rates. used in variable combination method.


calcProbabilities

public void calcProbabilities()
Calculates the probabilities. Used for variable combination.


selectComponent

public int selectComponent()
using "radomly selected" approach to select one component on which the chosen actions are based, such as action chosing is based on BL, FR, RER, IRL etc.


selectAction

public int selectAction(int actNum)
Selects randomly one action from the action-decision network (such as EX, GS, WM action-decision network) using "randomly selected" approach based on a chosen component.

Parameters:
actNum - the number of actions in that network.

selectAction

public int selectAction(double[] utilArr)
Selects one action from the action-decision network (such as EX, GS, WM action-decision network) using "boltzmann distribution based on utility" approach based on a chosen component.

Parameters:
utilArr - the array of utilities of action from the chosen component in that network.

selectAction

public int selectAction(int netIdx,
                        int knowledgeType,
                        double[] utilArr)
Selects one action from the action-decision network (such as EX, GS, WM action-decision network) using "boltzmann distribution based on utility" approach based on a chosen component.

Parameters:
netIdx - the network index.
knowledgeType - the chosen component in that network.
utilArr - the array of utilities of action from the chosen component in that network.