Skip to content
StackDecode
AI & ML Atlas
Reinforcement LearningalgorithmInteractive simulation

Boltzmann Exploration

Chooses actions with probability proportional to exp(value / temperature).

The idea

Also called softmax exploration. Better actions are chosen more often, but even poor ones keep a chance in proportion to how bad they look, so it avoids wasting tries on clearly terrible options. A high temperature makes choices nearly uniform; a low temperature makes them nearly greedy.

π(a) = exp(Q(a)/τ) / Σ exp(Q(a′)/τ)

Watch it run

This is a real computation, not a drawing. Pause, step, change the settings, or try new random data.

total regret (reward lost by not always playing the best arm)pulled 0×arm 1pulled 0×arm 2pulled 0×arm 3pulled 1×arm 4pulled 0×arm 5
  • estimated value
  • true value (dashed)
  • arm just pulled

Pull 1: Choose randomly, but favour better-looking arms (temperature 0.2). Got reward 1.35.

pulls:
1
regret:
0
1/40

Bars are what the agent believes; dashed lines are the truth it is trying to discover.

Step by step

  1. 1Compute exp(Q(a)/τ) for each action.
  2. 2Divide by the sum to get probabilities.
  3. 3Sample an action from them.
  4. 4Update Q and lower the temperature τ over time.

Where it is used

Softer exploration than ε-greedy.

Watch out for

Sensitive to the scale of the Q values, so τ needs tuning.

Related