## 4 Case Study  
The MATLAB/Simulink models and programs of the power system models in this study were developed in an Intel Core 8 Duo processor of a 2.4 GHz and 8 GB RAM computer with MATLAB version 9.1.0 (R2016b). The number of forests in the multi-grained scanning and the cascade of DFRL were set to 2 and 8 as default settings, respectively. The number of trees in each forest of DFRL was set to 500 as a default. A larger number for \(n_{\text{t}}\) means that more diachronic actions and states are recorded for the deep forest of DFRL and more calculation time. After extensive training, both the number of diachronic actions and states in this paper were set to 10, i.e., \(n_{\text{t}}=10\). The average calculation time of each iteration of DFRL is 0.423 s when the number for \(n_{\text{t}}\) is set to 10. Also, the prediction results with \(n_{\text{t}}=10\) are the same as the prediction results with \(n_{\text{t}}=30\), while the average calculation time of each iteration of DFRL is 1.862 s when this number \(n_{\text{t}}=30\). The dimensions of the raw features were double the value of \(n_{\text{t}}\), i.e., \(d=2n_{\text{t}}=20\). Sliding window sizes were set to \(\{\lfloor d/8\rfloor,\lfloor d/4\rfloor,\lfloor d/2\rfloor\}\), i.e., \(\{2,5,10\}\). The maximum depth of each tree growth was 100. Since the number of classifications of the next state \(n_{s}\) was set to three, three subsidiary reinforcement learning algorithms were employed for DFRL. The learning rate \(\alpha\) of these subsidiary reinforcement learning algorithms was set to 0.1 in this study; the value range of the learning rate should be \(\alpha\in(0,1)\); a small learning rate means a slow learning speed, and a small learning rate is suitable for application; a large learning rate means a high learning speed, while a large learning rate is suitable for offline training. Two different learning rates were configured for Q learning in [14], and a dynamic learning rate strategy was proposed by [PERSON] and [PERSON] [36]. The discounted rate of reward \(\gamma\) of these subsidiary reinforcement learning algorithms was set to 0.9 in this simulation. The value range of the discounted rate was set to \(\gamma\in(0,1]\). A larger discounted rate means greater importance of the Q-value history. The constant of the probability distribution \(\beta\) of these subsidiary reinforcement learning algorithms were set to 0.05. A large value of \(\beta\) means a high speed for updating the selection probability. The total states of these reinforcement learning algorithms (i.e., RL-I, RL-II, and RL-III) of DFRL cover from \(-\infty\) to \(\infty\) (Table 1). These state range of these reinforcement learning algorithms are divided for AGC, which is a special discrete control system (Table 1). The optimal control for an ideal discrete control system based on AGC is one in which \(\Delta P_{i}=-1\times e_{\text{ACE}}\). The number of actions in the action set of each subsidiary reinforcement learning algorithm of DFRL was set to 11 (Table 1), which is according to [3]; thus, the total number of actions in these three subsidiary reinforcement learning algorithms of DFRL was 33, or \(11\times 3\); meanwhile, the number of actions in the action set of conventional reinforcement learning was set to 33. Figure 6: Training data of reinforcement learning and deep forest reinforcement learning: (**a**) reinforcement learning; (**b**) deep forest reinforcement learning. Numerous conventional AGC algorithms are compared with the proposed algorithm for the preventive strategy for AGC in this paper, i.e., proportional-integral (PI), proportional-integral-differential (PID), sliding mode controller (SMC), active disturbance rejection control (ADRC), fractional-order PID (FOPID), fuzzy logic control (FLC), artificial neural network (ANN), Q learning, Q(\(\lambda\)) learning, and R(\(\lambda\)) learning.