InterleavedCountParameterSource<T>
Models & Types ยท AiDotNet.ReinforcementLearning.Parameters
A pair of per-arm integer counters exposed as one INTERLEAVED parameter vector:
[first[0], second[0], first[1], second[1], ...].
Implements: IParameterSource<T>
How It Works
Thompson sampling keeps a Beta posterior per arm as a success and a failure count, and its hand-written surface interleaved them rather than concatenating the two arrays. That ordering is its serialization order, so it is preserved exactly here โ concatenating instead would still produce a vector of the right LENGTH while silently renumbering every existing checkpoint.
The counters are integers. Values round-trip through T and are truncated
back to int on restore, matching the original code; a fractional value written into this surface
is floored, not rejected.
Constructors
| Constructor | Summary |
|---|---|
InterleavedCountParameterSource(Vector<int> first, Vector<int> second, int pairs) |
Creates a source over pairs (first, second) counter pairs. |
Properties
| Property | Summary |
|---|---|
long ParameterCount { get; } |
Methods
| Method | Summary |
|---|---|
Vector<T> GetParameters() |
|
void SetParameters(Vector<T> parameters) |