## 3 Methods
### Facial Expression Recognition
These participants exhibited a 16.7% improvement in concentration and a 27.3% increase in emotional engagement. Visual cues were especially impactful during memory tasks (emotional gain of 35%), while structured textual and visual prompts proved most beneficial in social interaction tasks. In terms of objective performance, ADHD participants demonstrated consistent gains across all game types, particularly in social interaction games, with improvements of up to 62%. ASD participants also improved, especially in social tasks where visual feedback and dynamic guidance helped maintain focus and reduce disengagement. Overall, BIFL adaptation led to a 22.4% increase in concentration, a 24.8% boost in emotional engagement, and an average 32.1% improvement in game scores, validating the effectiveness of real-time, personalized feedback mechanisms for enhancing cognitive and emotional outcomes. \begin{table}
\begin{tabular}{c c c c c c c c} \hline \hline
**Time (s)** & **Group** & **EEG State** & **Emotion** & **Game Score** & **Eng. Score** & **Change** & **Stimulus** \\ \hline
0 & ASD & Concentrated & Neutral & Medium & 4.3 & - & None \\
0 & ADHD & Neutral & Neutral & Medium & 4.0 & - & None \\
10 & ASD & Concentrated & Happy & High & 4.7 & - & None \\
10 & ADHD & Relaxed & Neutral & Low & 3.1 & EEG/Game drop & T * \\
20 & ASD & Concentration (\(-15\%\)) & Neutral & Low & 3.3 & EEG/Game drop & V * \\
20 & ADHD & Neutral & Sad & Low & 2.7 & Negative emotion & V * \\
30 & ASD & Neutral & Angry & Low & 2.9 & Negative emotion & A * \\
30 & ADHD & Concentrated & Neutral & Medium & 3.8 & Improved & None \\
40 & ASD & Relaxed & Neutral & Medium & 3.2 & EEG drop & T * \\
40 & ADHD & Concentrated & Happy & High & 4.8 & Improved & None \\
50 & ASD & Concentrated & Neutral & Medium & 4.3 & Improved & None \\
50 & ADHD & Concentrated & Happy & High & 4.6 & Stable & None \\ \hline \hline \end{tabular}

* A = Auditory stimulus (e.g., verbal hints, feedback); T = Textual stimulus (e.g., written hints); V = Visual stimulus (e.g., color cues).

\end{table} 
Table 1: Cognitive and emotional states and engagement scores for children with ADHD and ASD. We investigated which type of stimulus most effectively improved engagement within each population. As shown in Figure 11, visual stimuli produced the highest engagement success in the ASD group (50%), consistent with the literature, suggesting improved visual processing in ASD children. In contrast, ADHD children responded more positively to auditory stimuli (45%), possibly due to their greater sensitivity to auditory cues. These results reveal the following:

* ADHD children responded best to auditory stimuli, likely due to their increased auditory attention and responsiveness to external cues. * ASD children achieved higher engagement with visual stimuli, supporting the literature that visual processing is often stronger in individuals with ASD. * BIFL effectively learned to adapt to individual responses, optimizing the mix of modality and stimulus timing through dynamic weighting. Figure 11: Stimulus engagement success rates for ADHD and ASD. Visual stimuli proved most effective for ASD children, while auditory stimuli were most impactful for ADHD children. Figure 10: Overall results of BIFL-based adaptation for 40 children. Improvement in concentration, emotional response, and game performance for ADHD and ASD groups across memory, reasoning, and social interaction tasks. ### Engagement Scores Analysis

Figure 12 presents the average normalized modality weights over time, aggregated across 40 neurodivergent children during three different types of games, each with a 3 min duration. The results indicate that the game score achieved by the children during the gameplay maintained the highest weight throughout most of the session, closely followed by the EEG concentration, with a maximum difference typically under 0.1.