1 Introduction

Video gaming represents a multi-billion dollar industry with billions of people worldwide spending varying amounts of time playing video games [1]. Playing video games can have both positive and negative consequences, depending on several factors including, but not limited to gaming motives and the time spent playing games [2]. While video games can be a fun recreational activity with some studies even suggesting positive training effects (but see heterogeneous findings [3, 4]), excessive gaming can also lead to Gaming Disorder (GD) with adverse emotional effects and decline in academic performance [5].

The motivations for gaming and the potential for GD are relevant to understanding the impact of gaming on well-being. Two gaming motive frameworks have been proposed. Yee [6] put forth the three overarching motivational factors of achievement, social, and immersion motives that had a total of ten sub-components. Demetrovics et al. [7] further developed the Motives for Online Gaming Questionnaire (MOGQ), which included seven gaming-related motives (i.e., social, escape, competition, coping, skill development, fantasy, and recreation) to explain why people play video games. The present study focuses on the gaming motive framework by Demetrovics et al. since it offers a more updated framework.

A central question of this study is to determine if certain gaming motives are associated with heightened and/or decreased levels of well-being in gamers. This question is not easily answered because research investigating this issue is hampered by the so called ‘jingle jangle fallacy’ (see example from social media research [8]). To illustrate this, one can observe that while some studies investigate online activities in the context of life satisfaction, others do so in the context of emotional well-being, and yet others investigate the associations with depression and/or other psychopathological tendencies. Clearly these different constructs correlate to some extent positively and/or negatively with each other, but they are not the same. A recent study reported that the gaming motive of escapism was associated with lower well-being while the skill development motive was positively related to well-being [9]. Further research also showed that the escapism motive was associated with higher incidence of GD [10] and higher GD tendencies were linked to greater levels of loneliness and depressive tendencies [11].

It is well-known that individual differences factors, such as personality traits might also play a role in the relationship between gaming and well-being. It is of importance, therefore, to simultaneously investigate these multiple relevant factors to adequately understand the role of well-being in the context of gaming [2]. For example, it has been repeatedly reported in the literature that higher levels of neuroticism and lower levels of extraversion associate with lower life satisfaction [12]. More recently, underlying primary emotional traits have been conceptualized as “bottom-up drivers” of the Big Five traits using an evolutionary grounded personality theory [13]. The dimensions FEAR, ANGER, and SADNESSFootnote 1might be bottom-up drivers of neuroticism, while PLAY might be a bottom-up driver of extraversion in the context of the Affective Neuroscience Theory by Jaak Panksepp [14]. Therefore, it is expected that higher PLAY is associated with greater well-being and that higher scores on the negative primary emotional traits would be associated with lower well-being providing a basis for the present study. Given the aforementioned, it is also expected that the gaming motive escapism would be associated with lower levels of well-being.

It is worth noting that machine learning is increasingly being used in psychiatric and psychological research to predict psychological and behavioral outcomes [15, 16]. The value of machine learning methods over general linear model approaches is in their ability to handle a large number of predictors and capture complex, interactive, or non-linear effects. Machine learning has built-in overfitting control through specialized training algorithms that optimize the bias-variance trade-off, a concept that is directly analogous to psychometric variability (bias) and reliability (variance) [17].

The present study aims to apply a machine learning approach to determine if individual differences in gaming motives and primary emotional traits predict life engagement and happiness among gamers. This was achieved using two datasets collected before and during the COVID pandemic. The pre-COVID data was used to train the machine learning algorithms. The trained algorithms were then tested on the COVID pandemic data as researchers have reported that gaming patterns and GD changed with the pandemic [18]. As such, it would be plausible to expect these changes to be reflected in changes in gaming motives and their associations to personality traits, life-engagement, and happiness. Successful predictions of the out-of-sample COVID pandemic life engagement/happiness scores using the pre-COVID trained machine learning models would highlight the robustness of machine learning as a method to uncover key relations between life-engagement/happiness, gaming motives, and personality traits that withstand regime changes (here potential changes of investigated variables such as life engagement or gaming disorder tendencies due to the pandemic).

2 Methods

A total of 54,487 participants were included in the present study (pre-COVID = 52,532, during-COVID = 1,955) after data cleaning. For instance, not everyone filled in all measures of interest to the present study, and some participants did not provide plausible age information. The overall data cleaning procedure has been reported earlier [19, 20], but see further data cleaning steps below. All participants provided informed e-consent (with 12–15-year-old participants also needing to state to have parental-e-consent).

