## 3 State of the Art
### Enhancing EEG in Collaborative Robot Control with Reinforcement Learning  
Expanding further on the previous findings, the study [41] explores the application of reinforcement learning algorithms in robotics, specifically in the context of robots learning to solve tasks based on reward signals obtained during task execution. In many other research, these reward signals are either modeled by programmers or provided through human supervision. However, there are situations where encoding these rewards can be challenging, resulting in the suggestion of using EEG-based brain activity as reward signals. The core idea of this proposed article is to extract rewards from brain activity while observing a robot performing a task, this eliminates the need for an explicit reward model. The paper introduces a new idea for using brain activity signals through EEG sensors to provide correctness feedback to a collaborative robot about an specific task. This demonstrates the ability to identify and classify different error levels based on the brain signals [41]. Brain-computer interfaces (BCI) [42] in robotics have been identified as a hot topic [19]. EEG is highlighted as the recording method of choice due to its portability and high temporal resolution. The research also remarks the use of event-related potentials (ERPs) [43] in error detection and shows how these ERPs may be automatically categorized using machine learning and signal processing methods. The study also offers a reinforcement learning framework for learning tasks based on reward signals obtained from monitored brain activity. Q-learning [44] is a reinforcement learning method that uses a Q-function to optimize sequential decision-making and was the algorithm of choice to demonstrate learning in real-time tasks in collaborative robotics scenarios. The results of the research suggest that EEG-based reward signals hold great potential in robot learning and task adaptation. However, the study was carried out in 2010, which is why several lines of improvement for future research are presented in the article. Following the line of research presented where robots learn to adapt their behavior based on error signals generated by brain waves measured by EEG sensors, there is an investigation carried out in 2021 [45] that improves the previous one by proposing an approach in which a robot arm is trained to play a game and then uses the learning to teach different children. The training process involves automatic detection of rewards and penalties based on EEG signals, probability-based action planning, and imitation of human actions for training children. In this research a specific reinforcement learning scheme is presented. In the case of the research carried out to teach the robot, the planning is not done as in traditional RL. Normally in reinforcement learning, actions are planned based on a partial learning of the environment, which means that agents make decisions based on the partial knowledge they have acquired so far in the environment. In the case of the proposed research, action planning takes place after the RL algorithm has converged (convergence happens when the RL algorithm has reached a state of knowledge where it has learned enough about the environment and the actions).This approach can be very beneficial in situations where fast and accurate decisions are required, one of those could be what the article is describing: the use of RL for training a robot to play a specific game [45]. Regarding the learning approach based on error signals and continuing with the review proposed above, it is necessary to highlight that the error potential-related events (ErrP) [46] signals represent the subjective errors when a subject observes an error either in a robot or even in itself [47]. In the proposed learning case, if no error is detected, a small positive reward will be given, however, if an error is detected, a negative reward will be applied. The rewards will be used to update a table of probabilities that consider states and actions.