## 2 System-Level Design
### Experimental Set-Up  
The general outline of the experimental configuration is shown in Figure 2. A dry sensor interface-24 (DSI-24) EEG headset is used to capture brainwave activities through 24 electrodes positioned on the subject's scalp. The subject participates in a video gaming environment, where they are exposed to both visual and auditory stimuli. Their interaction with this environment is enabled through the use of a gaming controller or a car simulator driving wheel, which allows for active engagement in the video games.  
While the subject is deeply engaged in the game, the DSI-24 EEG headset continuously records the brain's electrical activity. The captured raw EEG data are subsequently transformed into a two-dimensional brain heatmap. This heatmap offers a visual depiction of the brain's electrical dynamics, effectively illustrating the variations in activity across different regions of the brain in a clear, easily interpretable format. This representation, known as brain topology, provides crucial insights into the spatial distribution and connectivity of brain activity. In this work, the EEG device adheres to the internationally recognized 10-20 system for electrode placement on the scalp. This system delineates specific regions for electrode placement with the following labels: Fp (frontopolar), F (frontal), C (central), P (parietal), O (occipital), T (temporal), and A (auricular, near the ear). Odd-numbered electrodes are positioned on the left side of the scalp, while even-numbered electrodes are located on the right side [29]. The DSI-24 Dry EEG device, featuring 24 channels, is employed, including 21 sensor electrodes at positions Fp1, Fp2, Fz, F3, F4, F7, F8, Cz, C3, C4, T7/T3, T8/T4, Pz, P3, P4, P7/T5, P8/T6, O1, O2, A1, and A2, with an additional Fp2 electrode serving as the ground. The electrode placement of the DSI-24 ensures standardized and reproducible measurements of brain activity, as illustrated in Figure 3. Figure 4 shows one of the sensor electrodes of the DSI-24 device, which has a diameter of around 2.5 cm for the outer circle of black pins and a diameter of around 1.5 cm for the inner circle of gray pins. Overall, the electrodes are distributed on the device to fit a wide range of head sizes: from 54 to 62 cm circumference for adults (available: [[https://wearablesensing.com/wp-c](https://wearablesensing.com/wp-c)]([https://wearablesensing.com/wp-c](https://wearablesensing.com/wp-c)) ontent/uploads/2021/12/Wearable-Sensing-DSI-24-Specification-Sheet_s.pdf, accessed on 17 July 2024).  
Figure 3: The 10-20 electrode placement system with the DSI-24 electrodes highlighted.  
Figure 2: Experimental setup for EEG-based cognitive stress monitoring in video gaming environments.  
Subsequently, a Support Vector Machine (SVM) classifier [30] is utilized to analyze the EEG heatmap data. This classifier is specifically designed to determine the subject's cognitive stress level during the gaming experience. Employing sophisticated algorithms, the classifier categorizes stress levels, quantifying the cognitive load experienced by the subject. Concurrently, a large language model (LLM)-enabled Furhat Robot is integrated into the experimental setup. The specific LLM utilized in this work is the Generative Pre-trained Transformer (GPT), known for its advanced natural language processing and generation capabilities. This robot plays a crucial role in guiding the subject through the data acquisition protocol, and also in providing real-time feedback. Based on the machine learning model's classification outcomes, the Furhat Robot interacts with the subject. It is programmed to issue alerts regarding elevated cognitive stress levels, thus offering immediate monitoring and potential intervention.