Participants were recruited via the platform www.do-i-play-too-much-videogames.com, which provided feedback on several variables as a non-financial incentive for participation (e.g., feedback on their own gaming motive structure and GD tendencies). The platform was rolled out in partnership with the Electronic Sports League (ESL), but both the design of the study and the scientists involved in this project were completely independent from ESL and did not receive any funding or personal honorarium for their contributions. As the platform has been running for several years now, it provides the chance to compare pre-COVID data (2019) with data being collected from the COVID pandemic era (i.e., 2020–2022). Although the present study is cross-sectional in nature, enrollment spanned both the pre-COVID era and the COVID era, enabling deriving contrasts between the two time periods. Although participants provided information on diverse topics related to gaming (see recent publications [18, 21]), we have not previously investigated how individual differences in gaming motives and primary emotional traits related to life engagement and happiness. Therefore, in the present study we analyzed data from four measures which are reported below. The present study received ethical approval from the local ethics committee of Nottingham Trent University (2018/95) and was carried out in accordance with the Declaration of Helsinki.

2.1 Measures

Four measures are of relevance to the present study. First, all participants completed the Life Engagement Test [22]. This scale consists of six items which are answered on a five-point Likert scale ranging from 1 = strongly disagree to 5 = strongly agree. Three items are negatively worded and need to be recoded before computing total scores. High scores suggest greater life engagement. Furthermore, participants responded to the Subjective Happiness Scale [23], which consists of four items on a seven-point Likert scale, summed to create one happiness item that provides a subjective assessment of a person’s level of happiness. Note that one item needed to be reversed [23].

Another measure completed by participants was the MOGQ [7]. This scale consists of 27 items answered on a five-point Likert scale with the answer format 1 = almost never/never to 5 = almost always /always. All items assess the following gaming motives: social, escape, competition, coping, skill development, fantasy, and recreation. The recreation motive consists of only three items. High scores on each dimension indicate greater expression levels of the respective motive.

All participants completed the fourth measure called Affective Neuroscience Personality Scales-Adjective Ratings (ANPS-AR) [14, 24]. It consists of 24 items assessing the following six primary emotional systems: SEEKING, CARE, PLAY (positive primary emotional traits) and FEAR, SADNESS, ANGER (negative primary emotional traits). Each dimension is assessed via four items, whereas one item of each scale needs to be recoded before items can be summed up. All items are answered on a five-point Likert scale ranging from 1 = strongly disagree to 5 = strongly agree. High scores indicate higher expression of each primary emotional trait. Participants also answered two gaming intensity questions that gauged the extent to which they spent time gaming. These included a question related to hours played per week and another one about the percentage of time spent gaming on the weekend. Demographic data included age, sex, employment status, and relationship status.

The reliability of each measure was estimated using the McDonald’s omega internal coefficient, as shown in Table 1. Other than the personality trait SEEKING (primary emotional trait), all reliability coefficients calculated were greater than 0.65 and therefore adequate. Descriptive statistics for the pre-COVID and COVID data gaming motivations, personality traits, and life engagement/happiness with tests for group differences are shown in Table 2, 3. Among the gaming motivations, escape, competition, and coping showed significant group differences in the pre-COVID and COVID data. In relation to the personality scale, FEAR, CARE and ANGER showed significant group differences.

Table 1 Internal consistencies for the measures in the pre-COVID and COVID data
Table 2 Descriptive statistics for the psychological measures in the Pre-COVID and COVID sample
Table 3 Independent Samples T-Test with the contrasts PreCovid vs. Covid sample

2.1.1 On matching procedures and further data cleaning for the present study

The pre-COVID and COVID datasets were unbalanced with more data collected pre-COVID (see above). To create balanced datasets, each pandemic-post-onset participant was matched to a pre-onset participant with the same four demographic variables (age, gender, employment, and relationship status). The matching was performed in R using the MatchIt package with the demographic variables as factors and using a matching ratio of 1 [25]. We used the exact match option on the covariates and MatchIt found matched samples across both datasets with near identical covariate distributions. The final characteristics of both samples are presented in the result section.

2.2 Statistical analysis

Descriptive statistics of the two samples are presented separately (Sample 1: pre-COVID data (2019); Sample 2: COVID data (2020–2022); see Table 2). Significant differences in the sample are presented using a t-tests, appropriate for these large sample sizes (see Table 3). In addition, correlations between all measures across both pre-COVID and COVID grouped datasets are presented (total dataset, See Fig. 1). In the supplementary material correlations for both datasets (pre-COVID and COVID) are presented separately (in a heatmap fashion).

