eeglib: computational analysis of cognitive performance during the use of video games

  • Luis Cabañero
  • Ramón HervásEmail author
  • José Bravo
  • Luis Rodríguez-Benitez
  • Chris Nugent
Original Research


Cognitive training can improve mental abilities, and a novel method to apply it is trough video games. There is controversy about the effectiveness of commercial video games for brain training, therefore it is necessary to assess the utility of these kinds of games. One quantitative method to assess it is electroencephalography (EEG), a non-invasive technique to study brain activity. This paper explores the use of EEG and video games together to find what are the most used techniques when analyzing the signals by means of a systematic review. From the results of that review two partial contributions were obtained: a taxonomy of techniques to analyze EEG signals, and a ranking of these techniques based on their popularity. The partial contributions were the departure point for working in the main contribution of this paper: eeglib, a Python library for analyzing EEG. The library was tested technically and functionally. The technical test was oriented to assess the correct output of certain algorithms, while the functional one consisted in analyzing data from two different experiments to check the effectiveness of the library.


EEG Video games Cognitive performance Computation techniques Serious games Taxonomy 



This research was funded by Ministry of Science, Innovation and Universities Grant No [RTI2018-098,780-B-I00].


  1. A Consensus on the Brain Training Industry from the Scientific Community (Summary) – Stanford Center on Longevity. Accessed 28 May 2019.
  2. Aydore S, Pantazis D, Leahy RM (2013) A note on the phase locking value and its properties. Neuroimage 74:231–244. CrossRefGoogle Scholar
  3. Bai O, Lin P, Huang D, Fei D-Y, Floeter MK (2010) Towards a user-friendly brain-computer interface: initial tests in ALS and PLS patients. Clin Neurophysiol 121(8):1293–1303. CrossRefGoogle Scholar
  4. Ball K, Berch DB, Helmers KF, Jobe JB, Leveck MD et al (2002) Effects of Cognitive Training Interventions With Older Adults. JAMA 288(18):2271–2281CrossRefGoogle Scholar
  5. Berta R, Bellotti F, De G, Pranantha D, Schatten C (2013) Electroencephalogram and physiological signal analysis for assessing flow in games. IEEE Trans Computat Intell AI Games 5(2):164–175. CrossRefGoogle Scholar
  6. Blackman RB, Tukey JW (1958) The measurement of power spectra from the point of view of communications engineering—part I. Bell Syst Tech J 37(1):185–282. CrossRefGoogle Scholar
  7. Cabañero-Gómez L, Hervas R, Bravo J, Rodriguez-Benitez L (2018) Computational EEG analysis techniques when playing video games: a systematic review. In: Proceedings 2(19): 483. CrossRefGoogle Scholar
  8. Chanel G, Rebetez C, Bétrancourt M, Pun T (2011) Emotion assessment from physiological signals for adaptation of game difficulty. IEEE Trans Syst Man Cybern Part A Syst Hum 41(6):1052–1063. CrossRefGoogle Scholar
  9. ChatterjeeD, Sinharay A, Pal A (2014) Cognitive load detection on commercial eeg devices: an optimized signal processing chainGoogle Scholar
  10. Cognitive Training Data Response Letter. Cognitive Training Data. 28 May 2019
  11. Comon P (1994) Independent component analysis, A new concept? Signal Process 36(3):287–314. CrossRefzbMATHGoogle Scholar
  12. Cooley JW, Tukey JW (1965) An Algorithm for the Machine Calculation of Complex Fourier Series. Mathematics of Computation 19(90):297–301. MathSciNetCrossRefzbMATHGoogle Scholar
  13. Cortes C, Vapnik V (1995) Support-vector networks. Mach Learn 20(3):273–297zbMATHGoogle Scholar
  14. Finke A, Lenhardt A, Ritter H (2009) The MindGame: a P300-based brain-computer interface game. Neural Networks 22(9):1329–1333. CrossRefGoogle Scholar
  15. Fisher RA (1936) The use of multiple measurements in taxonomic problems. Ann Eugenics 7(2):179–188. CrossRefGoogle Scholar
  16. Grossmann A, Morlet J (1984) Decomposition of Hardy Functions into Square Integrable Wavelets of Constant Shape. SIAM J Math Anal 15(4):723–736. MathSciNetCrossRefzbMATHGoogle Scholar
  17. Herrmann B (2019a) Detrended fluctuation analysis. Accessed 28 May 2019.
  18. Herrmann B (2019b) Multi-scale entropy. Accessed 28 May 2019.
  19. Hervás R, Ruiz-Carrasco D, Mondéjar T, Bravo J (2017) Gamification mechanics for behavioral change: a systematic review and proposed taxonomy. 11th EAI International Conference on Pervasive Computing Technologies for Healthcare (PervasiveHealth 2017). Workshop on Health-i-coach intelligent technologies for coaching in health. Barcelona (Spain) 23-26 May, 2017. ACMGoogle Scholar
  20. Higuchi T (1988) Approach to an irregular time series on the basis of the fractal theory. Physica D 31(2):277–283. MathSciNetCrossRefzbMATHGoogle Scholar
  21. Huang D, Qian K, Fei D-Y, Jia W, Chen X et al (2012) Electroencephalography (EEG)-based brain-computer interface (BCI): a 2-D virtual wheelchair control based on event-related desynchronization/synchronization and state control. IEEE Trans Neural Syst Rehabil Eng 20(3):379–388. CrossRefGoogle Scholar
  22. Johnny CL, Tan DS (2006) Using a low-cost electroencephalograph for task classification in HCI research. p. 81–90Google Scholar
  23. Johnson E, Hervás R, Gutiérrez-López-Franca C, Mondéjar T, Ochoa SF, Favela J (2018) Assessing empathy and managing emotions through interactions with an affective avatar. J Health Inform 24(2):182–193. CrossRefGoogle Scholar
  24. Klimesch W (1999) EEG alpha and theta oscillations reflect cognitive and memory performance: a review and analysis. Brain Res Rev 29(2–3):169–195. CrossRefGoogle Scholar
  25. Konstantinidis EN, Conci G, Bamparopoulos EA, Sidiropoulos F, De Natale et al. (2015) Introducing Neuroberry, a platform for pervasive EEG signaling in the IoT domainGoogle Scholar
  26. Lalor EC, Kelly SP, Finucane C, Burke R, Smith R et al (2005) Steady-state VEP-based brain-computer interface control in an immersive 3D gaming environment. Eurasip J Appl Signal Process 2005(19):3156–3164. CrossRefzbMATHGoogle Scholar
  27. Lempel A, Ziv J (1976) On the Complexity of Finite Sequences. IEEE Trans Inf Theory 22(1):75–81. MathSciNetCrossRefzbMATHGoogle Scholar
  28. Luck SJ (2005) An introduction to the event-related potential technique. MIT Press, Cambridge, MAGoogle Scholar
  29. Mandelbrot BB (1982) The fractal geometry of nature. W. H. Freeman, San FranciscoGoogle Scholar
  30. Menezes MLR, Samara A, Galway L, Sant’Anna A, Verikas A et al (2017) Towards emotion recognition for virtual environments: an evaluation of eeg features on benchmark dataset. Pers Ubiquit Comput 21(6):1003–1013. CrossRefGoogle Scholar
  31. Millán JDR, Ferrez PW, Galán F, Lew E, Chavarriaga R (2008) Non-invasive brain-machine interaction. Int J Pattern Recognit Artif Intell 22(5):959–972. CrossRefGoogle Scholar
  32. Mondéjar T, Hervás R, Johnson E, Gutierrez-López-Franca C, Latorre JM (2016) Correlation between videogame mechanics and executive functions through EEG analysis. J Biomed Inform 63:131–140. CrossRefGoogle Scholar
  33. Mondéjar T, Hervás R, Johnson E, Gutiérrez-López-Franca C, Latorre JM (2019) Analyzing EEG waves to support the design of serious games for cognitive training. J Ambient Intell Human Comput 10(6):2161–2174. CrossRefGoogle Scholar
  34. Mu Y, Guo C, Han S (2016) Oxytocin enhances inter-brain synchrony during social coordination in male adults. Soc Cognit Affect Neurosci 11(12):1882–1893CrossRefGoogle Scholar
  35. Müller M (2007) Dynamic time warping. information retrieval for music and motion. Springer, Berlin, Heidelberg pp: 69–84.Google Scholar
  36. Pascual-Marqui RD (2002) Standardized low-resolution brain electromagnetic tomography (sLORETA): technical details. Methods Find Exp Clin Pharmacol 24:5–12Google Scholar
  37. Pearson K (1901) LIII On lines and planes of closest fit to systems of points in space. The London, Edinburgh, and Dublin Philosophical Magazine. J Sci 2(11):559–572. CrossRefGoogle Scholar
  38. Peng CK, Buldyrev SV, Havlin S, Simons M, Stanley HE et al (1994) Mosaic organization of DNA nucleotides. Phys Rev E Stat Phys Plasmas Fluids Relat Interdiscip Topics 49(2):1685–1689Google Scholar
  39. Pregenzer MD, Flotzinger, Pfurtscheller G (1994) Distinction Sensitive Learning Vector Quantisation-a new noise-insensitive classification method., 1994 IEEE International Conference on Neural Networks, 1994. IEEE World Congress on Computational Intelligence. p. 2890–2894.Google Scholar
  40. Raghavendra BS, Dutt D (2010) Computing fractal dimension of signals using multiresolution box-counting method. World Acad Sci Eng Technol 37:1266–1281Google Scholar
  41. Rao CR (1948) The utilization of multiple measurements in problems of biological classification. J R Stat Soc 10(2):159–203MathSciNetzbMATHGoogle Scholar
  42. Reuderink B, Nijholt A, Poel M (2009) Affective Pacman: a frustrating game for brain-computer interface experiments. Intelligent technologies for interactive entertainment. Springer, Berlin, pp 221–227CrossRefGoogle Scholar
  43. Richman JS, Moorman JR (2000) Physiological time-series analysis using approximate entropy and sample entropy. Am J Physiol-Heart Circul Physiol 278(6):H2039–H2049. CrossRefGoogle Scholar
  44. Russoniello CV, O’Brien K, Parks JM (2009) The effectiveness of casual video games in improving mood and decreasing stress. J Cyber Ther Rehabilit 2(1):53–66Google Scholar
  45. Scherer R, Lee F, Schlögl A, Leeb R, Bischof H et al (2008) Toward self-paced brain-computer communication: navigation through virtual worlds. IEEE Trans Biomed Eng 55(2):675–682. CrossRefGoogle Scholar
  46. Wang Q, Sourina O, Nguyen MK (2011) Fractal dimension based neurofeedback in serious games. Vis Comput 27(4):299–309. CrossRefGoogle Scholar
  47. Willis SL, Schaie KW (2009) Cognitive training and plasticity: theoretical perspective and methodological consequences. Restor Neurol Neurosci 27(5):375–389. CrossRefGoogle Scholar
  48. Zhang H (2004) The Optimality of Naïve Bayes. In FLAIRS2004 conferenceGoogle Scholar
  49. Zhang C, Wang H, Wu M-H (2013) EEG-based expert system using complexity measures and probability density function control in alpha sub-band. Integr Comput-Aided Eng 20(4):391–405. CrossRefGoogle Scholar

Copyright information

© Springer-Verlag GmbH Germany, part of Springer Nature 2019

Authors and Affiliations

  1. 1.Department of Technologies and Information SystemsUniversity of Castilla-La ManchaCiudad RealSpain
  2. 2.Ulster University, School of ComputingJordanstownUK

Personalised recommendations