public class RBFFeatures extends java.lang.Object implements DenseStateFeatures
DenseStateFeatures
object so that states are first converted
to a double array and then provided to RBF
objects that operate
directly on the feature vector of the state.Modifier and Type | Field and Description |
---|---|
protected java.util.Map<Action,java.lang.Integer> |
actionFeatureMultiplier
A map for returning a multiplier to the number of RBF state features for each action.
|
protected boolean |
hasOffset
Specifies whether an offset RBF unit with a constant response value is included in the feature set.
|
protected DenseStateFeatures |
inputFeatures
The input features over which RBFs will be generated
|
protected int |
nextActionMultiplier
The next action RBF size multiplier to use for the next newly seen action.
|
protected int |
nRbfs
The number of RBF units, not including an offset unit.
|
protected java.util.List<RBF> |
rbfs
The list of RBF units in this database
|
Constructor and Description |
---|
RBFFeatures(DenseStateFeatures inputFeatures,
boolean hasOffset)
Initializes with an empty list of RBF units.
|
Modifier and Type | Method and Description |
---|---|
void |
addRBF(RBF rbf)
Adds the specified RBF unit to the list of RBF units.
|
void |
addRBFs(java.util.List<RBF> rbfs)
Adds all of the specified RBF units to this object's list of RBF units.
|
RBFFeatures |
copy()
Returns a copy of this
DenseStateFeatures |
double[] |
features(State s)
Returns a feature vector represented as a double array for a given input state.
|
DenseLinearVFA |
generateVFA(double defaultWeightValue)
Creates and returns a linear VFA object over this RBF feature database.
|
protected DenseStateFeatures inputFeatures
protected java.util.List<RBF> rbfs
protected int nRbfs
protected boolean hasOffset
protected java.util.Map<Action,java.lang.Integer> actionFeatureMultiplier
protected int nextActionMultiplier
public RBFFeatures(DenseStateFeatures inputFeatures, boolean hasOffset)
inputFeatures
- the input features over which RBFs will be generatedhasOffset
- if true, an offset RBF unit with a constant response value is included in the feature set.public void addRBF(RBF rbf)
rbf
- the RBF unit to add.public void addRBFs(java.util.List<RBF> rbfs)
rbfs
- the RBF units to add.public double[] features(State s)
DenseStateFeatures
features
in interface DenseStateFeatures
s
- the input state to turn into a feature vector.public DenseLinearVFA generateVFA(double defaultWeightValue)
defaultWeightValue
- the default feature weight value to use for all featurespublic RBFFeatures copy()
DenseStateFeatures
DenseStateFeatures
copy
in interface DenseStateFeatures
DenseStateFeatures