The main aim of the present study was to investigate whether an algorithm, developed based on the analysis of the primary emotional traits and gaming motives to predict life engagement and happiness pre-COVID (2019) could also be used to predict life engagement and happiness during COVID (2020–2022). Participants weekly time spent gaming and the percentage of that time spent gaming during the weekend were included in the machine learning analysis. The pre-COVID data was utilized as a training dataset, whereas the COVID data was used for testing. We used a random forest regression model and a one-dimensional convolutional neural network (1 D CNN) on the data. The selection of these machine learning models were motivated by several factors. First, happiness, life-engagement, gaming motives and primary emotional traits features were ordinal response data. We selected supervised regression using random forests because of its non-parametric, non-linear properties that does not use metric information on the data allowing us to treat the ordinal data as continuous. We also selected to use 1D CNN as a second model because of its excellent performance in recognizing patterns in a sequence which resembles how a healthcare worker might infer happiness/life-engagement from the pattern of response data. Random forest and CNN are very different in their approach and achieving comparable prediction accuracies between these two methods would give us confidence that the findings are not model dependent.

Four pre-COVID features sets were used: (i) gaming motives (social, escape, competition, coping, skill development, fantasy, recreation), demographic variables (age, sex, employment, relationship), and gaming features (weekly time spent gaming, percent of time played on weekends); (ii) the six-factor personality features (SEEKING, CARE, PLAY, FEAR, SADNESS, ANGER) as validated in a work by Montag & Davis [14]; (iii) the six-factor personality features with the gaming motives, demographic and gaming features; (iv) the full 24 personality features (not summed primary emotional systems) with the gaming motives, demographic and gaming features. All models were tested on unseen COVID data to determine their ability to predict happiness and life engagement across the pandemic regime change.

The random forest models were built using the scikit-learn python package with a multivariate target. Hyperparameter tuning and training was accomplished using grid search (GridSearchCV, scikit-learn package) tenfold cross validation on the number of estimators, the maximum depth of the trees, and the error metric to evaluate the quality of a node split in a tree, and the number of features to consider when looking at the best split. The best performing parameters were used in the model to predict the out-of-sample post-onset COVID mood scores.

The convolutional neural network (CNN) was trained using the python Keras API to the TensorFlow Core. The CNN contained three 1D convolutional layers using a rectified linear unit (ReLU) activation function that were followed by dropout layers. The final output was flattened and run through three dense layers. The number of layers, filter sizes, kernel sizes and drop-out fraction were selected using grid search and cross validation to evaluate each selection. Training on the pre-COVID data used a mean-square error loss function, mean absolute error reported metric, the Adam optimizer and 100 epochs with a train-validation split of 0.2. The final model was applied to the out-of-sample post-COVID data. For all machine learning models, the correlation of their predictions, the coefficient of determination and the mean absolute error with the observed data are reported.

3 Results

3.1 Descriptive statistics

As matching procedures have been applied, sociodemographics in the pre-COVID data (Sample 1, n = 1,955) and the COVID data (Sample 2, n = 1,955) are comparable: In detail, Sample 1 consisted of 86.9% male, 13.1% female, mean age 24.36 years (SD = 8.57), 43.2% employed and 37.1% in a relationship. Furthermore, Sample 2 consisted of 86.8% male, 13.2% female, mean age 24.37 years (SD = 8.61), 43.3% employed and 37.1% in a relationship. The MatchIt package was used to generate matched sample sets and all differences between sociodemographic features in each sample are not statistically significant. Correlations of all variables of interest (with pre-COVID and COVID data combined) are shown in Fig. 1. None of the correlations were above 0.70 (positive or negative), by some seen as a usual threshold for a (very) strong correlation. That said, we observed several robust associations. The stronger correlations appeared among the MOGQ Online Gaming Questionnaire and included Escape and Coping (0.63), Escape and Fantasy (0.62), and Fantasy and Coping (0.50). SADNESS and FEAR showed a correlation of 0.61 and Happiness and Life Engagement had a correlation of 0.65, which was the strongest correlation coefficient observed. See Tables 2,  3 for descriptive statistics and T-Tests. See Tables 4, 5 for correlations for the Pre-COVID and COVID sample; see supplementary material for the same correlation tables presented in heat maps: Figure S1 and S2.

Fig. 1
figure 1

Correlation of study variables (complete study participants from pre− COVID and COVID datasets grouped as one dataset). Coding information: male = 1, female = 0; in relationship = 1, no relationship = 0; employed = 1, not employed = 0

