public class PredictionArray
extends java.lang.Object
This class will construct the prediction array from a given match set.
Constructor and Description |
---|
PredictionArray(Population pop)
Constructs the prediction array.
|
Modifier and Type | Method and Description |
---|---|
int |
chooseExploreAction()
It chooses a random action in the prediction array.
|
double |
get(int action)
Returns the value of that position in the prediction array
|
int |
getBestAction()
Returns the best action in the prediction array.
|
double |
getBestValue()
Returns the best action in the prediction array.
|
int |
howManyBestActions()
Returns the number of "best actions" in the prediction
array.
|
void |
print()
Prints the prediction array to the standard output.
|
public PredictionArray(Population pop)
Constructs the prediction array.
pop
- is the population for which the prediction array has to be created.public int getBestAction()
Returns the best action in the prediction array. If there are more than one "best action" it selects one randomly.
public double getBestValue()
Returns the best action in the prediction array.
public int howManyBestActions()
Returns the number of "best actions" in the prediction array. If there are more than one "best action",it implies that it cannot be classified (the system cannot decide, without a stochastic method ,the best action).
public int chooseExploreAction()
It chooses a random action in the prediction array.
public double get(int action)
Returns the value of that position in the prediction array
action
- is the action we want to know the value.public void print()
Prints the prediction array to the standard output.