BoltzmannExploration<T>

Models & Types · AiDotNet.ReinforcementLearning.Policies.Exploration

Boltzmann (softmax) exploration with temperature-based action selection. Uses temperature parameter to control exploration: higher temperature = more random. Action probability: P(a) = exp(Q(a)/τ) / Σ exp(Q(a’)/τ)

Inheritance: ExplorationStrategyBase<T> → BoltzmannExploration<T>

Example

var random = new Random(42);
var state = new Vector<double>(new double[] { 0.1, -0.4, 0.7, 0.2 });
// Create Boltzmann exploration with temperature decay
var exploration = new BoltzmannExploration<double>(temperatureStart: 1.0, temperatureEnd: 0.01, temperatureDecay: 0.995);
            
// Get an exploration action weighted by Q-value estimates
var policyAction = new Vector<double>(new double[] { 1.5, 0.8, 2.3 });
var action = exploration.GetExplorationAction(state, policyAction, actionSpaceSize: 3, random);

Constructors

Constructor Summary
BoltzmannExploration(double temperatureStart, double temperatureEnd, double temperatureDecay) Initializes a new instance of the Boltzmann exploration strategy.

Properties

Property Summary
double CurrentTemperature { get; } Gets the current temperature value.

Methods

Method Summary
Vector<T> GetExplorationAction(Vector<T> state, Vector<T> policyAction, int actionSpaceSize, Random random) Applies Boltzmann (softmax) exploration to select an action.
void Reset() Resets the temperature to its initial value.
void Update() Updates the temperature using exponential decay.