Table 4 Correlation Matrix of Pre-COVID data
Table 5 Correlation matrix of COVID data

3.2 Machine learning

Table 6 shows the COVID prediction results of the random forest and one-dimensional convolutional neural network models that were trained on four pre-COVID features sets: (i) gaming motives (social, escape, competition, coping, skill development, fantasy, recreation), demographic-variables (age, sex, employment, relationship) and gaming features (hours played per week, percent of time played on weekends); (ii) the six-factor personality features (SEEKING, CARE, PLAY, FEAR, SADNESS, ANGER); (iii) the six-factor personality features with the gaming motives, demographic and gaming features; (iv) the full 24 personality features with the gaming motives, demographic and gaming features. The predictions were evaluated using the correlation ρ with the target variables, the coefficient of determination R2, and the mean absolute error (MAE) shown for both the prediction against target and in parenthesis the prediction against training data. Training MAEs were expected to be smaller than out-of-sample MAEs but a significantly smaller training MAE would point to model over-fitting. All reported correlation and coefficient of determination results were statistically significant with a p < 0.001.

Table 6 Random forest and convolutional neural network machine learning models were trained on pre− COVID data to predict happiness and life engagement in the COVID data

Figure 2 shows the first three node layers of the random forest model that was trained only on the pre-COVID six-factor ANPS personality scales and used to predict happiness and life engagement in the COVID data. The complete tree went to a depth of eight levels which is deep for a random forest model but in this data achieved a good balance between overfitting and underfitting the training data as is evident by the model performance on test data. Overfitting a machine learning model leads to low bias but high variance test predictions. This is directly equivalent to a psychometric instrument that is valid but not reliable [17]. Underfitting a machine learning model leads to the opposite, high bias and low variance test predictions, and is directly equivalent to a psychometric instrument that is reliable but not valid.

Fig. 2
figure 2

The first three node layers of an individual decision tree from the random forest model that was trained only on the pre− COVID six− factor ANPS personality scales used to predict happiness and life engagement in the COVID data

Figure 3 shows the layer architecture of the one-dimensional neural network that was trained on the four respective pre-COVID datasets. The number of convolutional layers and their parameters are used to control for overfitting and underfitting the training data with the objective of making predictions that minimize the mean error distance with the observed data.

Fig. 3
figure 3

The structure of the one− dimensional convolution neural network (1D− CNN) that was trained on pre− COVID data and used to predict happiness and life engagement in the COVID data

Feature importance in random forest models assigns a score to each feature based on how useful the feature is in predicting the target variable. Figure 4 shows the feature importance of the random forest model trained on the pre-COVID data of gaming type, demographics and gaming intensity responses with happiness as the dependent variable. This model excluded personality data. The feature importance and 95% confidence interval are shown for each input feature. Gaming motivation “Escapism” was the most important variable in predicting happiness. In other words, respondents that were motivated to play games to escape real life problems were significantly more likely to have low happiness (underlined by Fig. 4). The other motivations had comparably smaller predictive feature importance in the model.

Fig. 4
figure 4

Exemplary illustration of feature importance of the random forest model targeting happiness trained on the pre− COVID data of gaming motivation, demographic and gaming intensity responses. This model excluded the responses to the 24 personality items. The feature importance and 95% confidence interval are shown for each feature

Figure 5 shows the feature importance of the random forest model trained on all the pre-COVID data features, including six personality factors and gaming motives, to predict happiness. The importance scores and their 95% confidence intervals are displayed for each feature. The most significant predictors of happiness are high SEEKING, high PLAY, and low SADNESS, indicating that individuals with higher levels of SEEKING and PLAY traits and lower levels of SADNESS are more likely to report higher happiness. Additionally, low levels of escapism are the strongest gaming motive predictor of happiness, suggesting that individuals who game to escape real-life problems tend to report lower happiness. This conclusion is derived from the correlation tables, which show the direction of these associations. For brevity, only the features relevant to happiness are illustrated here, not those for life engagement.

Fig. 5
figure 5

Exemplary illustration of feature importance of the random forest model targeting happiness and trained on the pre− COVID data that included the responses to the six− personality items and the gaming motivations. The feature importance and 95% confidence interval are shown for each feature

4 Discussion

