Designing a Brain-Computer Interface to Chess Hermen Toersche h· a· toersche@student· utwente· nl ABSTRACT Brain-computer interfaces (BCI) offer an additional communication channel, which may be applied to control a chess game. This paper describes the design of a brain-computer interface to chess based on a 8 × 8 P300 speller. The system encodes a move in the chess game as selecting a start and a destination position on the chess board. Most of the design can be implemented using existing hardware and software. Move selection is expected to take about 30 seconds per move at over 95% accuracy. with almost no time constraints can be used. Most turnbased games require little user input and coarse limits are imposed on the time required to perform the input. A possible suitable candidate is chess. Chess is a ‘slow’ game, requiring user input only after extensive elaboration of the move to make. Multiple open source implementations are available, allowing for extension without having to program a complete game. 2. Keywords Brain-computer interface (BCI), chess, electroencephalography (EEG), P300, BCI2000. 1. INTRODUCTION The locked-in syndrome (LIS) is a collective name for brain conditions which cause patients to lose control of the abilities to move and speak, while leaving the mind intact. To help LIS patients, brain-computer interfaces (BCI) have been developed. A brain-computer interface allows a person to communicate with the computer without performing a physical action, such as dragging a mouse or pressing a button. Instead, brain activity is measured and interpreted. Most current BCI systems are based on noninvasive electroencephalography (EEG) measurements, reaching information transfer rates in the order of tens of bits per minute. Currently, BCI is still used as a ‘last resort’ input channel, which can be applied when all else fails. PROBLEM STATEMENT Almost all current BCI designs are targeted at disabled individuals [MBF+ 07]. This focus has caused that most BCI applications are aimed at providing a prothesis for rehabilitation purposes. When cost and effort to use a BCI decline, a brain-computer interface may also become of interest for healthy individuals. Games may be used to explore how BCI can be used by healthy people. The chess game is an application that is also of interest for healthy individuals. The main problem addressed in this paper is the design of a BCI-controlled chess application: How can a brain-computer interface be designed to control a chess game? In order to determine the usefulness of the designed system, the following questions should also be answered: • How much time does it take to make a move? While initially developed for the disabled, BCIs may also be used by healthy individuals to replace normal input devices. For instance, BCI is gaining attention from the gaming research community. Brainball has demonstrated that BCI can be applied for games [HB00]. Experiments have been performed with control tasks such as balancing a virtual character on a tightrope in an immersive 3-D environment [LKF+ 05]. Aside from control tasks, the EEG signal may be used to monitor the affective state of an user. BCI control in gaming applications is generally aimed at augmented control by healthy persons. To deal with the low information transmission speed provided by current BCI technologies, a turn-based game model Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission. 7th Twente Student Conference on IT, Enschede, June 25th , 2007 Copyright 2007, University of Twente, Faculty of Electrical Engineering, Mathematics and Computer Science • How reliable can moves be communicated? 3. BRAIN-COMPUTER INTERFACES Brain-computer interfaces are a relatively new kind of computer input devices. Therefore, knowledge about the principles and functioning are not yet widely dispersed. This section provides a glance at important aspects of BCI technologies. 3.1 Brain wave acquisition Brain-computer interfaces need an interface from the brain to the computer. To enable ‘mind control’, the computer must know what is going on in the mind of the subject by using some biorecording technology. Several biorecording technologies exist, each with their own characteristics with relation to spatial resolution, temporal resolution, cost, and risk [HD06]. Electroencephalography (EEG) is a non-invasive biorecording technology, which measures electrical activity of the brain using electrodes [Wika]. EEG has low spatial resolution, high temporal resolution, relatively low cost and minimal risk. Due to these properties, EEG is the most used medium for BCI [MBF+ 07]. A major disadvantage of EEG is its susceptibility to background noise, reducing information transfer rates to 5–25 bits per minute [WBH+ 00]. 3.2 P300 speller One of the earlier brain-computer interfaces is the EEGbased P300 text speller by Farwell and Donchin [FD88]. The P300 speller is based on the P300 component of the eventrelated brain potential. The human brain emits a P300 peak when an event occurs that is task relevant or novel [Wikb]. This peak can be detected using EEG. The P300 speller presents a 6 × 6 matrix containing the letters of the alphabet and control commands. The user is instructed to focus on a letter and to keep a running mental count of the number of times it flashed. The system will consecutively flash the rows and columns of the matrix (see Figure 1). When the row or column containing the focused letter is flashed, the subject’s brain will emit a P300 peak, because counting the number of flashes makes the occurred flash task relevant. a time. According to Farwell and Donchin, “it is also obvious that the process would be unacceptably slow” [FD88], because it needs 6 × 6 = 36 instead of 6 × 2 = 12 flashes to cover all matrix items. However, the amplitude of the P300 decreases when stimulus frequency increases, so the row/column speller needs to average more trials than the cell speller to reliably determine the selection. 3.4 BCI 2000 BCI 2000 is a general purpose brain-computer interface research and development platform. The framework offers modules to perform common BCI tasks, such as signal acquisition, signal processing and data analysis. Several sample user applications are provided, such as a P300 speller and a cursor movement task [SMH+ 04]. The modules of the framework are loosely coupled, allowing components to be interchanged without affecting other parts of the system. This approach allows new components to be added and tested in a systematic manner. Also, components can be reused in other projects. BCI 2000 is in use by about 50 groups worldwide [SMK+ 05]. Ideally, the system could determine which letter was focused after all rows and all columns have been flashed once by choosing the row and column with the strongest P300 response. Due to the low signal-to-noise ratio of EEG, multiple trials of row and column flashes need to be averaged to reliably detect the P300 peak. The original P300 speller allows subjects to accurately spell at a rate of 2.3 characters per minute [FD88]. In a reimplementation of the P300 speller using modern components, healthy subjects could spell at a rate of 4.3 characters per minute at 95% accuracy [DSW00]. One of the main advantages of the P300 speller is that minimal training is required to use the system. In contrast, the Thought Translation Device takes months of training to achieve 75% accuracy for binary choices [BKG+ 00]. The disadvantage of the P300 speller is the questioned usability for locked-in patients [DSW00]. Vision problems are common with LIS patients, as horizontal gaze control is often lost [PG86]. 3.3 P300 cell speller According to [GTW04], a cell speller will increase spelling performance significantly compared to the Farwell-Donchin row/column speller. The P300 cell speller is the same as the classic P300 speller, except that it highlights one letter at A G M S Y * A G M S Y * B H N T Z * B H N T Z * C I O U * * C I O U * * D J P * SP D J P * SP E K Q W * BS E K Q W * BS F L R * F L R V X * V X * * 3.5 Chess BCI Building a brain-computer interface to chess has already been attempted by Samuel Inverso [Inv04]. His selection of the chess domain was, among other reasons, motivated by a collaboration with researchers at the Institute of Medical Psychology and Behavioral Neurobiology (IMPBN) at the University of Tübingen: one of their patients had requested an interface to play chess using the Thought Translation Device [BKG+ 00]. The attempt to build the chess BCI has halted due to hardware failure. 4. REQUIREMENTS 4.1 BCI requirements A chess application does not justify implanting BCI hardware. Therefore, the system must use noninvasive BCI, except when an invasive BCI system is already available. 4.2 Application requirements Inverso has identified the following requirements for a chess BCI during his collaboration with the researchers at the Institute of Medical Psychology and Behavioral Neurobiology (IMPBN) at the University of Tübingen (section 3.5; [Inv04]): 1. Play chess against the user at various levels of expertise. 2. Allow the user to play against a human using the same computer. 3. Allow the user to play against a human across a network, preferably interfacing with an online chess program such as www.chessclub.com. 4. The program must interface with the user’s current brain-computer interface (BCI2000). Figure 1: Row flashes (left) and column flashes (right) in the P300 speller. Based on [FD88]. 5. The chess application must run under Windows and interface with Borland C++ Builder 5.5 code. Figure 2: Chess column flash. Edited screen capture from [Man03a]. Figure 3: Chess cell flash. Edited screen capture from [Man03a]. For research purposes, most of these requirements may be dropped. However, a system satisfying these requirements is more useful than one that does not. flashed and at most 27 destination cells have to be flashed. Also, the P300 emitted by counting the number of flashes of a cell is larger for 16 cell flashes than for 8 row and 8 column flashes, because the stimulus frequency is twice as low, reducing the number of trials needed for the cell speller. 4.3 System design It must be possible to distribute parts of the system to separate computers in order to distribute resource load. The modules of the system should communicate using ubiquitous protocols. The modules should be loosely coupled to allow for replacement of individual components without affecting other parts of the system. 5. CONCEPTUAL DESIGN 5.1 BCI input paradigm In this paper, I will focus on the P300 speller paradigm (section 3.2; section 3.3). The P300 row/column speller has been researched relatively well, and software and procedures exist to leverage the P300 response. A design based on the P300 cell speller is also described, as it is almost the same as the row/column speller. 5.2 P300 row/column speller In the traditional Farwell and Donchin P300 speller [FD88], the user can select a character from a 6 × 6 matrix (see section 3.2). The 6 × 6 matrix can be replaced with a 8 × 8 matrix [AP03]. A chess move can be composed by successively selecting a source and a destination cell on the chess board. Figure 2 shows flashing column d. Generally, the number of cells that need to be flashed is lower than the 16 row/column flashes. Increasing the likelihood of a relevant flash (which will happen when fewer stimuli are displayed) reduces the strength of the P300 emitted in a trial [FD88]. It may be necessary to intentionally insert ‘useless’ flashes to increase P300 response for valid cells, especially in the destination selection phase. Often, only a few destination positions are valid. The number of trials required for a sufficiently reliable P300 response must be adjusted to the number of flashes per trial. A source cell flash is shown in Figure 3. 5.4 High-level design The high-level design of the system has the following components: • Chess game • Chess board view • P300 BCI • BCI ↔ chess logic Using this method, most of the 8 × 8 = 64 offered options are invalid moves. At most 16 pieces may be moved by the player, and a piece may move to at most 7 × 3 + 6 = 27 positions (queen at d4, e4, d5 or e5). This redundancy can be taken advantage of to increase reliability, as invalid moves may be discarded. The high-level design of the system is depicted in Figure 4. game state chess game 5.3 P300 cell speller Use of the P300 cell speller (see section 3.3) may significantly reduce the amount of time needed to make a move. A straightforward cell speller would successively offer 64 source positions and 64 destination positions. By only flashing valid cells, at most 16 source cell positions have to be request flashes BCI ↔ chess logic move P300 BCI EEG selected field chess board view flashes Figure 4: High-level system design 5.4.1 Chess game The chess game component should manage the general game flow. It assigns turns to the players, and it performs the moves offered by the players on the chess board. 5.4.2 Chess board view The chess board view displays the state of the game. Also, it displays the flashes commanded by the P300 BCI. 5.4.3 P300 BCI The P300 BCI component performs the P300 speller selection procedure. It picks a flash sequence, commands the chess board view to display the flashes and analyzes EEG input to determine which cell has been focused. 5.4.4 BCI to chess logic The BCI ↔ chess logic component connects the P300 BCI to the chess game. Requests for a move from the BCI player by the game are translated to cell selection requests for the P300 BCI. The selected cells will be offered as moves to the chess game. 5.5 Control flow When the player gets their turn, the player is given some time to determine which move to make. After that, the system requests the P300 module to flash the source cells on the chess board (see section 3.2; section 3.3). The P300 module will report which cell has been focused by the player. If the selected cell does not contain a piece which may be moved, the input procedure is repeated. If the selected cell contains a piece which may be moved, the destination cell can be selected analogously. The system will compose the selected source and destination cell into a move, which will be performed in the game. 5.6 Timing In order to determine which move to make, a chess player needs time to think. The amount of time taken may vary greatly, depending on factors such as player experience, the presence of time control and the situation on the board. When using a BCI system that is not self-paced (for more information on temporal control paradigms, see [MBF+ 07]), such as the P300 speller, it is unclear at what time the system should offer the opportunity to communicate a move. There are several approaches to work around this limitation. The not self-paced BCI may be extended with a self-paced BCI. The player can request to perform a move using the additional BCI. For example, the user can imagine repetitive hand movement [BDK+ 06] to indicate the intention to make a move. This approach would require multiple BCI applications to be activated in succession, preferably using the same BCI hardware. It is unclear whether this is currently possible. Instead, the available time per move may be limited to a fixed quota. Using this approach, the offered time can be either too much or too little. When too much time is offered, the user has been able to choose the desired move, but time is wasted while waiting for the start of the move selection procedure. When insufficient time is offered, the move selection procedure is initiated before the user can choose a move. When suddenly confronted with the selection procedure, the player may be unable to choose any adequate move at all. The problem of offering insufficient time may be alleviated by reporting the amount of available time to the player. The player may adapt the decision process to the available time. The time reporting mechanism should be inobtrusive in order not to break the player’s concentration on the chess game. The time left for the current move could be reported in a way similar to how the remaining game time is reported. After this time has passed, the player may opt to extend the move choice time by selecting an explicit option to do this in the move selection procedure. This option can be offered as a separate field outside the chess board view. However, such an out-of-board button increases complexity of the selection procedure for the P300 row/column speller. The row/column speller would need to handle it separate from the rest of the board fields, as the button does not have a row/column position. The straightforward solution to this problem is to extend the chess board to a 9 × 9 grid. One or more of the new fields may be used to offer the ‘more time’ option. While effective, this solution will increase the time needed to select a move. Most of the fields on the chess board are empty (at least 64− 2 × 16 = 32 fields), and therefore not valid as fields to start a move. One of these fields may be replaced with a ‘need more time’ button. For the row/column speller, this solution increases selection speed compared to both the ‘extra field’ and the 9 × 9 grid solution, because no extra fields have to be flashed, while being only slightly more complex than the 9 × 9 grid solution. For the cell speller, an out-of-board button is not a significant problem. The ‘need more time’ button could be offered at the place where the remaining move choice time is reported. The offered time should be adapted to the player and the board state. A slow player would ‘need more time’ for every move and a fast player would have to wait needlessly. Also, it will generally offer too much time for obvious moves and not enough time for difficult moves. Note that determining the time needed to choose a move is not an issue in self-paced brain-computer interfaces. The user can simply start performing the move. 6. SYSTEM DESIGN This section provides a lower level design of the the braincomputer interface system design described in section 5. The system is designed to use off-the-shelf components wherever possible. Figure 5 shows a diagram of the system design. 6.1 Module communication Direct connections between modules should be avoided to limit module dependencies. A bus-based approach can solve this problem. All modules connect to a bus where messages can be posted, which will be received by all connected Care should be taken to limit the size of the messages, as IRC message length may not exceed 512 bytes [OR93]. This is not expected to become a problem. proxy engine moves, game flow WinBoard 6.2 flashes message bus flash proxy text ticker EEG device driver server chess game model BCI ↔ chess logic BCI2000 P3AV task external API Chess game The chess game logic can be offered by an existing chess application. The chess game application must be either open source or extensible to allow necessary modifications to be made. The game should preferably be written in Java, as this is the main programming language taught to CS/HMI students at the University of Twente. However, no suitable Java chess game implementations satisfying all of the application requirements (see section 4) seem to exist. BCI2000 proxy Figure 5: Chess BCI system design modules. The bus will not be used for high volume traffic, although latency should be minimal. 6.1.1 Medium choice UDP is not suitable as a bus medium, because it does not guarantee reliable message delivery when messages are sent between computers. Losing a message may deadlock the system, as control commands may get lost. TCP would be a suitable candidate. Clients for this protocol are widely available, both as programming libraries (POSIX sockets) and as standalone applications (PuTTY). Instead of TCP, I propose IRC as the module communication medium. IRC is built on top of TCP, and provides communication at a higher abstraction level. Clients can post messages in channels. All clients who have joined the channel (except the sender) will receive the message. IRC is successfully used to control applications for malicious purposes in botnets. The IRC protocol is described in [OR93]. Clients for IRC are widely available, both as programming libraries and as standalone applications. Server software is available, too. The server should be run on a nearby computer to reduce latency. As the communication channel will be used to transfer user interface commands linked to BCI input, latency should not exceed 10 ms. 6.1.2 Protocol The connected modules can send and receive messages in the following plain-text format: GNU WinBoard [Man03a] is a mature, free and open source Windows chess client written in C. It allows players to play against a human player, the computer or a network player on an internet chess server. This chess program satisfies most requirements, except that it does not yet offer a BCI interface. The XBoard protocol is the de facto standard chess engine protocol [Man03b]. The protocol connects chess AI engines (such as GNU Chess and Crafty) to chess front-end applications (such as WinBoard and Arena). The system can offer an XBoard-compatible chess engine, to which the chess application can connect to receive move commands and to exchange game flow information. This is the same approach as followed by [Inv04] to communicate moves to the chess application. For the P300 interface (described in section 5.2), a graphical view on the board must be provided to display field highlights. WinBoard already provides a chess board view, which can be modified. The modified version should accept flash commands from the BCI. The flash commands could be communicated using a modified version of the XBoard protocol through the proxy chess engine. A disadvantage of this approach is that it ties the capability to flash cells on the chess board to a chess engine being connected. This may not always be the case, for example in WinBoard’s View or edit game files mode, which mode may be useful for training purposes needing predefined board positions. 6.3 BCI connection The system will use BCI 2000 for BCI input (see section 3.4). Using BCI 2000 allows reuse of others’ components and vice versa. Most of the design, however, does not depend on BCI 2000. It is only used for acquiring input and to perform signal processing. command (hspacei parameter)* This format is a compromise between human and computer readability. Using a human readable format facilitates debugging. The commands can relatively easy be interpreted using statements such as strtok, strcmp and atoi (or the equivalents in programming languages other than C). Also, the format is platform independent. Performance problems related to interpreting the text messages are not expected, as the communication channel is not used for high-volume traffic. 6.3.1 P300 input The BCI 2000 project provides a P300 I/O and processing module [HMMS05]. The module could be used to present the chess board for move selection. In order to use the P300 stimulus output functions, the stimulus board images need to be generated on run-time, as generating images for all possible board configurations is intractable. The system may also present a matrix that does not show the chess pieces on the board. When not showing the chess pieces, the user may accidentally choose the wrong positions as the player cannot verify the positions on the board. These problems can be worked around by displaying the flashes with an external view. The view is described in section 6.2. The internal stimulus display view from BCI 2000 is hidden from the user. The StimulusCode will be transported by the BCI 2000 proxy (section 6.3.2) to the chess view. 6.3.2 BCI 2000 proxy BCI 2000 offers an external application interface to communicate with existing systems that are not integrated with BCI 2000 [MS06]. The external interface can be connected to the chess framework with a module that converts UDP packets to IRC messages and vice versa. To prevent namespace clashes, messages from and to the BCI 2000 proxy should be prefixed with bci2000. The BCI 2000 external interface is also used by Brain Dasher [Wil06]. 6.4 BCI chess logic The BCI chess logic module (BCLM) links the components together to a chess BCI application. 6.4.1 Chess game When the proxy XBoard engine gets his turn (i.e., the other player has moved), it should report that it is the BCI player’s turn. The BCLM then knows that the player move procedure should start. To communicate this to the user, the text “Please choose a move...” will be presented on a virtual text ticker. The text ticker may also be used to present the amount of time left to choose a move. When time to choose a move is over (or the user has indicated to start a move), the text “Focus on the piece to move, and count the number of flashes” should appear for 3 seconds. After that, BCI 2000 must be instructed to present flashes. BCI 2000 will eventually respond with a SelectedStimulus. The SelectedStimulus must be converted to a board position. If the board position is not valid as a start position, the user should be notified (“No piece at selected position / Piece at selected position cannot be moved. Please try again.”), and the selection procedure should restart after a few seconds. If the player made a mistake (e.g. thinks that a certain move is allowed while it’s not), the player can get additional time by selecting the ‘need more time’ option in the next try. When a valid piece has been selected, this piece must be marked, and a destination position can be selected (“Focus on the destination for this piece, and count the number of flashes”). The interface should also offer a ‘cancel start position’ option to undo the start piece selection when the user sees that wrong piece is marked as the start piece. The ability to cancel the start position will reduce the move error rate. 6.4.2 Chess logic BCLM needs to have some knowledge about the rules of chess. The module has to know which moves are allowed in order to restrict the positions flashed and to validate whether the selected positions comprise a valid move. An obvious way to obtain such information is to consult a chess engine. 7. EXPERIMENT SETUP In order to judge how useful the designed system is, the performance of the system needs to be determined. As the system has not yet been fully implemented, experiments with the chess BCI are not possible at the time of writing. The setup of experiments to determine the time to make a move and move accuracy will be described here. Estimates of the results for the experiments are reported in section 8. 7.1 Time per move In a visual P300 BCI, the time needed to select a field on the board can be calculated. The following formula may be used to determine the time needed to select a field: tselect = overhead + #trials × ITI The number of trials can be varied freely. The inter-trial interval (ITI) is limited by the inter-stimulus interval, the number of stimuli per trial and the analysis epoch (see section 3.2. Normally, a move can be selected in 2 × tselect . However, undo mechanisms may increase time required per move, as users may correct input errors. Correcting a start position error using the ‘cancel start position’ button in the destination selecting interface (see section 6.4.1), or accidentally selecting this button, takes an additional 2×tselect . Selecting an invalid positions costs 1 × tselect . The input time per move may be measured as follows. A subject plays chess games using several parameter configurations. For each move, the intent to make a move can be signalled by overt means to the operator. A locked-in patient may use a vertical eye movement pattern or blinking for this [BGR79]. The move selection time ends when destination field selection has finished. 7.2 Move accuracy Field selection accuracy cannot be determined in the same manner as field selection time, because it relies on the subject’s P300 response strength. Due to the undo mechanism, move selection errors are essentially reduced to the errors made in the destination selection procedure. There are two types of errors for this application: input ermove errors errors ) and move selection errors ( selected ). rors ( selected fields moves Input errors may lead to move selection errors. The error rates can be measured during the same experiment which measures the time needed per move. The subject has to report errors to the operator to allow errors to be measured. The subject should do this immediately after the move selection (in the opponent’s time) in order not to disturb the move input process. For a locked-in subject, a protocol needs to be established to report errors, similar to how the time of intent to move is determined in the part of the experiment that measures move time. 8. EVALUATION 8.1 Time per move The P300 row/column speller [DSW00] can communicate 4.3 items per minute from a grid with 36 items at 95% accuracy. Using the conclusion of [AP03] that matrix size does not affect performance, the communication speed for the chess board is: log2 36 4.3 items/min36 = × 4.3 = 3.71 items/min64 log2 64 Communicating a move would take a little more than 2 × 60 = 32.35 seconds, not taking erroneous input or error 3.71 correction into account. Errors should not significantly affect average move time, as the error rate is 5%. The cell speller claims to need 13 seconds to achieve 95% accuracy on the 36-cell board [GTW04]. At most 16 pieces may be moved by the player, and a piece may move to at most 27 positions (see section 5.3). Therefore, the start and destination position may be ‘picked’ out of the 36 available positions to be flashed. Not taking thinking time into account, selecting a move would take less than 2 × 13 = 26 seconds. Because the number of selectable positions is generally far less than 36, performance should be enhanced even further. How much performance is improved is unknown and move-dependent. 8.2 Move accuracy Using the aforementioned error correction mechanisms and an accuracy level of 95% for position selection, the chance of selecting the wrong start position is minimal. The chance of selecting the wrong destination position is less than 5%, as the erroneous position selected may be an illegal position if those are offered. 9. DISCUSSION 9.1 Time control Due to the slow communication speed of current noninvasive BCI technology, time control in chess games should be disabled when playing with BCI-enabled players. At many chess tournaments, time control is obligatory [dE]. Time control is also often used in online chess games. It would be unfair to reduce the available time because the input device is slower. It may be possible to design a technology similar to Timeseal. Timeseal is an application that records the player’s thinking time, so that network transmission time is not penalized [Kno95]. The move selection time should not be subtracted from the clock. 9.2 Adaptive behaviour So far, the BCI interface is minimally adapted to the current state of the board. The only information used is the current piece positions and where those pieces are allowed to move. The interface may be improved by incorporating knowledge about the move decision process. 9.2.1 Leaking information When incorporating game knowledge (obtained using artificial intelligence), care must be taken not to leak this information to the user. For example, the player may find out that a move where a lot of thinking time is offered is more important than a move where little time is offered. Exposing such information may reduce game entertainment and violates internet chess server usage policies. To register at FICS (Free Internet Chess Server), one of the largest internet chess servers, you have to agree that “I will at no time receive assistance during my games” [Ser]. 9.2.2 Move choice time As stated in section 5.6, the move thinking time should be adapted to the game state, the chess playing skills and the style of the player. However, care must be taken not to leak information about the current move to the player. The system may use information about the history of the game to adapt its behaviour, as this information is already known by the player. The ‘need more time’ mechanism provides feedback on the chosen time quota. If the player needs more time, the chosen amount of time was not enough. The system should increase the amount of time offered in order to reduce the number of ‘need more time’ requests, improving efficiency. If the player does not need more time, the chosen amount of time was sufficient or too much to make a choice. The system can increase efficiency by gradually reducing the amount of time offered. Gradually reducing the amount of time offered may train the chess player to increase decision speed. 9.2.3 Move selection For move selection, the probability of moves over the game board could be used to enhance the interface. However, the issues related to leaking information apply even more directly. The system may not suggest moves, or flash expected rows/columns or cells more or less often than others. Such behaviour would allow an observant player to discover which moves the AI suggests. The AI move suggestions can, however, be used to reduce input errors. As a rather extreme example, it is much more likely that the player wants to make a move that checkmates the opponent than a move which gives away the queen. The information could be used to nudge the P300 signal processing to increase the chance of actually selecting the right move when the player intends to make the right move. This approach only works when the moves found by the AI and the moves performed by the player match. A novice will almost always play suboptimal moves, so when the signal processing procedure is instructed to prioritize good moves, accuracy is actually reduced. The same applies to players who make better moves than the AI [Rii06]. To repair this problem, a comparison should be made between the moves made by the player in the past and the moves that the AI suggested. The significance of the predicted moves should accordingly be adapted. The moves made by the player could also be used as a reference point to adjust chess engine parameters such as search depth. 10. CONCLUSION A brain-computer interface to chess has been designed. The moves for the chess game can be encoded by selecting a source position and a destination position. The source and destination positions can be selected using a 8 × 8 P300 speller. Considering the input device limitations, the system is expected to perform reasonably well. Not taking thinking time into account, a player is expected to be able to select a move at high accuracy in about 30 seconds, and probably even less. Needing 30 seconds to make a move is a lot compared to doing it by hand, but the BCI may be the only input device available to the user. As the system is designed based on existing hardware and software, implementation of the system should be possible in the short term. In the future, the chess system may be adapted to support other BCI input mechanisms. The player could, for example, move a piece using 2-D continuous cursor control [FMWP04] or by making a sequence of binary choices [BKG+ 00, BDK+ 06]. The chess domain may also be used to experiment with new BCI input methods. It would be interesting to test whether thinking about ‘pushing’ chess pieces to the desired position provides adequate EEG data to select a move. Assessing the speed of a P300-based brain-computer interface. IEEE Transactions on Rehabilitation Engineering, 8(2), June 2000. [FD88] [FMWP04] G.E. Fabiani, D.J. McFarland, J.R. Wolpaw, and G. Pfurtscheller. Conversion of EEG activity into cursor movement by a brain-computer interface. IEEE Transactions on Rehabilitation Engineering, 12(3):331–338, June 2004. [GTW04] Cuntai Guan, Manoj Thulasidas, and Jiankang Wu. High performance P300 speller for brain-computer interface. In IEEE International Workshop on Biomedical Circuits & Systems, December 2004. [HB00] Sara Ilstedt Hjelm and Carolina Browall. Brainball – using brain activity for cool competition. In Proceedings of the First Nordic Conference on Human-Computer Interaction, October 2000. [HD06] Leigh R. Hochberg and John P. Donoghue. Sensors for brain-computer interfaces: options for turning thought into action. IEEE Engineering in Medicine and Biology magazine, 25(5):32–38, September 2006. REFERENCES [AP03] Brendan Z. Allison and Jaime A. Pineda. ERPs evoked by different matrix sizes: implications for a brain-computer interface (BCI) system. IEEE Transactions on Rehabilitation Engineering, 11(2):110–113, June 2003. [BDK+ 06] Benjamin Blankertz, Guido Dornhege, Matthias Krauledat, Klaus-Robert Müller, Volker Kunzmann, Florian Losch, and Gabriel Curio. The Berlin brain-computer interface: EEG-based communication without subject training. IEEE Transactions on Neural Systems and Rehabilitation Engineering, 14(2):147–152, June 2006. L.A. Farwell and E. Donchin. Talking off the top of your head: toward a mental prosthesis utilizing event-related brain potentials. Electroencephalography and Clinical Neurophysiology, 70(6):510–523, April 1988. [HMMS05] Jennia Hizver, Jürgen Mellinger, Dennis McFarland, and Gerwin Schalk. BCI2000-compatible audio-visual P3 task. http://www.bci2000.org/downloads/ doc/audvisp3.pdf (2007-06-11), December 2005. [Inv04] Samuel A. Inverso. Automatic error recovery using P3 response verification for a brain-computer interface. Master’s thesis, Rochester Institute of Technology, July 2004. [Kno95] Klaus Knopper. Timeseal. http://www.unix-ag.uni-kl.de/∼soft/ timeseal/timeseal.txt (2007-06-11), 1995. [BKG+ 00] Niels Birbauber, Andrea Kübler, Nimr Ghanayim, Thilo Hinterberger, and Jouri Perelmouter. The Thought Translation Device (TTD) for completely paralyzed patients. IEEE Transactions on Rehabilitation Engineering, 8(2), June 2000. [LKF+ 05] E. Lalor, S.P. Kelly, C. Finucane, R. Burke, R.B. Reilly, and G. McDarby. Steady-state VEP-based brain-computer interface control in an immersive 3D gaming environment. EURASIP Journal on Applied Signal Processing, 19:3156–3164, 2005. [dE] Fédération Internationale des Échecs. FIDE handbook: Time control. http://www.fide.com/official/ handbook.asp?level=C08 (2007-06-11). [Man03a] Tim Mann. About XBoard and WinBoard. http://www.tim-mann.org/xboard.html (2007-06-11), 2003. [Man03b] [DSW00] Emmanuel Donchin, Kevin M. Spencer, and Ranjith Wijesinghe. The mental prosthesis: Tim Mann. Chess engine communication protocol. http://www.tim-mann.org/xboard/ engine-intf.html (2007-06-11), 2003. [BGR79] G. Bauer, F. Gerstenbrand, and E. Rumpl. Varieties of the locked-in syndrome. Journal of Neurology, 221(2):77–91, August 1979. [MBF+ 07] S.G. Mason, A. Bashashati, M. Fatourechi, K.F. Navarro, and G.E. Birch. A comprehensive survey of brain interface technology designs. Annals of Biomedical Engineering, 35(2):137–169, February 2007. [MS06] Jürgen Mellinger and Gerwin Schalk. BCI2000 external application interface. http://www.bci2000.org/downloads/ doc/app connection.pdf (2007-06-11), February 2006. [OR93] J. Oikarinen and D. Reed. Internet Relay Chat protocol. RFC 1459, May 1993. Updated by RFCs 2810, 2811, 2812, 2813. [PG86] J.R. Patterson and M. Grabois. Locked-in syndrome: a review of 139 cases. Stroke (American Heart Association), 17(4):758–764, July 1986. [Rii06] Søren Riis. Review of “Computer analysis of world chess champions”. http://www.chessbase.com/ newsdetail.asp?newsid=3465 (2007-06-11), November 2006. [Ser] Free Internet Chess Server. FICS registration form. http://www.freechess.org/cgi-bin/ Register/FICS register.cgi (2007-06-11). [SMH+ 04] Gerwin Schalk, Dennis J. McFarland, Thilo Hinterberger, Niels Birbaumer, and Jonathan R. Wolpaw. BCI2000: A general-purpose brain-computer interface (BCI) system. IEEE Transactions on Biomedical Engineering, 51(6), June 2004. [SMK+ 05] Gerwin Schalk, Dennis McFarland, Dean Krusienski, Bill Sarnacki, Eric Sellers, Jürgen Mellinger, Christoph Guger, and Febo Cincotti. 1st BCI2000 workshop. http://www.bci2000.org/downloads/doc/ BCI2000 Workshop Handout lo-res.pdf (2007-06-11), June 2005. [WBH+ 00] Jonathan R. Wolpaw, Niels Birbaumer, William J. Heetderks, Dennis J. McFarland, P. Hunter Peckham, Gerwin Schalk, Emmanuel Donchin, Louis A. Quatrano, Charles J. Robinson, and Theresa M. Vaughan. Brain-computer interface technology: a review of the first international meeting. IEEE Transactions on Rehabilitation Engineering, 8(2):164–173, June 2000. [Wika] Wikipedia. Electroencephalography. http://en.wikipedia.org/wiki/ Electroencephalography (2007-06-11). [Wikb] Wikipedia. P300 (neuroscience). http://en.wikipedia.org/wiki/ P300 (Neuroscience) (2007-06-11). [Wil06] Seb Wills. Brain Dasher - controlling Dasher through BCI. http://www.inference.phy.cam.ac.uk/ saw27/dasher/bci/ (2007-06-11), November 2006.
© Copyright 2025 Paperzz