MatrixParameterSource<T>
Models & Types · AiDotNet.ReinforcementLearning.Parameters
Exposes a linear agent’s weight matrix as a parameter source, row-major.
Implements: IParameterSource<T>
How It Works
The four linear agents (LSPI, LSTD, LinearQLearning, LinearSARSA) keep their weights in a
Matrix, which the parameter generator cannot discover – it only recognises
tensors – so each hand-wrote its own flattening. Registering this instead puts them on the same
footing as every other component.
Constructors
| Constructor | Summary |
|---|---|
MatrixParameterSource(Func<Matrix<T>> accessor) |
Wraps whatever matrix accessor currently returns, so an agent that REPLACES its matrix rather than mutating it stays correctly described. |
Properties
| Property | Summary |
|---|---|
long ParameterCount { get; } |
Methods
| Method | Summary |
|---|---|
Vector<T> GetParameters() |
|
void SetParameters(Vector<T> parameters) |