Collaborative Maze Game Using EEG for Paralyzed Patients

The brain movement of a general paralysis patient is normal even if the nerve cells that connect the brain and muscles are damaged and the body movement is hindered. When these patients live alone and cannot perform daily activities, they lose the motivation to live, their brains become dull, and their self-esteem degrades. Therefore, a method should be developed such that these patients can perform brain exercises on their own. The development of a maze-finding game based on mutual cooperation using electroencephalography (EEG) for patients with general paralysis is described herein. Paralyzed Patient 1 can view an overview map and identify the path to a destination. When this is sent to Paralyzed Patient 2 through brain waves, direction indications appear on the screen viewed by Patient 2. Patient 2 verifies the signal conveyed by Patient 1 and controls the character in the perceived direction using brain wave signals. In this game, EGG data through the EPOC+ device of Emotiv Co. are collected, and the maze game implemented by the patient’s EEG signal can be played. Excitement and interest arise when two people collaborate compared with when they are playing games in solitude. This finding suggests that paralyzed patients can exercise their own brain without any assistance, enabling them to experience more enjoyment in life and improve their self-image compared with when they are collaborating and interacting with assistants.


Introduction
The number of people receiving medical treatment for physical paralysis has increased by 25% in five years. Paralysis is a generic term for motor symptoms and sensory symptoms caused by damage to the central and peripheral nerves and the nerve cells that connect the brain and muscles. Typical symptoms include walking disorders, abnormal sensation, and neuralgia caused by muscular weakness. In particular, the risk of stroke is increased and concussion is typical for people older than 60 y; as such, many cases of general paralysis have been reported [1,2]. When people are paralyzed, their daily lives become difficult, and they cannot participate economically and socially. Therefore, they cannot lead an independent life as they require physical assistance from others, such as family members and neighbors. In addition, they can develop various complications because they cannot use their bodies for a long time. From a psychological perspective, the brain becomes dull, which may results in degraded self-image and, in severe cases, depression. Rehabilitation therapy after paralysis involves learning how to live with a disability, and rehabilitation treatment should be performed based on understanding physical changes caused by neural damage. However, patients with general paralysis cannot move their bodies, and guardians must stimulate the patient's cranial nerves continuously by talking to them or playing music. This encourages the patient to think for themselves, exercise their brain to establish a positive self-image, and improve their quality of life. Human brain cells generate regular electronic shocks of a unique shape, known as brain waves. Electroencephalography (EEG) refers to a technique where electrodes are attached to the scalp to record voluntary electrical activities (brain waves). Brain waves recorded in EEG typically have a frequency of 1-20 Hz and are categorized into delta, theta, alpha, and beta waves depending on the frequency. Delta waves are the slowest, whereas beta waves are the fastest. Brain waves are recorded as a rhythmic activity in EEG; they generate different signals based on psychological conditions and are an important element that can measure brain activity. Furthermore, they are used to evaluate brain damage, epilepsy, and various diseases, or to diagnose brain death. One of the technologies using brain waves is the brain-computer interface (BCI).
The BCI is an interface that connects the human brain to a computer [3]. Through interactions between the brain and computer, it can determine brain activity by recording EEG from the brain; moreover, it can be controlled using one's own thoughts. The primary sectors utilizing BCI are healthcare, games and entertainment, telecommunications, national defense, aerospace, and home automation. The number of BCIs is estimated to increase at an annual average of 11.5% to reach $1.73 billion in 2022. BCI techniques can be classified into invasive and noninvasive. Non-invasive BCI is a field that has progressed and is developing rapidly, and it is constantly garnering significant attention. In this regard, research is being actively conducted to build a more comfortable living environment using EEG [4].
A study [5] has been conducted to stimulate and maintain a patient's interest in repetitive exercise during the rehabilitation treatment of stroke patients; however, the treatment involved was perceived as boring because of the lack of immediate biofeedback. Therefore, in this study, BCI and mechanical stimulation (e.g., a robot) were combined to provide beneficial exercise and motivate patients with real-time visual feedback.
Furthermore, a method to control a cursor in two dimensions using BCI has been proposed [6]. In this method, cursor movements on a computer screen are mapped from the user's brain to two-dimensional cursor controls based on EEG signals. The user can move the cursor up, down, left, and right by imagining the direction in which they intend to move. Additionally, a new approach for BCI has been presented [7], based on a steady-state visually evoked potential, and it can be used for people with impaired eye function. In that study, a visual stimulation system with LEDs was developed to provide blinking visual stimulation. Based on experiments involving several participants, it was demonstrated that the proposed system enabled users to express their binary intentions by the stimulus penetrating the eyelid without opening their eyes. A French startup, NextMind, presented a wearable headset that read people's thoughts at the world's largest IT and home appliance exhibition, "CES 2020," which was held in Las Vegas, USA. Users wearing a headset can change the color of light in front of them as well as TV channels using their thoughts. CNBC, an economic media, reported that the most fascinating innovation at CES 2020 was not autonomous cars or flying cars but wearable devices that read people's thoughts [8].
This paper describes the development of a maze-finding game based on mutual cooperation using EEG for patients with general paralysis. Figure 1 shows a conceptual diagram of the game. Paralyzed Patient 1 can view the entire maze map and identify the path to a destination. When this is sent to Paralyzed Patient 2 through brain waves, direction indications appear on the screen viewed by Patient 2. Patient 2 verifies the signal conveyed by Patient 1 and controls the character in the perceived direction using brain wave signals. This game collects EGG data through the EPOC+ device of Emotiv Co., and it can only be played using the patient's EEG signals. Therefore, two patients can play games through mutual cooperation and interaction, enabling them to experience more fun and exercise their own brain without assistance. Materials and Methods Figure 2 shows a system diagram for collecting EEG data using Emotiv's Epoc+ (hardware) and EmotivBCI (software), and controlling the game developed with Unity through Emotiv's Node-Red. When the user wears Epoc+ and no resistance exists between the head and the equipment, EmotivBCI recognizes the brain waves and learns the necessary data. After collecting the corresponding EEG signal, they are saved in the profile and the saved value is loaded from the Node-Red tool. Subsequently, the data loaded from Node-Red are matched to the desired keyboard. When the maze-finding game interface developed through Unity appears, the corresponding game is controlled with EEG signals. The results from the game are stored in the database.

. Hardware and Software
To collect EEG signals, we used the Epoc+ device of Emotiv Co. [ Figure 3]. The device is designed to study the human brain in a suitable scenario and contains 14 channels (AF3, F7, F3, FC5, T7, P7, O1, O2, P8, T8, FC6, F4, F8, and AF4) and two CMD/DRL references. The entire brain can be detected using 14 or 16 channels, and it is sampled sequentially at the speed of 128 SPS or 256 SPS. It uses a 2.4-GHz wireless connection via Bluetooth; therefore, a direct connection to a computer is not required. Once fully charged, it can be used for up to 6 h [9].

Figure 3. Emotiv Epoc+
EmotivBCI is a BCI software designed for Epoc+ headsets. The number of channels to use, sampling speed for the EEG signal, and sampling rate for the motion sensor can be set by connecting Epoc+ to EmotivBCI. When connecting the equipment, the process for reducing the resistance between the equipment and the head can be verified. In addition, after creating a profile, it can be verified to train various brain wave commands and real-time performance indicators. Additionally, facial expressions, motion sensors, and data streams from the headset can be verified [10].

Learning
Resistance is created between the head and equipment when the equipment is worn, rendering it difficult to verify and collect data. Accordingly, after the equipment is worn, all 14 channels should show a green light each [ Figure 4], signifying a no-resistance state. Subsequently, learning proceeds.

Figure 4. Comparison of Impedance
The commands required to control the maze-finding game in this study are in four directions: forward, backward, left, and right. To control the direction through EEG, these four directions must be learned. First, a profile is created to store the training data. Subsequently, an instruction is selected for learning among several commands. In this study, PUSH, PULL, LEFT, and RIGHT were selected for use in four directions. Once one command is selected, the corresponding EEG signal must be collected. As shown in Figure 5, the command player intends to provide an input while looking at the cube shown on the screen. When the player thinks of a command, a corresponding EEG signal appears, and the accuracy of learning is shown in a numerical form, unlike previous learning. A number greater than 75 indicates that accurate learning has been achieved; subsequently, the EEG signal is stored in the corresponding command. After repeating these actions as many times as necessary, the success of the learning can be determined through the live mode [ Figure 6]. Based on performance metrics, the six states (stress, engagement, interest, excitement, focus, and relaxation) described in Table 1 can be evaluated while the current user is learning. Interest (In) is the degree of attraction or aversion to the current stimuli, environment or activity and is commonly referred to as Valence Excitement Excitement (EX) is an awareness or feeling of physiological arousal with a positive value Focus Focus (FO) is a measure of fixed attention to one specific task Relaxation Relaxation (Re) is a measure of an ability to switch off and recover from intense concentration

EEG Signal Control
For the learned brainwave signal to control the game, the signal corresponding to each command and the keyboard must be matched, and the Node-Red tool was used for this purpose. First, node-red-contrib-emotiv-bci was installed through the console window. Next, whether the EmotivBCI node has been created through the interface was checked, and the sendkey node to set keys in the Node-Red interface was installed. The profile to be used and the learned data node were linked together, and the key value to be matched with sendkey was set [ Figure 7].

Developing a Maze-Finding Game
The maze game was developed to enable multiple players use the Unity game engine. Assets and objects were used to implement a three-dimensional maze and developed using the C# language for the overall control of the maze game. A mirror asset is used to implement a multiplayer. The mirror asset is connected by setting an object in a format in which multiple clients are attached to one host. The game comprises three levels of difficulty: high, medium, and low; therefore, each map has a different complexity. The map screen should be viewed in the third-person perspective for Paralyzed Patient 1, and in the first-person view for Paralyzed Patient 2 [ Figure 8]. Patient 1 verifies the path for the maze and the location of the current character and then sends the direction to move using the learned EEG signal. This signal appears as an arrow on the screen and is viewed by Patient 2. Paralyzed Patient 2 confirms the direction indicated by Paralyzed Patient 1 and then plays the game by controlling the character. When the game is completed, the record is measured while the game is in progress to indicate the ranking, and the measured record and end time are stored in the database. Subsequently, the ranking is compared with those of other play records.

Results and Discussion
A total of 10 pairs of teams participated in this game. First, one player from each team played the game to measure the standard duration of playing the maze game by oneself, and the average result was 2 min and 42 s. When the performance metrics were verified, it was confirmed that the excitement (Ex, 7) was remarkably low and the focus (Fo, 40) was high [ Figure 9].

Figure 9. Performance metrics when game was played alone
When two players were playing the game together, the average game speed was 1 min and 46 s. Additionally, based on the analysis of the performance metrics, it was discovered that the excitement (Ex, 20) value was high and the focus (Fo, 26) value was low [ Figure 10].

Figure 10. Performance metrics when two players were playing
Similarly, the result shows that playing the game as a pair yielded good results and was more fun and interesting than when playing it alone. In addition, when comparing the accuracy according to the degree of data learning, when learning was less, there were cases in which the user was informed of the wrong direction, i.e., the direction differed from that to be informed or it was not the direction that the user intended to proceed. Even though it was confirmed that a problem occurred during the game in this process, this error lessened gradually and the user could proceed in the intended direction without error as data learning progressed.

Conclusions
The development of a maze game in which two paralyzed patients can cooperate with each other through interactions using EEG signals was described herein. Emotiv's Epoc+ and EmotivBCI were used to collect EEG data, and the EEG signal was matched using a keyboard through Node-Red. The maze game was implemented using the Unity game engine and C#. The experimental results were obtained slightly faster when two people were playing together than when the game was played by one person. When additional data learning was performed, more accurate values could be exchanged. Through this game, patients are expected to perform cranial nerve exercises on their own without any assistance, which may help them improve their self-image through cooperation with another patient.