Playing video games can have both positive and negative impacts on mood depending on a number of factors including gaming motives and time spent playing [2]. As gaming motives are of high importance to understand the potential health impact of gaming, prior research has focused on answering whether certain gaming motives are associated with well-being [2]. As previously reported in the literature, personality traits are also linked to the well-being complex (e.g. extraversion links to more life satisfaction [12]); and an analysis of the association between gaming motives and level of well-being should include such personality traits (here primary emotional personality traits). Prior research using the present COVID dataset has focused among others on changes in GD between the pre-COVID and COVID-era [18], but also on personality GD associations [19].

In contrast to these older works, we sought to answer whether gaming motives, when combined with personality traits (here primary emotional traits), “predict” a person’s well-being and whether those predictions remain stable despite possible structural changes in the underlying data from COVID and its policies (it is a cross-sectional data set, therefore, no causality can be implied or inferred). A data-driven approach was applied using machine learning to understand how well individual differences in gaming motives alone and in combination with primary emotional traits could predict life engagement/happiness scores during the COVID pandemic when trained on pre-COVID data only. We used two very different machine learning models: a random forest model and a one-dimensional convolutional neural network. Random forest regression was suitable for the ordinal response data because of its non-parametric, non-linear qualities that do not make metric assumptions on the data. In contrast, a one-dimensional convolutional neural network, a vastly different type of learning algorithm, excels at pattern recognition in the input sequence, providing a second very complimentary approach. We trained each model on four different pre-COVID scale combinations: (1) gaming motives and demographic data only; (2) the six-factor personality scales only; (3) combining gaming motives, demographic data and the six-factor personality scales; and (4) combining gaming motives, demographic data and the complete 24-item personality scales. Each of the eight trained models (four random forest models and four convolutional neural network models) was used to make predictions of happiness and life engagement scores during the COVID pandemic. To our knowledge, this represents the first application of machine learning to predict psychological well-being during COVID using pre-COVID gaming motives and personality traits.

Comparison of happiness and life engagement predictions by either the random forest model or the convolutional neural network model when trained on each of the four pre-COVID datasets showed rather similar COVID pandemic prediction performance as measured by prediction correlation, coefficient of determination and mean-absolute error between predictions and actuals. Furthermore, for both the random forest and convolutional neural network models, using the complete set of features that included the 24-item personality scale improved the predictions especially of the happiness score as might be expected. The happiness and life engagement prediction correlations of the models were respectively 0.758 and 0.668 when trained on all the pre-COVID data including the 24-item personality scale and, respectively, 0.709 and 0.627 when trained on all the data but using the six-factor personality scale (random forest results). In other words, inserting the 24 items instead of the sum scores of the ANPS-AR improved the predictions. For further illustration: The models trained on the seven gaming motives alone predicted happiness and life engagement with prediction correlations of 0.444 and 0.472, respectively (random forest results). The life engagement prediction using gaming motives was comparable to the predictive results obtained when the models were trained on the six-factor personality scale alone. Overall, it was observed that the models trained on the combined gaming motivations and personality traits improved the prediction correlations and explained more variance than the models trained on either of these datasets separately.

Researchers have suggested that gaming patterns, in particular GD, may have changed during the pandemic [18] and this may also apply to gaming motives (see higher scores of escapism, competition, and coping during the pandemic compared to before the pandemic in Tables 2, 3). The prediction correlations in Table 6 of the full models support the stability of the association between gaming motives and the personality trait features learned by the models were stable across the ML-approaches enabling high accuracy predictions of happiness and life engagement during COVID from associations learned from pre-COVID data. Both machine learning models provided comparable predictions implying that our data driven machine learning approach to learn from pre-COVID data and make predictions of happiness and life engagement during the COVID pandemic was not sensitivity to model selection.

5 Conclusion

Machine learning models learn to model existing data as accurately as possible but are not effective at extrapolating outside of the observed dataset. The fact that two machine learning models were able to predict happiness and life engagement across the pre-COVID to COVID regime change leads to several interesting conclusions. First, the psychometric properties of both the training scales and the target prediction scales would need to have similar reliability and validity across the regime change as would be expected from well-designed instruments. Second, the structural relationships between the prediction targets (happiness and life engagement) and the underlying training data (gaming motives and personality traits) must also to be similar across the regime change. Lastly, we observed that the bias-variance trade-off concept in machine learning is analogous to the reliability-validity concept for psychometric instruments. Machine learning training is designed to simultaneously minimize both bias and variance (analogously, maximize reliability and validity). With this analogy, we propose that the machine learning models for happiness and life engagement are themselves ‘happiness and life engagement psychometric instruments’ created from the underlying gaming motives and personality traits that are optimized on the training data to achieve the best possible predictive reliability and validity when tested on the unseen COVID data.