Tangible Chess for the Compaq Tablet PC Christopher T. Lewis Computer Science Department University of Saskatchewan Saskatoon, SK., Canada +1 306 956 7693 LewisCT@agr.gc.ca ABSTRACT This project will develop a prototype tangible user interface (TUI) for playing chess on the Compaq Tablet PC (TC1000). The project will use the TUI with existing chess software, the GNU Chess Engine and the Winboard Chess interface. The goal is to develop a TUI for chess which provides a natural interface to electronic chess that is both portable and affordable. Keywords Tangible User Interface, Chess, Tablet PC INTRODUCTION Chess is a military strategy game which pits two opponents against one another. The objective of the game is to capture the opposing king. Each player has 16 pieces of varying abilities arrayed in an 8x8 grid. Traditionally, the game is played by two opponents seated opposite each other over the game board. There are computerized versions of the game available, which fall into two categories: enhanced playing boards and electronic chess. Enhanced playing boards have typically been used to allow a single human player to play chess against the computer, while electronic chess implementations allows a player to play against the computer, a remote human player or to review a past game. Electronic chess offers a number of advantages over both traditional chess and enhanced playing boards, for instance the ability to record and playback a game, to track statistics in a tournament setting, to play over a network, and to validate moves. However, playing electronic chess removes the tangible pieces from the game thereby preventing the board from being surveyed in a natural fashion. Furthermore, due to the coordinate based moves used by chess engines players are unable to see hesitation and other tells exhibited by the remote player, which eliminates a psychological facet of the game. Existing tangible chess projects [1,2] have focused on moving game pieces using robotic arms with magnets or pincers at the direction of either the computer or a player. By contrast, this project seeks to integrate the traditional tangible interface into electronic chess. The initial phase of this project aims to develop a TUI using the original game pieces as an interface to existing electronic chess software, thereby restoring the traditional interface to electronic chess. The second phase of the project aims to provide the player with additional information related to their opponent’s moves, such as whether or not the opponent hesitated and the speed with which the piece was moved. This is intended to allow the player to detect their opponent’s tells and restore the missing psychological element of the game. Figure 1: A mockup showing how a piece would be moved on the tablet by a physical piece with an embedded transmitter. SYSTEM COMPONENTS Software LEAVE BLANK THE LAST 2.5 cm (1”) OF THE LEFT COLUMN ON THE FIRST PAGE FOR THE COPYRIGHT NOTICE. In phase 1, the system will be tested using the WinBoard GUI [3] and the GNUChess engine [4], though it should work with any existing GUI and chess engine. These programs are freely available and widely used by online chess players. Connecting to a chess server will allow network play using the system. movements, which may indicate uncertainty or reveal something of their strategy. Communication between the GNUChess engine and the client occurs using a coordinate based movement system which transmits only the start and end point of the move. The software for phase 2 has yet to be identified; however a requirement for the software is that it must transmit either all movement information to the remote player in real-time, or sense the movement and transmit movement characteristics to the remote player. This will allow the opposing player to watch for hesitation in their opponent’s Hardware The TUI will consist of 32 active chess pieces with embedded transmitters. Moving a piece will have an equivalent effect to selecting and dragging the piece using the TC1000’s pen. To accomplish this, each transmitter will transmit at the same frequency as the TC1000’s pen with the tip switch depressed. According to the specification filed with the Federal Communications Commission (FCC) the pen transmits at a frequency of 482494 kHz when the tip switch is depressed (Table 1) [5]. Switch Status Frequency (kHz) Amplitude* Idle 458.0-465.0 1250-1550 (no switches) 454 (measured) Tip switch only 482.0-494.0 1250-1550 476 (measured) Tip switch + Single Side Switch or Primary dual side switch 433.8-445.4 Single Side Switch or Primary dual side switch only 415.0-424.0 1200-1525 432 (measured) 1125-1450 416 (measured) Table 1: The frequencies and amplitudes for the TC1000 as specified by the manufacturer in their FCC documents as well as the frequencies measured by connecting an oscilloscope to the antenna leads of the original pen. To avoid having 32 active pieces at one time, the transmitter will be inactive (power off) when the pieces are on the playing board. Lifting the piece from the playing surface will activate the piece. This will be controlled by a small button on the bottom of the playing pieces. Using this design, it is possible that there will be problems when capturing an opponent’s piece; at this time it is possible that there would (briefly) be two pieces active at the same time. Two strategies can be employed to avoid this situation. The first possibility is the addition of a second button to the piece, which, when depressed, would render the transmitter inactive. This button could be pressed on an opponent’s piece before removing it, which would ensure that only one piece is active during the capture. The second alternative is moving the activation button from the bottom of the piece to another location. Using this design the user having to press and hold the button for the duration of their move, rather than having the piece activate automatically when it is picked up off the playing surface. However, this would allow an opponent’s piece to be removed without any special manipulations. The digitizer used in the TC1000 only senses the pens presence to a height of 0.5 inch above the digitizer surface (as specified in the Fine Point Innovations Engineering Specification). When a piece is moved beyond this boundary, it is as if the player released the piece. This has two undesirable consequences, 1) if the resulting move is invalid, the piece will return to its initial starting point, and 2) if the resulting move is valid, the piece will remain where it was released. It is likely that neither of these is the intended result. It may be possible to sense the zposition of the piece at the time that the signal is lost and wait for the signal to resume if the piece has been moved above the boundary (i.e. the z position of the piece will be 0 when the piece is placed on the board, or 0.5 inches if the piece is lifted outside the boundary). However, while the Tablet PC Hardware requirements specification released by Microsoft calls for the z-coordinate to be reported [6], it appears that existing tablet implementations do not report it. CLASSIFICATION WITHIN TUI FRAMEWORKS Framework 1: Ullmer and Ishii [7], Calvillo-Gamez et.al. [8] Within the classifications of Ullmer and Ishii this TUI is best classified as an Interactive Surface, though it overlaps the Token+Constraints framework. The interactive surface is provided by the digitizer in the tablet PC which tracks the movement of pieces over the surface. Within the Token+Constraints framework, the pieces are tokens associated with the corresponding virtual piece. The movement of a piece is constrained by its movement capabilities as well as the presence of surrounding pieces. Framework 2: Paper 3 (Koleva et.al.) [9] Within the Link-Coherence framework of Koleva et. al. the chess pieces are best classified as general purpose tools because they can be used to select and drag any item on the screen (Table 2). This is in spite of of their physical likeness to the pieces they are intended to move, which may cause them to act as identifiers in the mind of the user. The link is semi-permanent because it exists whenever the piece is over the playing surface, but not when the piece is on the playing surface or removed from the game (though the user may assume that the link still exists at this point making it a permanent link in the mind of the user). Category Ex. Trans. Scope Conf. Lifetime Autonomy General Purpose Tool Chess Piece Literal Lifting piece, Setting piece down, translation parallel to surface Fixed Semipermanent Autonomous Table 2: Classification of the chess pieces within the Link-Coherence Framework of Koleva et. al. Note that the Chess pieces have been classified as General Purpose Tools despite their physical resemblance to the piece they are intended to move. Action Time Location Direction Dynamics Modality Expression Move Piece Yes Yes Yes Yes Yes Yes Opponent Moves Piece Phase 1: No No Phase 1: No Phase 1: No Phase 1: No Phase 1: No Phase 2: Yes Phase 2: Yes Phase 2: Yes Phase 2: Yes Capture Piece Yes Yes Yes Yes Yes Yes Opponent Captures Piece Phase 1: No No No No Yes No Phase 2: Yes Phase 2: Yes Table 3: Classification of the actions in the tangible chess game within the Interaction Frogger Framework of Wensvenn et.al. Framework 3: Paper 4 (Wensveen et.al.) [10] All actions which are performed on the remote system will experience a slight delay before occurring on the local system, this delay is introduced when the coordinates are processed by the chess server, and can be eliminated (as much as possible given current technologies) by moving to a peer-to-peer implementation in phase 2 of the project. The reaction for all actions which occur on the local tablet will appear in the same location, and a moment later the same reaction will occur on the remote tablet. The change to a real-time, peer-to-peer system in phase 2 will not change this behavior, except that the reaction on the remote tablet might occur marginally faster. On the local system, the direction of movement is coupled to the direction of the reaction. On the remote system, the direction of movement is not coupled to the reaction on the remote system because there is no path information transmitted using coordinate based moves in phase 1. However, when the path of movement is transmitted to the remote computer in phase 2, the direction of reaction will be coupled with the direction of action. Because captured pieces disappear, the reaction to capturing a piece cannot be coupled to the physical action of removing the piece on the remote tablet. There are no plans to change this behavior in phase 2 of the project. Similarly, there is no way to show dynamics or expression on the remote tablet when capturing a piece. When moving a piece on the local tablet, the dynamics of the action are coupled to the dynamics of the reaction. However, due to the coordinate based moves used in phase 1, it is impossible for this coupling to occur on the remote computer. However, it will be possible to display this coupling in phase 2 of the project. Similarly, when moving a piece on the local tablet, the expression of the action is reflected in the reaction on the local tablet. However, again, due to the coordinate based moves used in phase 1, it is impossible for this coupling to occur on the remote computer. However, once again, it will be possible to display this coupling in phase 2 of the project. DESIGN CONSTRAINTS The goals of portability and affordability introduce weak constraints on piece design in that the pieces must be small enough to travel well, solid enough to withstand minimal abuse while traveling and priced such that the average user can purchase a set. The selection of the Tablet PC as the playing surface imposes an additional strong design constraint in that it offers a relatively small playing area requiring that each piece be no more than 3/4 of an inch in diameter in order to fit within the squares of the chess board. subsequent analysis of the waveform produced by the pen revealed that it was producing a sine wave. The fact that the pen produces a sine wave was not known when we set out to build the circuit based on the NE555 because we did not initially have access to an oscilloscope. Assembling the pieces from common electronics components will help to ensure a minimal production cost. However, the choice of components is restricted to those having low voltage requirements as each piece will be battery powered. The selection of a battery is another important design consideration, and the output voltage will further constrain the components used in the chess piece. The intent is to use 1.4V hearing aid batteries, such as the Energizer AC312. Such batteries are available in spools of 16 for approximately 20$ (Can) or $1.25 a piece, though online retailers sell larger quantities at a lower per unit cost. The dimensions of the AC312 are 0.311” (width) x 0.142” (height), which means that the AC312 should easily fit inside a chess piece. Two batteries operating in parallel should produce 2.8V of power for approximately 1000 hours; so any parts we use must be able to operate at or below 2.8 V Vcc. IMPLEMENTATION The pieces used in this project must be able to produce a frequency within the range specified for the pen with the tip switch depressed (482-494 KHz). There have been two attempts to produce this frequency, one based on an NE555 timer and a second attempt using a dual operational amplifier (op amp). Unfortunately both attempts failed. NE555 Timer The schematic for the circuit based on the NE555 timer is shown in Figure 2 [11]. Using this circuit, the frequency is determined by altering the values of R1, R2, and C according to the following formula: f = 1 / (.693 * C * (R1 + 2 * R2)) This to achieve the desired 488 KHz frequency, we arbitrarily selected a capacitor value (C) of 0.0022 µF then selected R1 = 430 Ohms and R2 = 457 Ohms. This attempt failed for two reasons. First, we were only able to achieve an output frequency of 300 KHz without clipping; clipping occurs when the maximum output frequency that the integrate circuit is able to produce has been exceeded, and it causes the resulting waveform to be distorted. For example, clipping may be occurring in your amp if your music sounds distorted at high volume. Second, the NE555 produces a square wave, while Figure 2: This figure shows the circuit used with the NE555 timer in an attempt to produce the 488 KHz frequency used in the tablet pen. Dual Operational Amplifier The schematic for the single supply wein bridge using a dual op amp is shown in Figure 3 [12]. Using this circuit the frequency is calculated using the forumula: f=1/2πRC To achieve the desired 488 KHz frequency we used C=100pF and R=3261KOhms. However at this frequency the dual op amp used failed to oscillate. By adjusting the RC values we were able to successfully produce a 200 KHz wave, though the output frequency deviated substantially from the theoretical frequency for the RC values used. Further investigation revealed that this attempt failed because the gain bandwidth (1MHz) of the dual op amp used (LMV982MA) is too low to produce a 488 KHz frequency. According the theory, the gain bandwidth must be at least 3 times the output frequency. ACKNOWLEDGMENTS Thank you to Merlin Hansen for his assistance building and troubleshooting the circuits used in this implementation. REFERENCES 1. Meppelink, DJ and Martin, F. A Tangible Interface to Computerized Chess. Available at http://www.cs.uml.edu/~fredm/courses/91.548spr03/student/dmeppeli/project2/chesster.pdf 2. Clapham, A. Chess. Andy’s LEGO Mindsotrms Page. Available at http://www.artilect.co.uk/lego/default.asp ?page=Chess 3. Mann, T. XBoard. Available http://savannah.gnu.org/projects/xboard/ at 4. GNU Software Foundation. Chess. Available at http://www.gnu.org/software/chess/chess.html 5. Federal Communications Commission. FCC ID Search Page. Available at http://www.fcc.gov/oet/fccid/ (search for product NEJNT2). 6. Microsoft. Windows XP Tablet PC Edition Hardware Requirements. Available at http://www.microsoft.com/windowsxp/tabletpc/develo per/hdwreq.asp 7. Ullmer, B. and Ishii, H. (2003), Emerging Frameworks for Tangible User Interfaces. In Human-Computer Interactions in the New Millennium. 8. Calvillo Gamez, E.H., Leland, N, Shaer, O. Jacob, R.J.K. The TAC Paradigm: Unified Conceptual Framework to Represent Tangible User Interfaces. CLIHC 2003 Latin American Conference On HumanComputer Interaction, 2003. 9. Koleva, B., Benford, S., Ng, K.H., & Rodden, T. A framework for tangible user interfaces, Physical Interaction 2003 Workshop on Real World User Interfaces, Fifth International Symposium on HumanComputer Interaction with Mobile Devices and Services, 2003. 10. S.A.G. Wensveen; J.P. Djajadiningrat; C.J. Overbeeke (2004). Interaction Frogger: a Design Framework to Couple Action and Function through Feedback and Feedforward. DIS 2004. 11. Van Roon, T. 555 Timer Tutorial. Available at http://www.uoguelph.ca/~antoon/gadgets/555/555.html 12. Harrison, A. SINGLE-SUPPLY WIEN BRIDGE OSCILLATOR. Available at http://home.att.net/~theremin1/Circuit_Library/wienbri dge.htm