|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectclarion.system.StochasticSelector
public final class StochasticSelector
This class implements a stochastic selector within CLARION. This class is final and, therefore, cannot cannot be extended.
Usage:
This class is used to by the various subsystems of the CLARION Library to select an object from a collection of objects that implement the InterfaceStochasticallySelectable interface. It uses a soft-max Boltzmann distribution to choose the object based on the "final selection measure" of that stochastically selectable object.
Classes that currently instantiate a stochastic selector are:
This class contains both global (static) and local constants. The default is to use the local constants. If you want to change any of the global constants, you need to do so before any instances of this class are initialized.
Field Summary | |
---|---|
static double |
GLOBAL_TEMPERATURE
The temperature for Boltzmann selection. |
static double |
GLOBAL_THRESHOLD
The threshold for Boltzmann selection. |
double |
TEMPERATURE
The temperature for Boltzmann selection. |
double |
THRESHOLD
The threshold for Boltzmann selection. |
Constructor Summary | |
---|---|
StochasticSelector()
|
Method Summary | |
---|---|
double |
getBoltzmannProbability(java.util.Collection<? extends InterfaceStochasticallySelectable> s,
InterfaceStochasticallySelectable ss)
Gets the BoltzmannProbability of a specified stochastically selectable object given a collection of stochastically selectable objects. |
java.util.Collection<? extends InterfaceStochasticallySelectable> |
performBoltzmannDistribution(java.util.Collection<? extends InterfaceStochasticallySelectable> s)
This method calculates a Boltzmann distribution for a collection of stochastically selectable objects but does not go so far as to perform the actual selection. |
InterfaceStochasticallySelectable |
select(java.util.Collection<? extends InterfaceStochasticallySelectable> s)
Given a collection of stochastically selectable objects, this method chooses an object from that collection using a Boltzmann distribution. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static double GLOBAL_THRESHOLD
public double THRESHOLD
public static double GLOBAL_TEMPERATURE
public double TEMPERATURE
Constructor Detail |
---|
public StochasticSelector()
Method Detail |
---|
public InterfaceStochasticallySelectable select(java.util.Collection<? extends InterfaceStochasticallySelectable> s)
s
- The array of stochastically selectable objects from which to choose.
public java.util.Collection<? extends InterfaceStochasticallySelectable> performBoltzmannDistribution(java.util.Collection<? extends InterfaceStochasticallySelectable> s)
s
- The collection of stochastically selectable objects.
public double getBoltzmannProbability(java.util.Collection<? extends InterfaceStochasticallySelectable> s, InterfaceStochasticallySelectable ss) throws java.lang.IllegalArgumentException
s
- The collection of stochastically selectable objects.ss
- The object (within the collection) whose Boltzmann probability your wish to get.
java.lang.IllegalArgumentException
- If the specified stochastic object is not contained within the
specified collection.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |