Deep Learning on Game Addiction Detection Based on Electroencephalogram

− Playing games for too long can be addictive. Based on a recent study by Brand et al, adolescents are considered more vulnerable than adults to game addiction. The activity of playing games produces a wave in the brain, namely beta waves where the person is in a focused state. Brain wave activity can be measured and captured using an Electroencephalogram (EEG). Recording brain wave activity naturally requires a prominent and constant brain activity such as when concentrating while playing a game. This study aims to detect game addiction in late adolescence by applying Convolutional Neural Network (CNN). Recording of brain waves was carried out three times for each respondent with a stimulus to play three different games, namely games included in the easy, medium, and hard categories with a consecutive taking time of 10 minutes, 15 minutes, and 30 minutes. Data acquisition results are feature extraction using Fast Fourier Transform to get the average signal for each respondent. Based on the research conducted, obtained an accuracy of 86% with a loss of 0.2771 where the smaller the loss value, the better the CNN model built. The test results on the model produce an overall accuracy of 88% with misclassification in 1 data. The CNN model built is good enough for the detection of game addiction in late adolescence.


INTRODUCTION
Countless technological products seem to never stop being produced, produced continuously by the unceasing development of science and technology every year. One of the technology products that are popular all the time and popular among teenagers is video games. Since their appearance, video games have become popular and easy to access. Various platforms can play video games and access them via the internet, such as personal computers (PCs), game consoles, and smartphones [1]. The average for a child to play games in 2009 was 1 hour 13 minutes in the United States which, when compared with the past 10 years, the average has tripled [2]. In children who are just in their teens, almost a third of them play games every day, 7% of them use their time to play games for at least 30 hours a week. There are many long-term impacts of activities carried out to play games by spending more than 30 hours of free time per week, such as the development of the educational, health, and social aspects of adolescents [3]. Game addiction has similar behavior and effect to other addictions (e.g. gambling addiction) [4]. Teenagers are considered more vulnerable than adults to game addiction [5]. In 2013, game addiction is in a different category from mental disorders. Then in 2018, the World Health Organization (WHO) stated that game addiction is a mental disorder then it was entered into the International Classification of Diseases (ICD-11) [6]. Game addiction has negative impacts such as low life satisfaction, depression, and low self-esteem [7]. Several studies have shown associations between game addiction and anxiety [8], and depression [9,10]. In 2010, Lin et al. conducted a study to determine the level of involvement of video games on brain waves for one hour. The research subjects totaled 12 people and were divided into two groups based on differences in the level of involvement in playing video games. There was no significant change in the alpha and beta signals in the four lobes after being given a stimulus to play video games for one hour, the reason was that it lay in the variable playing time, namely one hour was considered too short [11]. There are advantages and disadvantages to video games for a person. People who play video games have several significant advantages such as memory, high concentration, and problem-solving skills. When the brain does not get enough rest due to playing video games for a long time, it will cause emotional disturbances in the person and most of them will experience stress [12]. The brain has several waves, one of which is beta waves with a frequency between 14-100 Hz, in which beta waves are a fully conscious or awake state. When a person is in this wave, the left brain is actively used to think, focus, play games, etc. Brain activity can be measured through an invasive method using an electrocorticogram (EKoG) and non-invasively using an electroencephalogram (EEG). EEG is known as a procedure to measure the electrical signals from the scalp that are generated by monitoring the activity of neurons in the brain [13].
EEG is a method for conducting brain research that provides information about brain functions related to human activities [14]. The shape of the EEG signal is different for each person and is strongly influenced by various variables such as emotional state, mental state, age, activity, and health. These variables have been classified in several studies such as vigilance [15,16], emotional states [16,17], autism [18,19], and sleep states [20,21,22].
Recent research has applied Deep Learning (DL) to classify EEG signals. In Zhou et al. to detect differentiated ictal, preictal, and interictal epileptic seizures using raw EEG signals as CNN input. The time and frequency domain signal performance was compared for the detection of epileptic signals based on the Freiburg intractanial database and the CHB-MIT scalp to explore the potential of its parameters. Three types of experiments were conducted to explore the feasibility of the method used. Frequency domain signals obtained an average accuracy of 96.7, 95.4, and 92.3% for three trials in Freiburg databases, and detection accuracy in the CHB-MIT database was 95.6, 97.5, and 93%. When using time-domain signal, the average accuracy of the three experiments is 91.1, 83.8, and 85.1%, while the CHB-MIT database has an average accuracy of 59.5, 62.3, and 47.9%. Based on the experiment, the detected frequency domain signal is more effective and more potential than the time domain signal [24]. In other studies Ghosh et al. EEG signals are measured simultaneously with facial expressions to understand how Android games change the emotions of gamers. EEG signals are processed using General Type-2 Fuzzy Reasoning (GT2FS) and 3D-CNN is used to classify facial expressions. The proposed method yields significant results compared to the current literature, validated statistically by the Friedman statistical test with an accuracy rate of 95% [25]. Research conducted by Kamaruddin et al. detects porn addiction using a machine learning approach based on EEG signals. Three different classifiers used which the three will be compared, such as Multi-Layer Perceptron (MLP), Naive Bayesian, and Random Forest. The experimental results show that the MLP slightly better accuracy quality than Naive Bayesian and Random Forest [26]. Zeng et al. predict the mental state of the driver by proposing deep convolutional neural networks and deep residual learning methods based on EEG signals. Two EEG mental states models were developed. The experimental result shows that both models yield very good classification performance for mental state prediction [27].
This study aims to classify EEG signals using the CNN for the detection of game addiction in late adolescence. Feature extraction is carried out on the EEG signal using Fast Fourier Transform to get the average signal, which will be used as input for the CNN model. Some CNN models are trained to get good output.

METHODS
This research begins with brain wave signal data acquisition, feature extraction, labeling. Data acquisition refers to the process of recording brain wave signals using EEG tools, feature extraction using FFT, and labeling based on the results of questionnaires filled out by respondents. Fig. 1 shows the steps of the research carried out.

Data Acquisition
In this study, data acquisition was carried out to obtain brain wave signal data for each research object. Brain wave signal data is taken using an EEG device, namely Neurosky Mindwave Mobile 2 with the Fp1 electrode position, namely on the forehead. Data acquisition was carried out on someone aged 13-20 years, with the stimulus of three different games, namely games included in the easy, medium, and hard categories for 10 minutes, 15 minutes, and 30 minutes. Fig. 2 shows the data acquisition process.

Figure 2. Data Acquisition
In Fig. 2 the data acquisition step, the first step is respondents were paired with an EEG device on the head with the Fp1 electrode sensor on the forehead. In the first stage, respondents were given instructions to play easy level games around 10 minutes. Brain waves were recorded while respondents were playing games. Respondents were given a pause of about 3 minutes to fill out the first questionnaire. Respondents were given instructions to play medium level games around 15 minutes. Brain waves were recorded while respondents were playing games for the second time. Respondents were given a pause of about 3 minutes to fill out the second questionnaire. The last stage, respondents were given instructions to play hard level games around 30 minutes and brain waves were recorded while respondents were playing the games. Respondents were given a pause of about 3 minutes to fill out the last questionnaire. Obtained data recording brain waves as much as 3 data recordings per respondent, which in this study obtained a total of 40 respondents.

Fast Fourier Transform
Fast Fourier Transform (FFT) is the source of an algorithm for calculating the fast, efficient, and inverse discrete fourier transform. Previous research used FFT for feature extraction for EEG Signal Post-Stroke detection [28]. FFT in signal processing includes period and frequency: a. Frequency is the number of vibrations that occur within one second or the number of waves/vibrations produced per second. b. A period is the length of time required for a complete vibration of a wave. The relationship between frequency and period is an inverse ratio, if the frequency is greater, the period will be smaller.
After obtaining brain wave signal data at the data acquisition stage, feature extraction is carried out using FFT to convert the signal data from the time domain to the frequency domain. On Fig. 3(a) the data form of the brain wave in time domain is shown and then converted to frequency domain, (b) the data after being converted to the frequency domain and each peak min & max signal. The results of data acquisition obtained data of respondents as much as 40 data, where each data has 3 data recording brain wave signals. The data is then performed feature extraction using FFT to convert the signal data with the time domain into the frequency domain as shown in Fig. 3. After getting the maximum peak and the minimum peak of the signal, then data normalization is performed. In the data normalization stage, the maximum and minimum peaks are determined by the minimum and maximum averages, then subtracted. Furthermore, the minimum peak and peak maximum are reduced by the minimum average and divided by the results of the reduction of the previous drink and maximum. Then the final result is searched for the average.

Labeling
To date, the only available means of detecting game addiction is through a questionnaire. Labeling is done by measuring the level of addiction of respondents using the Game Addiction Inventory for Adults (GAIA) instrument made by Wong and Hodgins, which consists of 23 items using a Likert scale [29].

Convolutional Neural Network
Neural network with multiple layers, including multiple pairs of a convolution layer, as well as a fully connected output layer known as CNN [30]. There are three types of CNNs, one of wich is 1D-CNN. 1D-CNN is usually used for time-series, and audio signals [31]. Several studies use 1D-CNN for classification of motor imagery in BCI [32], human biometric identification [33], seizure detection [34], learning and resting states [35], post-stroke detection [28]. The 1D-CNN procedure can be seen in Algorithm 1. For each iteration Do: 3 Train data processed records 4 Compare actual and predicted values 5 Calculate loss function The first convolution layer uses 32 feature detectors or filters, and the kernel size is 5, then uses ReLU activation. The first and second pooling processes use the same max-pooling size, namely 2. The second convolution layer uses 64 feature detectors or filters, and the kernel size is 5, then uses ReLU activation. Next is flatten/flattening to convert the previous output layer into a 1D array. After the flattening process, there is a dense (fully connected) layer followed by a drop-out layer which is useful for overfitting. After that, get the final fully connected layer where there are outputs from several classified classes. The softmax activation function is used to classify classes that are more than two, wherein this study there are four classes.

Figure 5. CNN Models
The CNN model in Fig. 5 shows that in the first layer the convolutional layer produces output shapes 6, 16 and produces 96 parameters. The parameter in the first convolutional layer, 96 comes from ((5x1)+1)x16 = 96, the number 5 comes from the kernel size and the number The first 1 comes from the number of categories in the initial dimension and the second 1 is the unit of bias that must exist in a calculation, then 16 is the number of filters. The first max pooling with a dimension size of 3 is obtained from the division between the dimensions in the first convolutional layer (6) and the max-pooling size used is 2 and produces a dimension with a size of 3.
Using the same calculation in the second convolutional layer, the parameter 2592 is obtained, this value is obtained from ((5x16)+1)x32 = 2592. The second max pooling with dimension size of 1 is obtained from the division between the dimensions in the second convolutional layer (3) with the max-pooling size (2). The number 32 flatten is obtained from the multiplication of the previous dimensions, namely 1 x32 = 32, then the first dense is sure that 512 is a number that shows the number of neurons that will be used. Parameter 16896 is obtained from (32x512)+512 = 16896. So that the number of parameters obtained from the model made is 21.636.

Data Collection Results
In this study, the data collected were 40 respondents at the stage of brain wave signal data acquisition with a total of 3 raw data recording brain wave signals for each respondent because the recording of brain wave signals was carried out 3 times.

Feature Extraction
The raw data of the brain wave signal recording of each respondent was extracted using FFT using the Matlab application to convert the signal from the time domain to the frequency domain and get the maximum and minimum peak of the brain wave signal to calculate the average. An example of converting a time domain signal to a frequency domain signal has been shown in the methods section.
Then the results of the feature extraction are stored in an .xlsx file to calculate the average brain wave signal of each respondent. The min peak and max peak data obtained for each respondent are 3 min peak data and 3 max peak data. The minimum and maximum average are calculated respectively and then subtracted. Then normalization of the data between 1 and 0 by means of the minimum average data is reduced by the data of each peak then divided by the count data. Then the normalized data is calculated on the average. The signal is cut based on the normalized data and then the average is calculated from the cutting results, then the final extraction data is obtained which will be used as a dataset.

Labeling
Labeling of each respondent uses a questionnaire with 23 items that have been filled in by the respondent based on predetermined intervals. In the early stages after recording brain wave signals, respondents were given a pause of about 3 minutes to fill out the questionnaire. Then after the data obtained from filling out the questionnaire, it can be determined which respondents belong to which category. The preprocessed data consists of 4 classes (note, low, medium, high) and will be used as a dataset for training the CNN model to be built. The data is divided into training data and test data with a ratio of 80:20, into 32 training data and 8 test data. The CNN model in this study uses 2 convolution layers and 2 pooling layer processes in which each convolution uses ReLU activation.
From the training model process, the accuracy is 86% with a loss of 0.2771 where the smaller the loss value, the better the results. It can be seen in Figure 6(a) is an accuracy graph during the model training process, while 6(b) is a loss graph during the model training process. Then testing the model that has been built using the 8 previous testing data. In the process of testing the model, all data testing 7 data is classified as correct and 1 data is classified as incorrect.

Figure 7. Testing Results
Can be seen in Figure. 7, numbers 0 to 4 indicate how much data is classified in each class. The test results from a total of 8 testing data, 1 data is classified incorrectly, namely data with high class is classified as medium class data. The prediction results from the CNN model that have been built using new data can give good results. The overall percentage of the model testing with new data is 88%, with this, the CNN model that has been built is good enough to perform classification. The overall accuracy of the above matrix is as follows:

CONCLUSION
Based on the research that has been done, the application of CNN on game addiction detection produces good results. The level of accuracy obtained from the CNN training model is 86% with a loss of 0.2771. The test results on the model produce an overall accuracy of 88% with misclassification in 1 data. The CNN model built is good enough for detection of game addiction in late adolescence. In the future, it is necessary to add data to train the CNN model so that it gets better accuracy, smaller loss and it is unlikely that at the testing stage there will be no data classes that are classified incorrectly.