# Artificial Intelligence in Adaptive and Intelligent Educational System: A Review
## 3 Reinforcement Learning in Adaptive and Intelligent Educational System (RLATES)
### Applied Reinforcement Learning in RLATES  
Based on the introduction to reinforcement learning in Section 3, it can be seen that reinforcement learning comprises five main components. In order to apply reinforcement learning to RLATES, it is essential to ensure that the components of the system correspond to each of the five components of reinforcement learning algorithms. Therefore, in this section, the application of reinforcement learning to RLATES is introduced.  
First, the following descriptions are given of how the components of RLATES correspond to those of the reinforcement learning algorithm [10]:  
1. Agent: In RLATES, the agent refers to the student. The learning system is used through the student interacting with the system for subsequent processes; therefore, the student corresponds to the agent in the reinforcement learning algorithm.
2. Environment: In a broad sense, the environment is the entire knowledge structure of the system, and it collects information on the characteristics of the students and tests their knowledge through exams and quizzes distributed throughout the knowledge modules.
3. Action: Actions are the selections that an agent needs to take at each step, so in RLATES, the actions correspond to the knowledge modules, each of which represents an action.
4. State: In reinforcement learning algorithms, the state refers to the state that the environment returns to when the agent performs an action. Therefore, in RLATES, the state corresponds to the student's learning state, i.e., how the student mastered the knowledge. Here, a vector is used to store the data, and all state values are in the range of 0-1. For a student, if the knowledge has been fully mastered and correctly understood, the state value is set at 1. If the knowledge has not been mastered by the student, then the state value is set at 0.
5. Reward: For reinforcement learning algorithms, each selection returns a different reward value, and similarly, in RLATES, each knowledge module corresponds to a different reward according to the significance. Moreover, in RLATES, the intention is to maximize the cumulative value of this reward.  
Next, the application of the reinforcement learning algorithm to RLATES is described in Algorithm 1. Coupling the components in RLATES to the elements in the reinforcement learning algorithm yields the following process [10,11]:  
```
Initialize Q (\(s\), \(a\)) for \(s\in S\) and \(a\in A\) Test the current situation of student's knowledge \(s\) Loop for each episode. Pick a knowledge module \(a\), show this module to the student, by using the \(\varepsilon\)-greedy policy Get the reward \(r\), while the RLATES goal is achieved, a positive \(r\) will be obtained, else a null \(r\) will be obtained. Test the current situation of student's knowledge \(s^{\prime}\) Update \(Q\) (\(s\), \(a\)): \(Q(s,a)\gets Q(s,a)+a\Big{[}R+\gamma\underset{a}{max}Q(s^{\prime},a)-Q(s,a) \Big{]}\) s \(\leftarrow\) s' until \(s\) reaches the goal state
```  
**Algorithm 1** Apply reinforcement learning algorithm to RLATES