public class PredictionArray
extends java.lang.Object
Prediction array. This class builds the prediction array from the match set
Constructor and Description |
---|
PredictionArray(Population pop)
This function builds the prediction arry
|
Modifier and Type | Method and Description |
---|---|
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)
This function builds the prediction arry
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 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.