mental war: an attention-based single/multiplayer …...devices (e.g., emotiv epoc and emotiv...

16
Mental War: An Attention-Based Single/Multiplayer Brain-Computer Interface Game Gabriel Alves Mendes Vasiljevic (&) , Leonardo Cunha de Miranda , and Bruna Camila de Menezes Department of Informatics and Applied Mathematics, Federal University of Rio Grande do Norte (UFRN), Natal, RN 59078-970, Brazil [email protected], [email protected], [email protected] Abstract. Brain-Computer Interfaces (BCIs) are a novel kind of user interface that allows the recognition of specic user intentions by reading the users brain activity, translating it into commands and transmitting them to the computer. With increasing advances in the technology behind these interfaces, gaming applications using cerebral input are becoming more common, although the employment of this kind of control for games is still relatively low in com- parison to other traditional input modalities. This paper presents Mental War, a brain-controlled multiplayer computer game, in which two or more players are able to compete against each other, or work together in a collaborative mode to achieve a common goal, both using only their mental state alone. Their level of concentration is measured using a single-sensor BCI headset and translated into force to pull a rope in a tug-of-war game. The design and implementation process of the game are detailed and discussed. An evaluation process was performed with a total of 24 participants to acquire qualitative data regarding the interaction with the BCI platform, validating the design and providing insights for developers in future BCI-based research. Keywords: BCI EEG NeuroSky MindWave HCI Evaluation Games 1 Introduction The eld of computer games is rapidly growing in the past few years [6], with increasing interest not only for entertainment, but for scientic researches as well. A number of past works in this eld explored novel control schemes for games, aiming at improving the game experience, evaluating their application in a real-world scenario, and providing a greater level of immersion for players. Examples of those works include a multimodal slingshot game with haptic feedback [6], a gestural-based chess game [19], adjustable interactive rings for games [16, 17], a breath-controlled coor- dination game [2], and even an innite racing game controlled with a banana through computational vision [1]. Recently, researchers started to adapt and develop advanced © Springer International Publishing AG, part of Springer Nature 2018 O. Gervasi et al. (Eds.): ICCSA 2018, LNCS 10960, pp. 450465, 2018. https://doi.org/10.1007/978-3-319-95162-1_31

Upload: others

Post on 11-Jul-2020

8 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Mental War: An Attention-Based Single/Multiplayer …...devices (e.g., Emotiv Epoc and Emotiv Insight). A kind of BCI application that is arising due to the development of new tech-

Mental War: An Attention-BasedSingle/Multiplayer Brain-Computer

Interface Game

Gabriel Alves Mendes Vasiljevic(&) ,Leonardo Cunha de Miranda , and Bruna Camila de Menezes

Department of Informatics and Applied Mathematics,Federal University of Rio Grande do Norte (UFRN),

Natal, RN 59078-970, [email protected],

[email protected], [email protected]

Abstract. Brain-Computer Interfaces (BCIs) are a novel kind of user interfacethat allows the recognition of specific user intentions by reading the user’s brainactivity, translating it into commands and transmitting them to the computer.With increasing advances in the technology behind these interfaces, gamingapplications using cerebral input are becoming more common, although theemployment of this kind of control for games is still relatively low in com-parison to other traditional input modalities. This paper presents Mental War, abrain-controlled multiplayer computer game, in which two or more players areable to compete against each other, or work together in a collaborative mode toachieve a common goal, both using only their mental state alone. Their level ofconcentration is measured using a single-sensor BCI headset and translated intoforce to pull a rope in a tug-of-war game. The design and implementationprocess of the game are detailed and discussed. An evaluation process wasperformed with a total of 24 participants to acquire qualitative data regarding theinteraction with the BCI platform, validating the design and providing insightsfor developers in future BCI-based research.

Keywords: BCI � EEG � NeuroSky MindWave � HCI � EvaluationGames

1 Introduction

The field of computer games is rapidly growing in the past few years [6], withincreasing interest not only for entertainment, but for scientific researches as well.A number of past works in this field explored novel control schemes for games, aimingat improving the game experience, evaluating their application in a real-world scenario,and providing a greater level of immersion for players. Examples of those worksinclude a multimodal slingshot game with haptic feedback [6], a gestural-based chessgame [19], adjustable interactive rings for games [16, 17], a breath-controlled coor-dination game [2], and even an infinite racing game controlled with a banana throughcomputational vision [1]. Recently, researchers started to adapt and develop advanced

© Springer International Publishing AG, part of Springer Nature 2018O. Gervasi et al. (Eds.): ICCSA 2018, LNCS 10960, pp. 450–465, 2018.https://doi.org/10.1007/978-3-319-95162-1_31

Page 2: Mental War: An Attention-Based Single/Multiplayer …...devices (e.g., Emotiv Epoc and Emotiv Insight). A kind of BCI application that is arising due to the development of new tech-

games that could be modified or controlled using the player’s brain waves, using theirown mental state as an input modality. These emerging applications could provide aneven greater level of immersion for the player, as his/her emotions and intentions couldbe directly employed in the game.

Brain-Computer Interface (BCI) is a field of neuroscience and Human-ComputerInteraction (HCI) that allow users to interact with the computer serving as a bridge,sending the commands directly from the brain to be transmitted to the standard input ofthe computer [8, 13]. The great advantage of BCIs over other user interfaces is theircapacity to be utilized by any person, even those who has their body completelyparalyzed, as only the brain activity is required to its operation [9, 15]. The firstBCI-based systems appeared in the decade of 1970 and required brain implants to beused [11]. Thanks to electroencephalography (EEG), cheaper and more practicalequipment were developed, allowing the development of both more accessible medicalapplications and general-purpose systems, especially with the advent of commercialheadsets such as the NeuroSky devices (e.g., MindSet and MindWave) and the Emotivdevices (e.g., Emotiv Epoc and Emotiv Insight).

A kind of BCI application that is arising due to the development of new tech-nologies and techniques are brain-controlled games, in which the user utilizes a specifickind of brainwave to directly control actions in the game, or uses it as a complementarytype of control, while maintaining the standard inputs. However, it is still a challenge toadapt those biological signals as an input to control a game. In addition to the naturalvariation and fluctuation that occurs in the brain signals, each person can have its ownbrain wave patterns [5], so that a method for controlling one’s waves may not work foranother person. In this sense, the design and implementation of such games can be adifficult task [7], especially when involving multiple users at the same time.

In this sense, this work presents the development of a multiplayer brain-controlledcomputer game. The game’s design and architecture are discussed, along with thedesign challenges and technical issues regarding its implementation. The focus of thisgame is the multiplayer interaction, in which few BCI games are designed upon. Thedeveloped game is designed to allow multiple users to work in either competitive andcollaborative manners, or playing solo against the computer, using their attention levelto control it. We seek to evaluate the proposed BCI platform and validate the game withexternal subjects in a controlled evaluation. Both single and multiplayer game modeswere evaluated with qualitative data acquired from the participants.

This paper is organized as follow: Sect. 2 presents the related work in the field;Sect. 3 presents the concept, design and implementation of the developed BCI-basedgame; Sect. 4 describes the evaluation of the game; Sect. 5 discusses the results of thiswork; and Sect. 6 concludes the paper.

2 Related Work

Although there are numerous games that were developed or adapted to be played usinga BCI, only a few of them allows for multiplayer interaction. The relatively low costand easiness of employment of consumer-grade EEG devices has made possible theemergence of many multiplayer BCI games in the past few years. These games are

Mental War: An Attention-Based Single/Multiplayer BCI Game 451

Page 3: Mental War: An Attention-Based Single/Multiplayer …...devices (e.g., Emotiv Epoc and Emotiv Insight). A kind of BCI application that is arising due to the development of new tech-

particularly difficult to conceive, as the challenges of designing an entertaining gamewith multiplayer interaction and employing a BCI control must both be considered.

The work of Schwarz et al. [18] presents an adaptation of the classic Pong game,called BrainPong, in which two players compete by moving their respective paddles upand down using the motor imagery control signal, in order to bounce the ball back tothe opponent. The game is controlled using an Emotiv Epoc device and was developedfor education purposes. Crawford et al. [4] describe a simulation game in which theplayer, playing individually or together with another one, must control a robot andreach a certain destination in the virtual map. In the cooperative mode, each playercontrols one specific action, being either moving the robot or rotating it. The controlsare performed using imagined movement captured by an Emotiv Epoc device, with thepush movement signalizing a move action, while the right hand movement translates asa clockwise rotation.

The work of Laar et al. [12] presents alpha-WoW, which is an adapted version ofthe role-playing game World of Warcraft (WoW). The game uses the player’s alphawaves to measure his/her level of meditation, and uses this level to control the trans-formation of the character, which can alternate between long-range (low stress) andclose-range (high stress) combat. In the work of Hazrati and Hofmann [10], the authorsalso present an adapted version of an existing game. In the “game”, called Second Life,the player can walk and interact with the virtual ambient or with other players, usingthe motor imagery control signal to walk (imagined foot movement) and to move left orright (imagined hands movements). Both works also use an Emotiv Epoc device toacquire the brain signals.

Bonnet et al. [3] describe a simple BCI football game, in which the two playersmust use the imagined movement to push the ball in the respective goal. The game canbe played both collaboratively and competitively, in which the players can competeagainst the computer or against each other, respectively. Maby et al. [14] developedand evaluated an adaptation of the game “Connect Four”, in which two playerscompete against each other using the P300 control signal. The game was evaluated withtwo participants, whose brain signals were captured using electrode caps with ninesensors each, achieving over 82% of precision from the signals. Both works employedan electrode cap to capture the players’ brain waves.

One can notice, based on these related works, that the majority of past worksemployed either an Emotiv Epoc device or a clinical electrode cap. The advantages ofthose equipment are that, by having a higher number of sensors, they have also a higherspatial resolution in relation to other lower-cost consumer-grade devices. However,they also require specific technical knowledge to capture and handle the data, whichcan increase the difficulty of the development process of the game; moreover, thesedevices also require a setup time before being used, which includes the application ofsaline solutions to increase the quality of the captured signals. Our approach, in thissense, is to develop an entertainment game based on a simple one-sensor device thatcould potentially be played by any person, without necessarily requiring technicalknowledge of the equipment.

452 G. A. M. Vasiljevic et al.

Page 4: Mental War: An Attention-Based Single/Multiplayer …...devices (e.g., Emotiv Epoc and Emotiv Insight). A kind of BCI application that is arising due to the development of new tech-

3 Mental War

The Mental War game is an open-source computer software that enables users to play agame using their brainwaves against the computer or other players. The game softwarewas developed by the Mental War Development Team (Mental War Dev Team)composed by two researchers and a designer. The game was designed as a virtualversion of a tug-of-war game, in which the player has to pull the opponent to the centerof the screen while avoiding being pulled. The players are connected through a rope,and are pulled while the force made in the other side is greater in intensity than theforce that the player himself is making.

The game is mainly controlled using the NeuroSky MindWave input, which rep-resents the player’s level of attention. The MindWave is a headset device that uses asingle electrode, positioned at the forehead, which is able to measure the levels ofconcentration and meditation of a person using a set of algorithms called eSense, and todetect whether the user is blinking an eye.

There are three possible game modes that the game is intended to offer to theplayer, i.e., solo (single player), collaborative and competitive (both multiplayer). Thisdivision was based on the work of Bonnet et al. [3]. In the single player mode, theplayer is set to play against the computer itself in three difficult levels, i.e., easy,medium and hard. In the competitive mode, players compete against each other. In thiscase, the average level of attention of each player is subtracted and the result is theresultant force. Thus, the player with higher attention score will pull the other playerwith more force to its side.

In the collaborative mode, the players work together to defeat the enemy team. Inthis mode, the level of attention of each player is added to the ones of their team and themean of the sum is used as the total level of attention of the group. As each player hasthe same degree of contribution in the total attention of the group, if one player isperforming badly, the rest of the group must perform much better to compensate.

These game modes can be mixed, i.e., players can play collaboratively in teamsagainst the other team. In this case, the same rules apply as in the collaborative andcompetitive modes. For each team, the total attention is the mean value of each player’saverage attention in that group, and the resultant force is the difference between thetotal attentions of both teams. Alternatively, two or more players can form a team tocompete against a single player.

The game user interface was designed to be simple, intuitive and yet maintaining allthe necessary information to the player. Upon opening the game, the player is presentedwith the main interface, where s/he can choose to play a single or a multiplayer match.Upon selecting the desired mode, the player is moved to either the difficulty selectioninterface, in the case of the single player mode, or the team selection interface, in thecase of the multiplayer mode.

In the single player difficulty selection interface, there are three buttons, eachrepresenting a difficulty level and its correspondent color. Each difficulty option alsohas an icon representing the computer opponent in the correspondent mode. In themultiplayer team selection interface (or multiplayer lobby), each player is representedby his name and a picture of his character, and is placed in one of the two teams. The

Mental War: An Attention-Based Single/Multiplayer BCI Game 453

Page 5: Mental War: An Attention-Based Single/Multiplayer …...devices (e.g., Emotiv Epoc and Emotiv Insight). A kind of BCI application that is arising due to the development of new tech-

player has the option to check if s/he is ready to begin the match and to add or removecomputer players of any difficulty in both teams.

The game’s main interface (Fig. 1a) is composed of four elements: the two group ofplayers (area 4 in Fig. 1a); the blink charges (area 2 in Fig. 1a); a force meter (area 3 inFig. 1a); and a focus meter (area 1 in Fig. 1a) for each side. The focus meter serves asan indicator to the MindWave device’s input, which is a number ranging from 0 to 100.The force meter indicates to which side the force is tending, and is roughly the dif-ference between the forces on both sides. The players move according to the resultantforce, and the game is over when one of them reaches the center of the screen.

In addition to the level of attention, the game also uses the blink detection feature ofthe MindWave headset. At the beginning of each match, the player has three blinkcharges, represented by three open-eye icons. When the player voluntarily blinks hiseyes, s/he spends a blink charge and temporarily gains a small force boost. When ablink charge is spent, one of the open-eye icons disappears from the screen, repre-senting that the player can no longer use this charge in this match.

The game can be played in four scenarios, each representing a difficulty level in asingle player match, i.e., easy (Fig. 2a), medium (Fig. 2b) and hard (Fig. 2c), or amultiplayer match (Fig. 1b). Some of the interface elements changes in the multiplayermode, such as the arrows that indicate the level of attention of each player individuallyand the background scenario.

Fig. 1. (a) Game match elements; and (b) multiplayer game interface. (Color figure online)

Fig. 2. Single player game interfaces in the (a) easy, (b) medium, and (c) hard difficulty level.(Color figure online)

454 G. A. M. Vasiljevic et al.

Page 6: Mental War: An Attention-Based Single/Multiplayer …...devices (e.g., Emotiv Epoc and Emotiv Insight). A kind of BCI application that is arising due to the development of new tech-

The game software was implemented in the C++ programming language using theSimple and Fast Multimedia Library (SFML) and compiled for the Windows operatingsystem. The SFML was used to manage the game’s graphics, sounds and network. Toreceive the input from the NeuroSky headset, a software module was created to serve asan interface to the NeuroSky C header and the game implementation itself. Thismodule is responsible for establishing a connection with the headset, updating the brainwaves’ values as soon as a new packet arrives from the device, and updating theheadset status, such as the connection status and the signal quality. The architecture ofthe game client is presented in Fig. 3.

The module tries to establish a connection with the headset as soon as the gamesoftware is open. If no connection was found, the module tries again every two sec-onds. Once a connection is established, the module opens a thread that keeps listeningto the headset connection to receive any incoming packet as soon as it arrives (usuallyone packet every second). The module then updates the headset’s status, such as thevalues for each brainwave (i.e., delta, theta, alpha, beta and gamma), the eSense (i.e.,attention and meditation), and signal quality. When an eSense value is acquired, thenext requisition will only return a valid number if a packet has arrived with the mostupdated value. This prevents the headset from returning repeated values due to poorsignal quality or interference.

The game itself mainly uses the attention value received from the headset. Once thegame begins, the main loop will continuously try to read a value from the headset, andif the value is valid, it is inserted into an array. As the number read from the MindWaveis a biological signal, its value may change abruptly over a short period of time. Initialgameplay tests showed that this variation caused a strange effect both in visual andgame flow, as there was no constancy in the movement of the characters and the inputfrom the headset appeared to be randomized from the player’s perspective. Being so, itwas chosen to use the average of the player’s attention over the duration of the match,as it would represent the player’s overall attention during the game. Thus, every twoseconds, the game calculates the average of the values in the array and compares it to

Fig. 3. Game client architecture.

Mental War: An Attention-Based Single/Multiplayer BCI Game 455

Page 7: Mental War: An Attention-Based Single/Multiplayer …...devices (e.g., Emotiv Epoc and Emotiv Insight). A kind of BCI application that is arising due to the development of new tech-

the average of the enemy team, then moves the players accordingly. This interval oftime was used to slow the game’s pace, so the match could have a minimum duration.Also, at the start of the game match, there is a three seconds countdown to prevent it tostart instantaneously and give the player time to prepare.

The difficulties of the single player game mode were implemented to start at a basevalue of 50 attention and increase by 10 for each difficulty. Every second, the computeradds a random number between 0 and 10 to its base attention and inserts the sum intoits own array. Thus, the average attention of the computer is approximately 55, 65 and75 for the easy, medium and hard difficulties, respectively. For the player to win thegame, s/he must maintain his/her average attention higher than the computer’s for mostof the time.

The multiplayer game modes have a similar logic, but were implemented in adifferent way. First, it was required to implement a server for connecting the players,also written in C++ using the SFML library, and compiled for the Linux operatingsystem. The original idea was to allow multiple users in the same computer to playmultiplayer matches, but the MindWave headset suffers from interference from otherdevices in the proximity. Also, the ThinkGear communication protocol, used by theNeuroSky devices, opens a TCP connection in a default port (13854), so only onedevice can be connected to the computer at the same time.

A custom network protocol was also developed to control the connection of thegame clients with the game server. The protocol is based on packets sent through TCPsockets, implemented using the SFML network support. Architecture-wise, thereceived packets are parsed by a connection handler, which in turn passes the packetwith its identifier and origin to the network facade. Then, the contents of the packet,which depends on its type, are passed to the server control module or the game controlmodule, depending on the state of the server (‘waiting for players’ or ‘in game’).Depending on the packet, the server can send a response to the origin client, orbroadcast a message to all connected clients. This scheme is represented in Fig. 4.

Upon connecting to the server, the player enters in one of the two available teams.The player then can check if s/he is ready to begin the match. The game can only start

Fig. 4. Game server architecture.

456 G. A. M. Vasiljevic et al.

Page 8: Mental War: An Attention-Based Single/Multiplayer …...devices (e.g., Emotiv Epoc and Emotiv Insight). A kind of BCI application that is arising due to the development of new tech-

when all players in the two teams are ready. There is a maximum of three players ineach team, and the two teams can have different numbers of players. The server isresponsible for receiving the attention value for each player, log it and send it to allplayers, including the one who send it to the server, so that all players update theattention values at approximately the same time.

The averaged values of each team allows for a more collaborative gameplay, asboth members should maintain their average attention high enough so the meanattention is higher than the other team. Also, it allows for one single player to be able tocompete with two or three other players without penalties, and to create “custom”difficulties by combining two or more machine players of different difficulty levels.Some key features are also different from the single player mode. In the single playermode, the player force is calculated by averaging all attention values during the match,and the difference between this averaged value and the computer’s average is taken asthe resultant force (Eq. 1).

F ¼PN

i¼1Ai

N�

PM

i¼1Bi

Mð1Þ

In Eq. (1), F is the resultant force, N is the number of read attention values for theplayer, M is the number of attention values generated for the computer player (roughly,the same number of seconds passed since the beginning of the match), Ai is the i-thattention value of the human player and Bi the i-th attention value of the computerplayer. This value is calculated every two seconds: if F > 0, the human player pulls thecomputer player; if F < 0, the computer player pulls the human player; and if F = 0,both players will remain at the same position until the next resultant force value iscalculated. The speed and distance that both players will move in the next two secondsfollowing this calculation is directly proportional to F.

In the multiplayer mode, in order to avoid long match durations due to stagnation ofthe averaged value, only the last 20 attention values are considered in the averagecalculation (Eq. 2). This creates a more variable force values during the match,allowing for the player to recover from a period of low attention, and forcing him/her totry maintaining the attention high during all match.

F ¼PL

k¼1

PN

i¼N�19

Aki

20

L�

PR

k¼1

PM

i¼M�19

Bki

20

Rð2Þ

In Eq. (2), F is the resultant force, L is the number of players in the left team(1 � L � 3), R is the number of players in the right team (1 � R � 3), N is thenumber of read attention values of the k-th player of the left team, M is the number ofread attention values of the k-th player of the right team, Aki is the i-th attention valueof the k-th player of the left team, and Bki is the i-th attention value of the k-th player ofthe right team. The same rules of the single player mode for the values of F apply forthe multiplayer mode.

Mental War: An Attention-Based Single/Multiplayer BCI Game 457

Page 9: Mental War: An Attention-Based Single/Multiplayer …...devices (e.g., Emotiv Epoc and Emotiv Insight). A kind of BCI application that is arising due to the development of new tech-

The blinking of the eye is calculated by the MindWave device as a number rangingfrom 0 to 255, where the higher the value, the stronger the player blinked his/her eyes.As there was no parameter to differentiate the value of an involuntary blink to avoluntary one, empirical tests were made to find the best value for the player tointentionally blink his/her eyes and be recorded as such. The value of 128 was chosenas the default threshold. It was noticed that unintentional blinks had values rangingfrom 40 to 90, approximately. Unlike the attention value, which is updated everysecond, the blink value is updated as soon as the player blinks his/her eyes, so the gamechecks and updates this value every iteration of the main application.

The game also has an embedded log feature, which records data related to the gameand the player. The development of the log feature had the objective of allowingeasiness in conducting scientific research with the game. At the end of the match, thelogger creates two files: one with details about the game in general, such as the players’nickname, the duration of the match, and the total average attention value; and the othercontaining all the raw read values during the entire course of the match. The gameserver also has a logging feature, which logs all events that occurred both in relation tothe game (i.e., the game logger) and the server itself (the server logger).

4 Evaluation

In order to aid in the process of the user interaction design of the game and validate thisdesign, two evaluations with users were conducted, one being of the single playermode, and one of the multiplayer mode. Each evaluation was performed as part of aseries of controlled experiments that aimed at investigating specific aspects of theusers’ interaction with the BCI platform, and consists of the qualitative data gathered inthis process. Every session was recorded using a set of cameras, with the writtenconsent of the participants.

4.1 Procedure and Subjects

The evaluation process was divided into two main steps: the single player evaluationand the multiplayer evaluation. Before each evaluation, pilot tests were also conductedin order to assess key aspects of the implementation, such as bugs, gameplay char-acteristics, general interface issues, as well as qualitative aspects of the interaction.

The first pilot study and evaluation were conducted after the initial release of thegame, in which only the single player mode was available. All evaluation process wasperformed in a closed, climatized and noise-free room, and the matches were all playedin the same computer. This first evaluation was focused on investigating primaryaspects of the players’ interaction with the BCI platform, such as the functionality ofthe basic gameplay elements and the overall satisfaction and motivation of the playerstowards the game.

Single Player Pilot and Evaluation. Themain objective of the single player pilot studywas to test the game with an unbiased player for the first time, as all other tests were madeby the Mental War Dev Team itself. The participant was a 28 years old, male volunteer

458 G. A. M. Vasiljevic et al.

Page 10: Mental War: An Attention-Based Single/Multiplayer …...devices (e.g., Emotiv Epoc and Emotiv Insight). A kind of BCI application that is arising due to the development of new tech-

subject with no previous knowledge of BCI systems. The subject played five consecutivematches of the game in the easy difficulty setting, and was interviewed for observationsand opinions on his recent experience with the platform. This first experience allowedidentifying a number of changes and corrections that needed to be done before theevaluation, such as adjustments on the interface elements that represent the current statusof the headset device and minor balance changes in the pace of the game.

After the changes and corrections from the pilot study, the single player evaluationwas performed with eight volunteer subjects, being seven male and one female, withage ranging from 19 to 26 years. Each subject participated in six individual sessions,and played five consecutive matches in each session. After each match, a shortsemi-structured interview was conducted in order to assess subjective data about thegame experience. Moreover, demographic data and other details about the experiencewere also collected through forms and questionnaires. These questionnaires werecomposed of general questions about the matches, such as which strategies wereemployed, whether the user felt tired, and whether there were any discomforts whileplaying. Figure 5a shows a subject playing during one session of the evaluation.

Following the development of the multiplayer game mode, the second evaluationwas performed. This second study aimed at investigating the multiplayer mode, itsdesign and gameplay, and the subjective experience of the players towards this mul-tiplayer interaction, while considering the interaction with the BCI platform itself. Wealso sought to compare the differences between the collaborative and the competitivegameplay and how would each mode impact in the game experience of the subjects.

Multiplayer Pilot and Evaluation. The pilot session was conducted with two vol-unteer subjects, which played five competitive matches. Both participants were male.After the matches, they filled out a questionnaire about the game experience andanswered a semi-structured interview. As with the pilot study from the first evaluation,the main goal of this study was to validate the multiplayer mode of the game withunbiased players in a real case scenario. The interview was performed with bothparticipants simultaneously, while the questionnaire was individual.

The second evaluation itself followed the same procedure of the pilot study. Sixteenvolunteer subjects, with age ranging from 20 to 32 years, were divided in pairs, andeach pair participated in a single evaluation session. Each of those sessions was con-ducted with the pair of subjects playing either competitively or collaboratively, equallydistributed. Figure 5b shows a pair of subjects playing during the evaluation.

Fig. 5. (a) Single player match; (b) competitive match during multiplayer evaluation.

Mental War: An Attention-Based Single/Multiplayer BCI Game 459

Page 11: Mental War: An Attention-Based Single/Multiplayer …...devices (e.g., Emotiv Epoc and Emotiv Insight). A kind of BCI application that is arising due to the development of new tech-

4.2 Results

Based on the results of the single player mode evaluation, a new development stagebegan aiming to improve the game experience and incorporate new features, especiallythose related to the multiplayer mode. A major change was the representation of themachine player: in the first versions of the game, the computer avatar was representedby a default combination of hair, shirt and pants. This combination confused some ofthe players, as the machine character resembled the human avatar that the playercontrols. The design decision was to have a unique avatar that only the machine playercould use; given the nature of this player, it was represented by a robot character.

To distinguish the difficulty modes, in addition to the background scenario, threemodels were created, one for each difficulty: a green, a yellow, and a red robot, withchanges on the details and the face expressions (Fig. 2). This distinguish was necessaryfor the multiplayer mode, as all players would be in the same scenario regardless ofdifficulty. Some design changes were also made throughout the development of themultiplayer mode as a result of gameplay tests, such as the colors of the interfaceelements and a representing icon for every face and number of players in each team.

The first pilot study has also contributed to the refinement of the game. It wasnoticed that the cursor would still remain in the screen after the game starts, and theuser had to move it away to avoid being distracted by it in the match, especially as thegame requires the user to focus. After the pilot study, the game was modified to hidethe cursor after the game starts in both modes. Another fact that led to adapt the gamedesign was the occasional poor signal received from the headset. If a poor signal isdetected, no attention value is received and the game does not update the player’sstatus. This is particularly hard to notice if the player is not visually focusing on theattention bar at the moment. To avoid this kind of problem, after the first pilot study thetwo status icons were added and were showed even before the game starts. Also, beforethe second evaluation, the game was adapted to automatically pause if the receivedsignals are of poor quality.

After the single player evaluation, the only feature that was not implemented in themultiplayer mode was the blinking attention booster. Although the implementation ofthe blink detection worked fine for the first pilot study, it was noticed during the singleplayer evaluation that this detection hardly worked for different players. As afore-mentioned, the blink signal received from the headset is a number that ranges from 0 to255, and there is no default threshold for distinguishing between a voluntary and aninvoluntary blink. Several threshold values were empirically tested during the devel-opment of the game, such as 90, 100, 128 and 150, with 128 wielding the best results.However, the detection presented several problems during the evaluation, such as thecharges being rapidly consumed unintentionally, or the subject losing a lot of attentiontrying to use the charges and failing to do so, even after several attempts. This led to themajority of subjects giving up on using the feature at all. For this reason, the blinkdetection was not included for the evaluation of the multiplayer mode, as the sameproblems would probably appear in the evaluation process.

The qualitative data from the evaluations also provided important insights about thedesign and development of BCI-based computer games, especially those based onneurofeedback. One of the suggestions that were frequent among subjects was that the

460 G. A. M. Vasiljevic et al.

Page 12: Mental War: An Attention-Based Single/Multiplayer …...devices (e.g., Emotiv Epoc and Emotiv Insight). A kind of BCI application that is arising due to the development of new tech-

game could have more sound effects, as there are just the sounds that indicate whetherthe match has begun or ended. One of the reasons we were cautious about adding morein-game sound effects was the possibility of those sounds impacting in the performanceof the players, as the game is based solely on the attention control signal. It is notknown to which extension background music, for example, could hinder or help theparticipants to concentrate, or whether there would be no effect at all.

The data from the first evaluation also motivated the changes in Eq. (1) thatoriginated Eq. (2) for the multiplayer mode. By using all attention data collectedthroughout the match in the calculation of the resultant force, the duration of thematches tend to increase the more the player maintains his/her attention close to thecomputer player’s average. This also tends to increase the player’s fatigue over timeand, consequently, lower his/her performance and increase his/her level of stress. Thiscan be observed by comparing the average duration of matches from the single playerevaluation and the ones from the multiplayer evaluation: while the single playermatches had an average duration of 90.99 s (SD = 113.2), the multiplayer matches hadan average duration of 56.22 s (SD = 38.5); not taking into consideration that thedynamics of playing against the computer may be different from playing with or againstanother person. This difference can be visualized in Fig. 6(a). After validating Eq. (2)in the multiplayer evaluation (as no subject complained or commented about theduration or the flow of the match), the single player mode was adapted to also employthis equation for the resultant force.

The boxplots in Fig. 6(b) shows the average attention from both game modes.There was no significant difference between the performance of the single and multi-player matches, with the participants in the single player evaluation obtaining anaverage of 53.49 attention (SD = 14.48), while the participants in the multiplayerevaluation obtained an average of 52.42 attention (SD = 13.0).

The data gathered from the multiplayer evaluation served as guideline to the nextdevelopment iteration, which resulted in the game in its current version. There areimprovements that are yet to be discussed based on the opinion of the players, espe-cially regarding the difficulty of the machine players. Initially, the machine playersalways maintained the same average attention on the course of the match. It was soon

Fig. 6. (a) Column bars of match durations from both game modes; and (b) boxplot of averageattention from both game modes.

Mental War: An Attention-Based Single/Multiplayer BCI Game 461

Page 13: Mental War: An Attention-Based Single/Multiplayer …...devices (e.g., Emotiv Epoc and Emotiv Insight). A kind of BCI application that is arising due to the development of new tech-

realized that this approach provided little immersion, as the player was competingagainst a static, fixed value. The static value was soon modified to a variable one, andbalance changes on the values of each difficulty were made accordingly.

With the adaptation of the computer avatar from the default character to a robotone, the animation of the moving status bar was also made to appear more robotic:while the player’s status bar slowly moves towards the new captured value, themachine’s bar moves much faster and then stops at its final location, causing a moreartificial impression to match the character. Players’ had a divergent opinion regardingthe difficulty of the machines: while some stated that the game was actually easy evenin the hardest difficulty, others had trouble defeating the first difficulty of the game.These opposed opinions may be caused by the natural differences in the learning curveof each individual player, which any game is susceptible to.

5 Discussion

This section discusses the main results from both the design and implementation of thegame, and the results gathered during the evaluation of the platform.

Regarding the problems that occurred with the blink detection feature, one possiblereason for the difference between the detection precision between players may be theanatomical differences between their skulls. It is known, for example, that the cali-bration of the device took much longer for some subjects, and had to be adjusted a fewtimes before being able to capture good quality signals. As it is also known that theMindWave device uses artefacts and noise generated by the movement of the blink todetect it, it may be easier or harder to detect this signal for certain players, dependingon their anatomy. With increased precision, this feature could be implemented in themultiplayer version of the game. The initial idea was that, in the multiplayer mode,each player had his/her own three charges, each providing a little individual boost eachtime used. However, in the case of two or three players, this boost could becomeinsignificant when the player’s individual attention would be averaged with the others’attention. The second idea was to provide one blink charge for each player, with allcharges displayed in the team’s side for both teams. Using each individual chargewould produce no bonus; however, when all players of the same team had used his/herindividual charge, the whole team would gain the attention boost. This could create amore collaborative use of the feature.

After the development of the final version of the game and player tests, onequestion that arose based on the users’ interaction was the employment of a fullBCI-based game control. Although the game was intended to use only BCI control, thegameplay tests showed that players usually try to perform other actions other thanfixing the gaze at the screen, in order to passively increase their attention. In this case,in which the attention of the player is employed to directly control the game, it wouldbe interesting to also have a complementary control to increase the immersion of theplayer with the game. This hybrid control scheme could use the cognitive state of theplayer as a passive control: a higher cognitive status could unlock new features, healthe player or change the weather, for example, as shown in some of the related games

462 G. A. M. Vasiljevic et al.

Page 14: Mental War: An Attention-Based Single/Multiplayer …...devices (e.g., Emotiv Epoc and Emotiv Insight). A kind of BCI application that is arising due to the development of new tech-

in the literature. This way, the use of the hybrid system could increase the player’simmersion without jeopardizing the gameplay.

The developer must also take into consideration the total duration of the gamematch while developing a neurofeedback game. Player tests showed that, after playingmultiple matches or a match with long duration, the performance of the players quicklydrops and takes a couple of minutes to recover. This mental fatigue effect can beavoided by giving either a limited duration to the match (i.e., a time limit) or forcing aminimum interval between consecutive matches. The size of the sliding window thatcalculates the average cognitive value must also be taken into consideration in thiscase, as a match without time limit, using the whole duration of the match to calculatethe average (given that a value is given every second) could easily last for a long time.If the game win/lose condition is to reach a certain threshold or maintain the averageabove or below a certain value for a given amount of time, the choice of the windowsize will greatly impact both the results and the duration of the matches.

The size of this sliding window, in the case of the Mental War, was defined astwenty, after a series of empirical tests. It was noticed that the average value couldeasily become stagnated when using the values from the full time of the match tocalculate the result. Although this sliding window size has shown good results forstabilizing the average while allowing for it to change relatively quickly, the developermust try to find an adequate size according to the intended application. The full rangeof values may be adequate for a considerably short game or task duration, but thegeneral tendency is that the value stabilizes at some point in time.

Regarding the difficulty of the game, based on the evaluation of the single playermode and the opinion of the subjects, it appears that a possible more adequate (yetmore complex) solution would be to adapt the game difficulty according to the per-formance of the player. The game could maintain an individual player profile with dataabout past games, and adapt the difficulty of the machine players accordingly. Anotheradaptation, as suggested by the subjects, would be to increase the variation of theattention values generated by the machine: in the current version, the machine alwaysgenerates values in the same interval. The proposed idea is to start at a base, lowervalue and slowly increase the generated attention value until the arriving at the currentinterval. Of course, for the multiplayer machine players, the game could still use thefixed interval for the generated valued, as combining the data from multiple players tocreate a fair challenge could be unfeasible.

As for the validation of the platform itself, it appears that the game was indeedentertaining and fun, based on the subjects’ opinions. All subjects stated that theywould play the game again for training their attention. Although this opinion may bebiased with a possible novelty effect caused by the BCI platform, we are positive thatthe game could be largely used for both entertainment and training purposes. Also, asthe game is made available both for download and modification with its open-sourcecode, we are confident that it could also be employed for future BCI experiments, as thelog feature allows for easily collecting data from the subjects, and the game can beadapted to employ other control signals, even with another BCI device, according tothe objectives of the research.

Mental War: An Attention-Based Single/Multiplayer BCI Game 463

Page 15: Mental War: An Attention-Based Single/Multiplayer …...devices (e.g., Emotiv Epoc and Emotiv Insight). A kind of BCI application that is arising due to the development of new tech-

6 Conclusion

In this paper, the Mental War software was presented and discussed. Mental Warallows users to play the game using their level of attention, captured and processed by aNeuroSky MindWave headset, pulling other players in a game of tug-of-war. The gameis available in three modes, allowing the user to play a solo match against the machine,against other players in a competitive mode or together with other players in thecollaborative mode. Two evaluations were performed in order to access qualitative datafrom the subjects regarding their interaction with the game, both in single player andmultiplayer modes. The data obtained from the evaluations allowed to further developthe game and, mainly, validate its design and implementation in a controlled envi-ronment with external players. These results may help developers with the developmentof future BCI-based games, while the platform itself can be employed to conduct futurescientific research in the field.

Acknowledgments. This work was supported by the Physical Artifacts of Interaction ResearchGroup (PAIRG) at the Federal University of Rio Grande do Norte (UFRN), and partially fundedby the Brazilian National Council of Scientific and Technological Development (CNPq), undergrants 130158/2015-1 and 146931/2017-3. We also would like to thank by resources of thePAIRG’s Laboratory of Physical and Physiological Computing (PAIRG L2PC) at UFRN, andthe subjects who volunteered to participate in the evaluation of the Mental War.

References

1. Bento, A.A., de Miranda, L.C.: Steering all: infinite racing game controlled by haar cascadethrough OpenCV. In: SVR 2015, pp. 245–254. IEEE (2015)

2. Bingham, P.M., Bates, J.H.T., Thompson-Figueroa, J., Lahiri, T.: A breath biofeedbackcomputer game for children with cystic fibrosis. Clin. Pediatr. 49(4), 337–342 (2010)

3. Bonnet, L., Lotte, F., Lécuyer, A.: Two brains, one game: design and evaluation of amultiuser BCI video game based on motor imagery. IEEE Trans. Comput. Intell. AI Games5(2), 185–198 (2013)

4. Crawford, C.S., Andujar, M., Jackson, F., Remy, S., Gilbert, J.E.: User experienceevaluation towards cooperative brain-robot interaction. In: Kurosu, M. (ed.) HCI 2015.LNCS, vol. 9169, pp. 184–193. Springer, Cham (2015). https://doi.org/10.1007/978-3-319-20901-2_17

5. DelPozo-Banos, M., Travieso, C.M., Weidemann, C.T., Alonso, J.B.: EEG biometricidentification: a thorough exploration of the time-frequency domain. J. Neural Eng. 12(5),056019 (2015)

6. Eid, M., Issawi, A.E., Saddik, A.E.: Slingshot 3D: a synchronous haptic-audio-video game.Multimedia Tools Appl. 71(3), 1635–1649 (2014)

7. Ferreira, A.L.S., Marciano, J.N., de Miranda, L.C., Miranda, E.E.C.: Understanding andpro-posing a design rationale of digital games based on brain-computer interface: results ofthe AdmiralMind battleship study. SBC J. Interact. Syst. 5(1), 3–15 (2014)

8. Ferreira, A.L.S., de Miranda, L.C., Miranda, E.E.C., Sakamoto, S.G.: A survey of interactivesystems based on brain-computer interfaces. SBC J. 3D Interact. Syst. 4(1), 3–13 (2013)

464 G. A. M. Vasiljevic et al.

Page 16: Mental War: An Attention-Based Single/Multiplayer …...devices (e.g., Emotiv Epoc and Emotiv Insight). A kind of BCI application that is arising due to the development of new tech-

9. Gervasi, O., Magni, R., Macellari, S.: A brain computer interface for enhancing thecommunication of people with severe impairment. In: Murgante, B., et al. (eds.) ICCSA2014. LNCS, vol. 8584, pp. 709–721. Springer, Cham (2014). https://doi.org/10.1007/978-3-319-09153-2_53

10. Hazrati, M.K., Hofmann, U.G.: Avatar navigation in second life using brain signals. In:WISP 2013, pp. 1–7. IEEE (2013)

11. Kos’myna, N., Tarpin-Bernard, F.: Evaluation and comparison of a multimodal combinationof BCI paradigms and eye tracking with affordable consumer-grade hardware in a gamingcontext. IEEE Trans. Comput. Intell. AI Games 5(2), 150–154 (2013)

12. Laar, B., Gürkök, H., Bos, D.P.O., Poel, M., Nijholt, A.: Experiencing BCI control in apopular computer game. IEEE Trans. Comput. Intell. AI Games 5(2), 176–184 (2013)

13. Liarokapis, F., Vourvopoulos, A., Ene, A.: Examining user experiences through amultimodal BCI puzzle game. In: iV 2015, pp. 488–493. IEEE (2015)

14. Maby, E., Perrin, M., Bertrand, O., Sanchez, G., Mattout, J.: BCI could make old two-playergames even more fun: a proof of concept with “connect four”. In: Advances inHuman-Computer Interaction 2012, pp. 1–8 (2012)

15. Marshall, D., Coyle, D., Wilson, S., Callaghan, M.: Games, gameplay, and BCI: the state ofthe art. IEEE Trans. Comput. Intell. AI Games 5(2), 82–99 (2013)

16. de Miranda, L.C., Hornung, H.H., Baranauskas, M.C.C.: Adjustable interactive rings foriDTV. IEEE Trans. Consum. Electron. 56(3), 1988–1996 (2010)

17. de Miranda, L.C., Hornung, H., Pereira, R., Baranauskas, M.C.C.: Exploring adjustableinteractive rings in game playing: preliminary results. In: Marcus, A. (ed.) DUXU 2013.LNCS, vol. 8013, pp. 518–527. Springer, Heidelberg (2013). https://doi.org/10.1007/978-3-642-39241-2_57

18. Schwarz, D., Subramanian, V., Zhuang, K., Adamczyk, C.: Educational neurogaming:EEG-controlled videogames as interactive teaching tools for introductory neuroscience. In:AIIDE 2014, pp. 49–52. AIII (2014)

19. Vasiljevic, G.A.M., de Miranda, L.C., Miranda, E.E.C.: A case study of MasterMind chess:comparing mouse/keyboard interaction with kinect-based gestural interface. In: Advances inHuman-Computer Interaction 2016, 10 p. (2016)

Mental War: An Attention-Based Single/Multiplayer BCI Game 465