Abstract
As Brain-Computer Interfaces (BCIs) evolve from clinical tools to immersive Human-Computer Interaction modalities, the field is shifting from discrete commands toward continuous mental state decoding. This study investigates the feasibility of utilizing continuous EEG fluctuations to control a physics-based simulation governed by stability constraints. We developed "Tightrope Balance," a real-time bio-feedback application driven by a custom Convolutional Transformer Network (CTNet). Trained on a 35-subject dataset to differentiate "Focus" and "Relax" states, the model operates within a decoupled Client-Server architecture supporting both laboratory-grade (BIOPAC) and consumer-grade (BrainLink) hardware. The system maps inference outputs to rotational torque vectors in a Pygame physics engine, creating a continuous control loop, while repurposing ocular artifacts as discrete jump triggers. Rigorous Leave-One-Subject-Out (LOSO) cross-validation yielded a mean accuracy of 71.3%, significantly surpassing the 55.1% baseline and confirming robust subject-independent generalization. In real-time deployment, the system successfully established a responsive bio-feedback loop, allowing users to actively modulate avatar equilibrium. While the custom classifier demonstrated exceptional stability on high-fidelity hardware, cross-platform deployment to wearable devices revealed expected performance trade-offs due to domain shift, though functional control was maintained. Ultimately, this project validates the efficacy of hybrid deep learning architectures in decoding non-stationary EEG signals for continuous control tasks, offering an intuitive, gamified interface for users to master cognitive stability.
Project Components
This project consists of three main components
Classifier
A Convolutional Transformer Network (CTNet) for EEG signal classification, capable of distinguishing between "Focus" and "Relax" states, providing real-time cognitive state decoding for game control.
Balance Game
A physics-based balance game developed with Pygame, mapping classifier outputs to rotational torque vectors, enabling continuous brain-computer interface control loops.
Server Client + BrainLink
A decoupled client-server architecture supporting both laboratory-grade (BIOPAC) and consumer-grade (BrainLink) hardware, enabling cross-platform EEG signal acquisition and processing.
Menu page of the game.
During the game, the wind will blow the user, and the user can control to avoid the wind.
The user can jump to avoid the birds.