Skip to main content
. 2024 Nov 25;24(23):7514. doi: 10.3390/s24237514
Algorithm 2 Dynamic Learning Rate Adjustment Algorithm.
Require: Initial Q value, learning rate a decay coefficient for the moving average of squared gradients β, small constant λ
Ensure: Optimized Q value
1: Initialize Q-values randomly or with prior knowledge
2: Initialize E[∇Q2] to a small positive value
3: for each episode do
4:    for each step in the episode do
5:    Choose an action α using the combined ε-greedy and Boltzmann strategy
6:    Take action α observe the next state s′ and the reward r
7:    Calculate the TD error δ
8:    Update E[∇Q2] using the decay factor β
9:    Update Q-values using the RMSprop update rule
10:   Move to the next state s
11:    end for
12: end for
13: return Q-values