icat, the chess player - técnico lisboa - autenticação · joão gonçalves for always being...

89
iCat, the Chess Player Evaluating User Enjoyment in a Pervasive Chess Game André Tiago Abelho Pereira Dissertação para obtenção do Grau de Mestre em Engenharia Informática e de Computadores Júri Presidente: Doutor Mário Rui Fonsecas dos Santos Gomes Orientador: Doutora Ana Maria Severino de Almeida e Paiva Vogais: Doutor Carlos António Roque Martinho Doutor Nuno Correia Outubro 2007

Upload: vukhuong

Post on 12-Dec-2018

215 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: iCat, the Chess Player - Técnico Lisboa - Autenticação · João Gonçalves for always being there to help and for introducing iCat to me, we have made a good surgery team when

 

 

iCat, the Chess Player  

    Evaluating User Enjoyment in a Pervasive Chess Game    

 André Tiago Abelho Pereira 

 

 

Dissertação para obtenção do Grau de Mestre em 

Engenharia Informática e de Computadores 

 

 

 

Júri 

Presidente:   Doutor Mário Rui Fonsecas dos Santos Gomes 

Orientador:   Doutora Ana Maria Severino de Almeida e Paiva 

Vogais:   Doutor Carlos António Roque Martinho 

  Doutor Nuno Correia 

 

Outubro 2007 

Page 2: iCat, the Chess Player - Técnico Lisboa - Autenticação · João Gonçalves for always being there to help and for introducing iCat to me, we have made a good surgery team when
Page 3: iCat, the Chess Player - Técnico Lisboa - Autenticação · João Gonçalves for always being there to help and for introducing iCat to me, we have made a good surgery team when

Resumo

O xadrez é um jogo em que dois oponentes se defrontam frente a frente naquele familiar tabuleiro

de 64 quadrados de cores pretas e brancas. O xadrez existe há mais de 1500 anos e sobreviveu a

todas as civilizações por onde passou. Durante o desenvolvimento da nossa civilização, o xadrez

sempre foi um elemento omnipresente e ao jogá-lo tiramos partido dos muitos benefícios cognitivos

que ele nos oferece. Uma das suas variantes, o xadrez computorizado, foi uma das primeiras e mais

importantes aplicações da inteligência artificial durante o século XX.

O xadrez computorizado melhora o jogo original nalguns aspectos, como por exemplo permitir-nos

jogar a qualquer momento contra um adversário de força personalizada. Mas nem tudo no xadrez em

computadores é positivo. Ao jogarmos contra um computador não conseguimos ver hesitação ou

qualquer emoção no nosso oponente e não temos ao nosso dispor o tabuleiro físico tridimensional a

que estamos habituados. Com o objectivo de juntar as vantagens oferecidos pelo xadrez tradicional

com as vantagens oferecidas pelo xadrez computorizado recorremos à análise da área de Pervasive

Gaming. Esta área consiste em trazer o entretenimento virtual de volta ao mundo real. Podemos

utilizar esta área para criar um novo tipo de jogo de xadrez onde misturamos os elementos físicos de

um jogo tradicional com os elementos virtuais oferecidos por um jogo de xadrez num computador.

Desta maneira conseguimos trazer o xadrez computorizado de volta ao mundo real.

Esta tese tem como objectivo analisar se uma experiência de jogo inovadora oferecida por um

Pervasive Game de xadrez em que o utilizador joga contra uma personagem sintética com um corpo

físico (robô) é mais apreciada pelos utilizadores do que quando estes têm como adversário uma

personagem virtual. Para fazer esta avaliação, desenhámos um modelo para jogos de xadrez que

utilizem a área de Pervasive Gaming. A partir deste modelo criámos uma aplicação em concreto, a

aplicação “iCat, the Chess Player”. Para esta aplicação criámos dois cenários de utilização, um deles

com um agente de corpo físico e outro com um agente com o mesmo aspecto mas representado

virtualmente num ecrã de computador. Utilizando estes dois cenários fizemos alguns testes

preliminares e tirámos conclusões sobre a diferença de satisfação dos utilizadores em cada um.

Palavras Chave: Xadrez Computorizado, Xadrez Tradicional, Agente Virtual, Agente Físico, Pervasive Gaming, Satisfação do Utilizador.

i

Page 4: iCat, the Chess Player - Técnico Lisboa - Autenticação · João Gonçalves for always being there to help and for introducing iCat to me, we have made a good surgery team when

ii

Page 5: iCat, the Chess Player - Técnico Lisboa - Autenticação · João Gonçalves for always being there to help and for introducing iCat to me, we have made a good surgery team when

Abstract

Chess is an ancient table-top game in which two opponents battle face-to-face in that familiar

black and white 64 square board. For more than 1500 years of history chess has survived every

civilization it has touched. There are many positive cognitive effects of chess instructions on today’s

students and chess has always been a ubiquitous element during the development of our civilization.

One of its heirs, computerized chess, was one of the first artificial intelligence (A.I) research areas

and was highly important for the development of A.I. throughout the twentieth-century.

Computerized chess outperforms its original game by, for instance, transforming the experience in

a one player game by allowing us to play against an opponent of custom strength. On the other hand,

in a computerized chess game we cannot see hesitation or any expressed emotion from our opponent

and don’t have the controls/representation offered by a physical tridimensional chessboard. In order

to take advantage of both computerized chess and traditional chess games we recurred to the

emerging field of pervasive gaming. The brief definition of pervasive gaming is to bring computer

entertainment back to the real world. By creating a new computerized chess gaming experience that

profits by the mix of real and virtual game elements, we can also bring computerized chess back to

the real world.

This thesis tries to conclude that an innovative pervasive chess gaming experience where the user

plays chess against a physically embodied synthetic character, on an electronic chessboard, is more

enjoyable than a less pervasive one with a virtually embodied character. To reach this conclusion, we

have designed a model for a computerized pervasive chess game and implemented a concrete

application that uses that model. With this application we have created two different setups, one with

the physical embodiment of the iCat social robot and other with the virtual representation of the same

at a computer screen. Using these two different setups we have made some preliminary user tests

and pulled out some conclusions about the difference of user enjoyment in both setups.

Keywords: Computerized Chess, Pervasive Gaming, Traditional Chess, Embodiment, Virtual Agent, Physical Agent, User Enjoyment.

 

   

iii

Page 6: iCat, the Chess Player - Técnico Lisboa - Autenticação · João Gonçalves for always being there to help and for introducing iCat to me, we have made a good surgery team when

 

iv

Page 7: iCat, the Chess Player - Técnico Lisboa - Autenticação · João Gonçalves for always being there to help and for introducing iCat to me, we have made a good surgery team when

Acknowledgments In the first place I would like to thank DGT projects for contributing to this research project by

providing us with their outstanding DGT electronic chessboard and DGT XL chess clock. With people

like Ben Bulsink at DGT projects investing hard at research I believe that in a near future chess

technology will have some groundbreaking innovative discoveries in benefit of the chess community.

For that I want to reinforce my sincere and deep thanks to DGT projects.

I would also like to thanks all the members of the GAIPS group:

Thank you, Carlos Martinho for investing your indisputable wisdom at reviewing some parts of my

work. João Gonçalves for always being there to help and for introducing iCat to me, we have made a

good surgery team when the cat needed us. Thanks to Guilherme Raimundo for your availability to

everyone in need and for our enlightening but never-ending discussions. João Dias and Rui

Figueiredo for being my next door help. Thank you, Marco Vala for your advices. Thanks Nuno

Afonso, Tiago Alves, Rita Simões, Pedro Sequeira, António Brisson, Carolina Torres and Luis Santos

for your help.

I would like to thank my supervisor Ana Paiva and co-supervisor Rui Prada for letting me go

forward with this project as my dissertation and for giving me all the conditions I needed. Without

them my life would be different at this time.

Thanks to my dear sister Cláudia Pereira and her husband Ricardo Mendes.

Finally, I would like to end by giving the most sincere and most special thanks of them all to my

girlfriend and partner in this project Iolanda Leite.

v

Page 8: iCat, the Chess Player - Técnico Lisboa - Autenticação · João Gonçalves for always being there to help and for introducing iCat to me, we have made a good surgery team when

vi

Page 9: iCat, the Chess Player - Técnico Lisboa - Autenticação · João Gonçalves for always being there to help and for introducing iCat to me, we have made a good surgery team when

Contents 1 Introduction…………………………………………………………………………………………………1

1.1 Motivation……………………………………………………………………………………………….1

1.2 Objectives……………………………………………………………………………………………….3

1.3 Outline…………………………………………………………………………………………………...4

2 Related Work……………………………………………………………………………………………….5 2.1 Computerized Chess…………………………………………………………………………………..5

2.1.1 Components……………………………………………………………………………………...5

2.1.1.1 Graphical User Interfaces………………………………………………………………..5

2.1.1.2 Tangible User Interfaces…………………………………………………………………6

2.1.1.3 Chess Engines…………………………………………………………………………….8

2.1.1.4 Chess Engines Examples………………………………………………………………11

2.1.2 Chess Playing Systems……………………………………………………………………….13

2.1.2.1 Battle Chess……………………………………………………………………………..13

2.1.2.2 Chessmaster Series…………………………………………………………………….13

2.1.2.3 Fritz………………………………………………………………………………………14

2.1.2.4 Chessbase……………………………………………………………………………….14

2.1.2.5 Enhanced Playing Boards……………………………………………………………...14

2.2 Pervasive Gaming……………………………………………………………………………………15

2.2.1 Computer Augmented Tabletop Games…………………………………………………….15

2.2.1.1 KnightMage………………………………………………………………………………16

2.2.1.2 Smart Playing Cards……………………………………………………………………17

2.2.2 Affective games………………………………………………………………………………..17

2.2.2.1 Leonardo…………………………………………………………………………………18

2.2.2.2 Smart Toys………………………………………………………………………………18

2.2.2.3 SenToy…………………………………………………………………………………..19

2.2.3 Location-aware games………………………………………………………………………..19

2.2.3.1 CityPoker…………………………………………………………………………………20

2.2.4 Augmented reality games……………………………………………………………………..20

2.2.4.1 Augmented Reality Worms……………………………………………………………..21

2.3 Concluding Remarks…………………………………………………………………………………21

3 Conceptual Model……………………………………………………………………………………….23 3.1 Conceptual Model of a Traditional Table Top Chess Game……………………………………..24

vii

Page 10: iCat, the Chess Player - Técnico Lisboa - Autenticação · João Gonçalves for always being there to help and for introducing iCat to me, we have made a good surgery team when

3.1.1 Social Domain…………………………………………………………………………………..24

3.1.2 Physical Domain………………………………………………………………………………..25

3.2 Conceptual Model of a Traditional Computerized Chess Game………………………………...25

3.2.1 Virtual Domain………………………………………………………………………………….26

3.3 Conceptual Model of a Pervasive Chess Game…………………………………………………..26

3.3.1 Advantages of the Previous Models…………………………………………………………27

3.3.2 Pervasive Chess Game Model……………………………………………………………….27

3.3.3 Chess Playing Agent / Opponent…………………………………………………………….28

3.3.4 Social Domain………………………………………………………………………………….28

3.3.5 Virtual Domain………………………………………………………………………………….28

3.3.6 Physical Domain……………………………………………………………………………….29

3.4 Concluding Remarks…………………………………………………………………………………29

4 Application……………………………………………………………………………………………….31 4.1 Pervasive Elements………………………………………………………………………………….32

4.1.1 Chess Playing Agent Embodiment…………………………………………………………..32

4.1.1.1 iCat Robot………………………………………………………………………………..32

4.1.2 Chess Tangible User Interface……………………………………………………………….35

4.1.2.1 DGT Electronic Chessboard Class……………………………………………………35

4.2 iCat The Chess Player Module……………………………………………………………………..36

4.2.1 Integration with a Chess Engine……………………………………………………………..37

4.2.2 Emotion System……………………………………………………………………………….37

4.2.2.1 Emotional Reactions……………………………………………………………………38

4.2.2.2 Mood……………………………………………………………………………………...38

4.2.3 State Machine of iCat the Chess Player…………………………………………………….39

4.2.3.1 Begin State………………………………………………………………………………40

4.2.3.2 Thinking State……………………………………………………………………………41

4.2.3.3 Reacting State…………………………………………………………………………..41

4.2.3.4 Waiting for My Move State…………………………………………………………….41

4.2.3.5 Waiting for User’s Move State…………………………………………………………42

4.2.3.6 Game Over State……………………………………………………………………….42

4.3 Concluding Remarks…………………………………………………………………………………43

5 Evaluation…………………………………………………………………………………………………45 5.1 Research Question…………………………………………………………………………………..45

5.2 Methodology.…………………………………………………………………………………………45

5.2.1 Measurements…………………………………………………………………………………46

5.2.2 Pervasive Gameflow…………………………………………………………………………..46

5.2.3 Direct Questions……………………………………………………………………………….48

5.2.4 Participants ……………………………………………………………………………………48

5.2.5 Setting…………………………………………………………………………………………..49

5.2.5.1 Physical Setup.…………………………………………………………………………..49

viii

Page 11: iCat, the Chess Player - Técnico Lisboa - Autenticação · João Gonçalves for always being there to help and for introducing iCat to me, we have made a good surgery team when

5.2.5.2 Virtual Setup…………………………………………………………………………….50

5.3 Results………………………………………………………………………………………………..51

5.3.1 User Enjoyment – Virtual versus Physical…………………………………………………..51

5.3.2 Qualitative Data………………………………………………………………………………..52

5.4 Concluding Remarks………………………………………………………………………………...53

6 Conclusions………………………………………………………………………………………………55 6.1 Future Work………………………………………………………………………………………….…56

Appendix A. UML C++ Class Diagrams………………………………………….……………………..61 A.1 UML Class diagram of the C++ ChessEngine Class……………………………………………..61

A.2 UML Class diagram of the C++ ElectronicBoard Class………………………………………….62

Appendix B. XML Configuration Files………………………………………………………………......63 B.1 XML configurations file for the iCat, Chess Player………………………………………………..63

B.2 XML Portuguese Configuration File………………………………………………………………...63

Appendix C. Publications…………..……………………………………………………………………...67 C.1 Demonstration Article in ACII 2007…………………………………………………………………67

   

ix

Page 12: iCat, the Chess Player - Técnico Lisboa - Autenticação · João Gonçalves for always being there to help and for introducing iCat to me, we have made a good surgery team when

  

x

Page 13: iCat, the Chess Player - Técnico Lisboa - Autenticação · João Gonçalves for always being there to help and for introducing iCat to me, we have made a good surgery team when

List of Figures Figure 1.1: The Turk showing its mechanical parts…………………………………………….……….......1

Figure 2.1: Screenshot of Winboard Using Gnu Chess Engine…………………………………………….6

Figure 2.2: A picture of ChessBox that shows its webcam aiming at the mirror, which reflects the

bottom of the playing board to the camera…………………………………………………………………...7

Figure 2.3: Toto’s Robot Arm Chess Player………………………………………………………………….7

Figure 2.4: Serial version of DGT Projects Electronic Chessboard (shown in the left photo) and a DGT

XL clock (shown in the right photo) …………………………………………………………………………...8

Figure 2.5: Sample chess board position (shown in the left photo) and a bitboard representation of the

white pawns (shown in the right photo) ………………………………………………………………………9

Figure 2.6: Screenshot of battle chess, where we can see a bishop versus bishop fight……………...13

Figure 2.7: Pressure Sensitive Travel Chess Computer by Saitek (shown in the left photo) and

Mephisto Exclusive Kasparov Chess Computer (shown in the right photo) …………………………….15

Figure 2.8: The STARS tabletop platform…………………………………………………………………..16

Figure 2.9: The STARS interactive table showing KnightMage game board……………………………17

Figure 2.10: Playing Cards and Mobile Phone (shown in the left photo) and Unobtrusive Integration of

RFID Tags (shown in the right photo) ………………………………………………………………………17

Figure 2.11: Leonardo acknowledges the human’s gesture towards a button by looking at that

button…………………………………………………………………………………………………………..18

Figure 2.12: The SenToy tangible interface (shown in the left photo). Continuous up and down

movement with SenToy which represents the happiness emotion (shown in the right

photo)………...19

Figure 2.13: Starting card distribution (shown in the left photo) and GPS track of a team in a cache

region (shown in the right photo)...………………………………………………………………………….20

Figure 2.14: AR Worms (Shown in the left photo) and the original game (shown in the right photo)...21

Figure 3.1: A conceptual model and cycle of a traditional chess game…………………………………24

Figure 3.2: A conceptual model and cycle of a traditional computerized chess game………………...25

Figure 3.3: A conceptual model for a pervasive chess game…………………………………………….27

Figure 4.1: iCat, Chess Player Architecture………………………………………………………………..31

Figure 4.2: iCat expresses different emotions………………………………………………………………33

Figure 4.3: OPPR System…………………………………………………………………………………….34

Figure 4.4: DGT XL clock displaying the computer’s move……………………………………………….36

Figure 4.5: Game State Machine on the iCat’s perspective……………………………………………….40

Figure 5.1: Initial position of the testing scenario…………………………………………………………...49

xi

Page 14: iCat, the Chess Player - Técnico Lisboa - Autenticação · João Gonçalves for always being there to help and for introducing iCat to me, we have made a good surgery team when

Figure 5.2: Physical setup….…………………………………………………………………………………50

Figure 5.3: Virtual setup…….…………………………………………………………………………………50

xii

Page 15: iCat, the Chess Player - Técnico Lisboa - Autenticação · João Gonçalves for always being there to help and for introducing iCat to me, we have made a good surgery team when

List of Tables Table 4.1: Table of conditions and transitions of iCat The Chess Player State Machine………………39

Table 5.1: User enjoyment Mann-Whitney U Test Ranks…………………………………………………51

Table 5.2: User enjoyment Mann-Whitney U Test Statistics………………………………………………51

Table 5.3: Pervasive Game Flow Elements Mann-Whitney U Test Statistics…………………………...52

Table 5.4: Question 20 Frequencies…………………………………………………………………………53

xiii

Page 16: iCat, the Chess Player - Técnico Lisboa - Autenticação · João Gonçalves for always being there to help and for introducing iCat to me, we have made a good surgery team when

xiv

Page 17: iCat, the Chess Player - Técnico Lisboa - Autenticação · João Gonçalves for always being there to help and for introducing iCat to me, we have made a good surgery team when

Chapter 1

Introduction “Taking the long historical view, we may say that modern chess is a game in transition.

We know what it was and what it is, but we can't yet know what it will be.”

Burt Hochberg

(1933–2006)

1.1 Motivation

Chess is a two player recreational and competitive game originated from the two-player Indian war

game Chatarung, which dates back to 600 A.D.. Today, chess is one of the most known board games

and the idea of creating a chess-playing machine dates back to the eighteen century. Around 1769, a

chess automaton called The Turk (Figure 1.1) became famous before it was exposed as a fake. It

was simply a mechanical illusion that allowed any person with high chess knowledge, to hide inside

and operate the machine.

Figure 1.1: The Turk showing its mechanical parts

A real automaton, El Ajedrecista (Wikipedia 2007), was built in 1912 by Leonardo Torres y

Quevedo. El Ajedrecista used electromagnets under the board and it automatically played a three

chess piece endgame moving a King and a Rook, against the human opponent’s King. If an illegal

move was made by the opposite player, the automaton would signal it. The automaton did not play

1

Page 18: iCat, the Chess Player - Técnico Lisboa - Autenticação · João Gonçalves for always being there to help and for introducing iCat to me, we have made a good surgery team when

very precisely and it did not always deliver mate in the minimum amount of moves because of its

simple algorithm.

In the late 1940s, the first computers were initially developed for wartime applications, but as more

powerful machines were built, predictions were being made that computers would speak, think and

perform human or even superhuman tasks. People thought that if a computer could play chess, then

other problems that require human intelligence could also be solved. Since then, the field of

mechanical chess research languished and gave birth to computerized chess. At that time computing

power was limited, programs in the late 1950s could only play at basic level and by the end of the

1960s, computer chess programs were good enough to occasionally win against amateur players. In

less than fifty years, chess programming evolved to the point that the best chess program can beat

the best human player in the world. In 1997, a supercomputer developed by IBM and a chess engine

named Deep Blue (IBM 1997) played a match against the chess world champion Kasparov. Deep

Blue won.

Chess is usually a two player game, but computerized chess gives us the opportunity to play

against digital opponents of different strengths. Also for solo entertainment, many people nowadays

recur to online chess in search of human opponents. The popularity of online chess coincided with the

growth of the internet.

There are many positive cognitive effects of chess instructions on students and there is a wide

variety of research articles that demonstrate them:

• After two years of psychological research in chess, John Artise found cognitive improvements

in memory, logic, observation and analysis, and operant conditioning (Artise 2007);

• Chess improves students’ reading scores (Margulies 1992);

• In a 1977-1979 study at the Chinese University in Hong Kong by Dr. Yee Wang Fung, chess

players showed a 15% improvement in math and science test scores (Nurse 1995).

Research suggests that chess helps any person to elaborate exact methods of thinking. So it

would be particularly useful to start playing chess from the early school days. Everybody prefers to

learn something while playing, rather than to learn it formally. Children that received systematic

instructions in chess improved their school efficiency in different subjects, in contrast with those who

did not receive that kind of instructions (Linder 1990). Computerized chess helps to spread the same

positive cognitive effects of traditional chess instructions. However playing chess in its original form,

with a real chessboard and against a real opponent, share the social advantages, physical controls

and physical information offered by most of the board games. To take advantage of both

computerized chess and traditional chess game elements, it would be interesting to maintain the

experience as close as possible to the traditional where we face an opponent and play in a real

physical chessboard. It is possible to achieve this by recurring to the emerging field of pervasive

gaming.

2

Page 19: iCat, the Chess Player - Técnico Lisboa - Autenticação · João Gonçalves for always being there to help and for introducing iCat to me, we have made a good surgery team when

Pervasive Gaming intends to create new and exciting gaming experiences that profit by the blend

of real and virtual game elements (Magerkurth, Cheok et al. 2005). The advances in pervasive

computing technologies are slowly being used to improve some aspects of our daily activities such as

entertainment. We can either use pervasive computing technologies to improve physical

entertainment games, such as board games or sports, or/and we can use it to transform the digital

world interaction (e.g. computer entertaining games).

1.2 Objectives

Computerized chess surpasses its original game by allowing the user to play at any time against

an opponent of custom strength, to analyse moves, consult game statistics, record games or consult

saved games. Nevertheless, not everything in computerized chess is positive. By using a Graphical

User Interface (GUI) the social possibilities of the game, in which both opposing players are able to

interact, become limited and we cannot see hesitation or any expressed emotion on the virtual

opponent. To handle these two issues, the emerging field of Pervasive Gaming will be analysed. The

definition of pervasive gaming is to bring computer entertainment back to the real world. By

researching the field of pervasive gaming we will seek for ways in which we can bring computerized

chess back to that “mystic” real world in which centuries of battles have been fought.

In this dissertation we present ideas, models and a concrete implementation about how we can

design a pervasive computerized chess game that brings together the advantages offered by a

traditional chess game with those offered by a computerized chess game.

Understanding what makes players enjoy a game is perhaps the most important issue in

successful game design (Jegers 2007). Thus, we want to evaluate if a more pervasive environment

influences the user’s enjoyment in a chess game. Given that, the main research question addressed

by this thesis is:

Do people have more fun using the version of our implementation with a more

pervasive (i.e. physically embodied) opponent? Or have they higher enjoyment

while playing against a less pervasive one (i.e. virtually embodied)?

To do so, we will assemble two different setups of our pervasive chess game: one using a physical

embodied opponent, and other one with a virtual embodied opponent. The hypothesis of this thesis is:

If we alter between these two different setups, we will be able to take conclusions

about which scenario is more enjoyable.

Also we want to find out if people who regularly play computer chess prefer playing it with our

pervasive chess game.

3

Page 20: iCat, the Chess Player - Técnico Lisboa - Autenticação · João Gonçalves for always being there to help and for introducing iCat to me, we have made a good surgery team when

1.3 Outline

This thesis is separated in six chapters:

Chapter 2 (Related Work) is where computerized chess is introduced, stating and explaining its

main components and analysing the features of some chess playing systems. In this chapter,

Pervasive gaming sub-areas are also described, and for each one of them some applications are

analysed by their benefits and technology.

Chapter 3 (Conceptual Model) describes a model for a pervasive chess game that gathers the

advantages of both real world and computerized chess. In order to conceptualize this model, we

analysed the model of a traditional chess game played between two human players with a regular

chess board, as well as the model of a simple, one player computer chess game.

Chapter 4 (Implementation) describes the architecture of our application, named “iCat, the Chess

Player”. To describe the architecture we will depict the two pervasive elements and the state machine

(agent’s mind) of our application.

Chapter 5 (Evaluation) describes the preliminary experiment we did in order to evaluate our

implementation of a pervasive chess game, “iCat, the Chess Player”, in both its physical and virtual

embodiment.

Chapter 6 (Conclusions) follows up with a summary of the developed work and present our

conclusions and future work.

4

Page 21: iCat, the Chess Player - Técnico Lisboa - Autenticação · João Gonçalves for always being there to help and for introducing iCat to me, we have made a good surgery team when

Chapter 2

Related Work

In this chapter we start by introducing computerized chess by stating and explaining its main

components and by analysing and describing some chess playing systems. In the second part of the

related work we study pervasive gaming by describing each of its sub-areas and by analysing the

benefits and technology of some of its applications. The fields of computerized chess and pervasive

gaming relate to each other in our work since some concepts of pervasive gaming might be applied in

computerized chess in order to engage users with more enjoyable gaming experiences.

2.1 Computerized Chess

In this section we will describe the essential components of computerized chess. Also, some chess

playing systems will be presented and their features depicted.

2.1.1 Components

To develop a chess application, there are a couple of essential components which are the use of a

graphical or tangible user interface and the use of a chess engine. In this subsection each component

will be introduced and followed by commercial or research application examples that will be analysed

and described.

2.1.1.1 Graphical User Interfaces

Graphical user interfaces enable us to visualize a virtual chess board and interact with it playing

against chess engines or other players. One of the most known graphical user interface for chess

software is Winboard (Figure 2.1) or Xboard (its Linux version) an open-source Freeware by Tim

Mann (Mann 2007). It can be used to play chess on the Internet (e.g. at the Internet Chess Club (ICC

2007)). Many freeware chess programs use Winboard as their graphical interface. Winboard

communicates with chess engines and remote players using the Chess Engine Communication

Protocol (Mann 2003).

5

Page 22: iCat, the Chess Player - Técnico Lisboa - Autenticação · João Gonçalves for always being there to help and for introducing iCat to me, we have made a good surgery team when

Figure 2.1: Screenshot of Winboard Using Gnu Chess Engine

2.1.1.2 Tangible User Interfaces

A comprehensive discussion of tangible user interfaces in game design has been provided by

Ullmer and Ishii (Ullmer and Ishii 2000.). The main attribute of a tangible interface is the seamless

integration of representation and controls. That is, an ideal tangible interface does not differentiate

between input and output as a GUI does, because by manipulating a physical state, this state already

is its own representation. Tangible interfaces are thus more direct and natural to use than a GUI,

whenever a possible virtual representation matches the physical representation of the interface

(Magerkurth, Engelke et al. 2004). In the examples we present next, a player alters the physical state

of the chess board simply by moving a chess piece, as he would do in a normal two player chess

game, played on a traditional board without the aid of a GUI. We will analyse the technology involved

in constructing these interfaces. Two academic and one commercial solution are presented:

ChessBox, Chesster and DGT Projects Electronic Chessboard.

ChessBox

The ChessBox system (Lewis and Sallam 2004) is constituted by a wooden box, a webcam, a

mirror and two inexpensive chess sets (board and chess pieces) made of glass. The wooden box

holds the chess board, the camera and the mirror. The mirror is used to reflect the image of the

chessboard back to the camera which tracks the movement of the pieces over the surface of the

glass board.

ChessBox software is a C/C++ application that communicates with GNU Chess engine (FSF 1985)

and with Winboard. ChessBox software is divided in three modules: one containing the vision system,

another one with the chess logic and the final one to interact with the chess engine.

ChessBox (Figure 2.2) implementation can be easily recreated and implemented since all physical

components are available and any webcam can be used to implement the vision algorithms.

However, ChessBox has some drawbacks: moves are not always recognized because of the vision

6

Page 23: iCat, the Chess Player - Técnico Lisboa - Autenticação · João Gonçalves for always being there to help and for introducing iCat to me, we have made a good surgery team when

system’s limitations and it does not provide audio or visual feedback when an invalid state is reached.

The final and main drawback is that the user has to look at a screen and play the engine’s move.

Figure 2.2: A picture of ChessBox that shows its webcam aiming at the mirror, which reflects the

bottom of the playing board to the camera

Chesster

The Chesster tangible interface to computerized chess (Meppelink and Martin 2003) can be used

to play against a computer or a geographically remote opponent. Chesster uses a large chessboard

and thirty-two chess pieces with the top painted red so that the vision sensor can distinguish them

from the board itself. A robotic arm with pincers is used to move the pieces around the chess board.

The software that Chesster uses is: Winboard with the GNU chess engine; a server that translates

to and from the notation GNU chess engine uses; a proxy that passes data between the Winboard

and the server and finally a path planner that converts the robotic arm position produced by the server

into linear movements of the robotic arm.

Chesster has a robotic arm and so has the advantage of making the computers move, but has the

disadvantages of doing it very slowly, being expensive and occupying a lot of space. There are many

other chess robotic arms implementations, for example, Toto’s robot arm (Groen, Boer et al. 1992)

(Figure 2.3).

Figure 2.3: Toto’s Robot Arm Chess Player

7

Page 24: iCat, the Chess Player - Técnico Lisboa - Autenticação · João Gonçalves for always being there to help and for introducing iCat to me, we have made a good surgery team when

DGT Projects Electronic Chessboard

The DGT Projects (DGT 2007) board looks like any standard chess set with a standard set of

pieces. This board is available in two versions: Universal Serial Bus (USB) and serial (Figure 2.4).

Each one uses a connector located at the side of the board to communicate with the computer. The

majority of chess applications have integrated communications with this board (DGT 1998). After

initial setup (driver installation) and when using compatible software, moving a piece on the board

simply moves the same piece on the screen/application.

The chess pieces have a tiny transmitter giving the location and identity of each piece, the board

draws its power from the computer and has sensors that take the information through the USB or

Serial connection back to the computer. DGT electronic board has a modern, reliable sensor

technology that recognizes each piece accurately and fast. DGT Projects supplies the board protocol

and a Windows board driver programming library, making it easy to program applications that use the

electronic board. There are several sites on the internet that are using the board to present

tournament chess games “live”. In Fédération Internationale des Échecs (FIDE 2007) main

tournaments the board is used, proving its quality. One can also connect the board to a DGT XL

(Figure 2.4) clock that has special internet features, like an option to display messages. A drawback

of using this tangible user interface to play chess against a computer, or in the internet, is that the

user has to make the opponent’s move.

Figure 2.4: Serial version of DGT Projects Electronic Chessboard (shown in the left photo) and a DGT

XL clock (shown in the right photo)

2.1.1.3 Chess Engines

The term chess engine refers to a chess playing system that does not have an interface, since it is

the “thinking” part of a chess program. Chess engines are increasing their strength each year. This is

due to the constant increasing processing power of computers which allows greater depth

calculations in a given time. Programming techniques have also improved, enabling the engines to

acquire a better positional understanding. A chess engine system has to consider a number of

fundamental implementation issues, including:

8

Page 25: iCat, the Chess Player - Técnico Lisboa - Autenticação · João Gonçalves for always being there to help and for introducing iCat to me, we have made a good surgery team when

• Board representation (how a single position is represented in data structures).

• Search techniques (how to identify the possible moves and select the most promising ones

for further examination),

• Leaf evaluation (how to evaluate the value of a board position, if no further search will be

done from that position).

• The need for opening books and/or endgame tablebases.

Board Representation

The data structure chosen to represent a game position affects directly the performance of the

application. There are four different methods of representing a chessboard in a computer.

The most obvious and easy method is as a 64 elements long array. Each element represents a

square of the chess board that either is empty or is occupied by a chess piece. There are 12 different

chess pieces and one value is needed to represent an empty square; this fits into 4 bits per square.

For efficiency reasons, in most cases one byte per square will be used.

We can also use minimal coding where a chess position can be squeezed in fewer bits using

Huffman coding techniques (Huffman 1952). Such representations are not very useful for chess

engines, but they are commonly used for storing positions in a database.

Other method to represent the chessboard is by bitboards (Figure 2.5). This representation

contains a set of 64-bit integer numbers. Both sides have six numbers for all different types of pieces.

The 64-bit representation quickens search algorithms, the leaf evaluation and reduces the amount of

memory required to represent a position (Boškovic, Greiner et al. 2005). However, bitboards can

complicate debugging and can increase the time required to complete a project. Rotated bitboards,

another board representation method, provides additional information for certain types of pieces,

namely the sliding ones such as Bishops, Rooks and Queens. In this representation, bitboards are

rotated by 45, 90, and 135 degrees. The 45 and 135 degrees rotations are used for calculating

diagonal and the 90 degrees for calculating vertical moves.

Figure 2.5: Sample chess board position (shown in the left photo) and a bitboard representation of the

white pawns (shown in the right photo)

9

Page 26: iCat, the Chess Player - Técnico Lisboa - Autenticação · João Gonçalves for always being there to help and for introducing iCat to me, we have made a good surgery team when

Search Techniques

In 1949-50 Claude Shannon releases one of the first papers in computerized chess (Shannon

1950). This paper separates the chess engines in two types with two different search techniques:

brute force search and selective search.

(1) Brute Force Search (Shannon’s Type A)

Computer chess programs consider chess moves as a game tree. Each individual move by one

player is called a "ply". Using the minimax algorithm, the computer examines all the moves, then the

counter moves to that moves. This evaluation continues until it reaches a final "leaf" position, which is

evaluated and returned. Brute force search uses the minimax algorithm to examine every possible

position for a fixed number of moves. The disadvantage of this method is having a high branching

factor, which means that it does not search any line very deeply. The advantage is that it analysis

every move without discarding the “weird looking” ones.

(2) Selective Search (Shannon’s Type B)

In this search, again, we look for a fixed number of moves, but we avoid the “obviously bad moves”

by selective pruning of the tree. This leads to the reduction of the branching factor, which allows

having a deeper search in some lines, with the disadvantage of not looking at all of the possible lines.

Leaf Evaluation

The final board positions of a game tree are called “leafs”. To evaluate these positions we use an

evaluation function, also known as heuristic evaluation function or static evaluation function by game-

playing programs, to estimate the value or goodness of a position in the minimax and related

algorithms.

Opening Books and Endgame Tablebases

The opening book is a text file or a database containing a list of positions. When asked to make a

move, the program plays a move, if exists, from the file or database. Computers use opening books

because at the beginning of a game (openings) the first moves in some variants were already studied

for years, or even centuries, and the best moves are known. This will give the computer much more

time in the middle and endgames to do larger and deeper searches.

Endgame tablebases are computer generated databases of the simplest endgame positions. They

show perfect endgame play in positions with a small number of pieces on the board. Chess

computers have databases of all 3, 4 and 5 piece endgames so they often do not need to use up as

much time as expected in the endgame.

10

Page 27: iCat, the Chess Player - Técnico Lisboa - Autenticação · João Gonçalves for always being there to help and for introducing iCat to me, we have made a good surgery team when

2.1.1.4 Chess Engine Examples

We will present some freeware chess engine examples. All of them were written on ANSI C, have

a simple terminal/console interface and support the Winboard interface. The examples are shown in

increasing rating (chess strength) order: Tom Kerrigan’s Simple Chess Program; Gnu Chess; and

Crafty

(1) Tom Kerrigan’s Simple Chess Program

Tom Kerrigan’s Simple Chess Program (TSCP) is intended for people who want to learn about

chess programming. Its source code is designed to be very easy to understand (Kerrigan’s 2007).

However, the programming documentation file has little information and the source code could be

better commented.

TSCP uses simple 64 elements arrays to represent chessboard positions, which makes it easier to

understand, but less efficient.

Regarding to the search method, TSCP uses Negamax, an algorithm similar to minimax. The main

difference from minimax is that instead of checking the side to play to know if we have to maximize or

minimize, the algorithm is sensitive to the side to move and thus only maximizes. This means that a

position with white to move returns a positive value and the same position analysed by black must

return the inverse value. TSCP also uses the Alphabeta algorithm. Alphabeta is a search algorithm

that reduces the number of nodes that need to be evaluated in the search tree by the Negamax

algorithm. It reduces the time required for the search and it is restricted so that less time is wasted

searching moves that are obviously bad for the current player.

Quiescence search is used to address the problem of abruptly stopping a search at a fixed depth.

If a leaf is evaluated one move before the side to move can win a piece, the position will very likely be

assigned a value that underestimates the true merit of the position for the side on the move. For this

reason, the engine only evaluates positions whose value would not be open to substantial change if

searched one ply deeper. Chess engines address this problem by performing an additional search if

the terminal node is a capture or other potentially dangerous move. TSCP uses a simple evaluation

function that takes into account four distinct values: 1) material score, by simply a summing the piece

types multiplied by piece values; 2) pawn structure, which considers placement of pawns and also

evaluates passed pawns, double pawns, etc; 3) piece scoring which evaluates the placement of each

piece; 4) king safety, which considers the pawn shelter around the king.

The engine comes with a small opening book file. If the current board position has more than one

move mapped on the book, TSCP randomly chooses one.

11

Page 28: iCat, the Chess Player - Técnico Lisboa - Autenticação · João Gonçalves for always being there to help and for introducing iCat to me, we have made a good surgery team when

(2) Gnu Chess

Gnu Chess started as a collaborative effort on the internet to write a sort-of joint program, loosely

tied in with the Gnu project (FSF 1985) of freely available high-quality software. Gnu Chess features

simplified chess code, which make it more accessible, easier to modify, and more understandable for

skilled chess experts who are not necessarily programmers. Gnu chess also offers a very good

programming documentation file, and well commented source code.

The primary data structure of GNU Chess is the bitboard. Twelve bitboards describe the

whereabouts of all the pieces. To generate moves Gnu Chess uses rotated bit-boards.

Gnu chess search method is based on Professor Tony Marsland’s modification to alpha-beta

minimax called Principal Variation Search (Reinefeld 1989). PVS is a way to get a small performance

improvement out of the alpha-beta algorithm. Another improvement to the tree search is achieved by

the null move heuristic (Donninger 1993), which is a method for skipping searches in parts of the tree

where the position is good enough. This method consists of doing a null move, passing the move to

the opponent and then searching with reduced depth. If the result of this reduced search is higher

than beta, no further search is done; if the result is lower than beta a normal search is made. Gnu

chess uses hash tables to store information about positions in memory. Using hash tables, generally,

middle-game searches are sped up to 25%-50%, in the endgames where there are few pieces the

percentage is even higher because almost all positions turn out to be cached in the hash table.

The leaf evaluation of Gnu Chess is much more complex than the evaluation of the previous

examined engine, but also much stronger and flexible. It analyses the same aspects of the previous

engine, but it also analyses more complex situations such as trapped pieces. Besides, this engine has

different evaluation routines for different parts of the game (e.g. if it is an endgame with only two kings

and pawns on the engine side of the board, a special mating driver routine is called).

The opening book of Gnu Chess is a stored binary book file. It is compiled from a set of game

records in portable game notation (ChessWorld 2007). This way a user can also compile and build his

opening book. By default, the engine offers an opening book selection of Grandmaster games.

(3) Crafty

Crafty is a state of the art freeware chess engine written by Bob Hyatt (Hyatt 2007). It is a very

strong chess engine, winner of the 1983 and 1986 World Computer Chess Championships.

Crafty is designed around bitboards and rotated bitboards for reasons of speed of execution, ease

of adding new knowledge and a cleaner overall design.

The search method and leaf evaluation used by Crafty are similar to those described in Gnu

Chess. Although it has a lot more of optimization code, allowing it to perform deeper and smarter

searches. Crafty offers two opening books, one designed especially for computer versus computer

12

Page 29: iCat, the Chess Player - Técnico Lisboa - Autenticação · João Gonçalves for always being there to help and for introducing iCat to me, we have made a good surgery team when

matches, and the other useful to prevent it from playing ridiculous openings. Crafty is the only

analysed engine that provides endgame tablebases. The 3, 4, and 5 piece endgame tables total 7.5

gigabytes of storage.

2.1.2 Chess Playing Systems

In this section we evaluate from the user’s viewpoint the features, interfaces and engines of some

of the most successful commercial games: Battle Chess; Chessmaster Series; Fritz; and Chessbase.

We will also take a look at enhanced playing boards.

2.1.2.1 Battle Chess

Battle chess (Interplay 1988) was released by Interplay in 1988 and in its 3D interface all pieces

come to life and take part in animated battles which ensue when one piece takes another. There is a

different animation for each permutation, depending on which pieces are capturing or being captured.

Although the weakness of the chess engine, it ensures a variety of games, across ten skill levels

(Figure 2.6).

Figure 2.6: Screenshot of battle chess, where we can see a bishop versus bishop fight

2.1.2.2 Chessmaster Series

Ubisoft’s Chessmaster series are probably the most popular commercial chess programs around.

In 2006/07 at its 10th Edition (Ubisoft 2007), the software is an all around chess application featuring:

several 2D and 3D board interfaces; online play; a very strong chess engine that can perform

innumerous tasks such as move advices; a large database of played games; a Chessmaster

academy that has video tutorials, chess problems and puzzles that can teach the basic chess lessons

as well as advanced/medium lessons for more experienced players.

13

Page 30: iCat, the Chess Player - Técnico Lisboa - Autenticação · João Gonçalves for always being there to help and for introducing iCat to me, we have made a good surgery team when

2.1.2.3 Fritz

Fritz is a German Chessbase product (Fritz 2007) developed by Frans Morsch and Mathias Feist.

Its 2006/07, Fritz 10 has approximately the same features as the latest Chessmaster edition. The

interface is less friendly for novice players but it has the advantage of a stronger chess engine which

was developed for the “Man Vs Machine Duel” (Spiegel 2007) against the 2006/07 world champion

Kramnik, in which Fritz won (4-2).

2.1.2.4 Chessbase

Up to now, Chessbase (Chessbase 2006) is the most complete commercial chess database

software. Some of Chessbase features are: to enter, annotate and save games; to retrieve games

according to openings, players and tournaments; allows easy and direct access to the Chessbase

online database; contains more than 3.5 million games from 1530 to 2006 in which 60,000 games

contain commentary from top players; and with Chessbase we can buy online chess books, lessons

or video tutorials designed especially for this interface. Chessbase uses a proprietary format for

storing games, but can also handle games in portable game notation (pgn). It also includes chess

analysis tools based on Fritz, Junior, Shredder (all Chessbase products) and Crafty.

2.1.2.5 Enhanced Playing Boards

There are many commercial enhanced playing boards that provide already a chess engine,

allowing the user to play against the computer on an augmented physical board. Generally, these

augmented physical boards have little low resolution displays to show the computed moves to the

users. Some of them use sounds of the moves and have buttons to take back moves, start a new

game or any other option.

There are small boards with the size of a normal “PDA”, useful for travelling and there are also

very large boards designed for home play. Many manufacturers produce this type of chess boards

such as Saitek (Saitek 2007). This type of playing boards does not allow programming, so they can

only be used to play against the computer. Like in the DGT electronic board once we have the

information about the opponents move, we have to do it ourselves.

In figure 2.7 we can see an example of an enhanced played board designed for travelling and one

for home play.

14

Page 31: iCat, the Chess Player - Técnico Lisboa - Autenticação · João Gonçalves for always being there to help and for introducing iCat to me, we have made a good surgery team when

Figure 2.7: Pressure Sensitive Travel Chess Computer by Saitek (shown in the left photo) and

Mephisto Exclusive Kasparov Chess Computer (shown in the right photo)

2.2 Pervasive Gaming

Pervasive gaming brings computer entertainment back to the real world and overcomes some

restrictions of conventional computer games. Players no longer have to be tied to computer screens

and human computer interaction is not constrained by graphical user interfaces. Pervasive games

have both social and physical aspects that mixture real world entertainment with digital entertainment

creating new game experiences.

To give the reader an idea of the scope and diversity of this emerging field, Magerkurth et al

(Magerkurth, Cheok et al. 2005) categorizes pervasive gaming in five main genres according to the

gaming experience: computer augmented tabletop games, affective games, smart toys, location-

aware games and augmented reality games. In each genre, some examples are presented and

discussed in terms of benefits and technology.

2.2.1 Computer Augmented Tabletop games

Tables are a pervasive component in many real-world games. Players sit around a table playing

board or card games. Even though most require turn-taking, the ‘inactive’ player remains engaged

and often has a role to play (e.g. the chess player who continually studies the board) (Tse, Greenberg

et al. 2006). In tabletop games players are engaged with both the game and each other. People are

tightly coupled in how they monitor the game surface, and each other’s actions (GUTWIN and

Greenberg 2004). Computer augmented tabletop games gives us the best of two worlds: the

interaction and communication between the players, who sit around the same table, facing each other

at an intimate distance; and the computing support that can relieve the players of tasks, such as score

keeping or dice rolling, and can enhance the game with visual and audio effects.

15

Page 32: iCat, the Chess Player - Técnico Lisboa - Autenticação · João Gonçalves for always being there to help and for introducing iCat to me, we have made a good surgery team when

2.2.1.1 KnightMage

Researchers from Fraunhofer IPSI (Integrated Publication and Information Systems Institute) in

Germany have developed an augmented tabletop game named KnightMage built under their STARS

platform (Magerkurth, Engelke et al. 2004) (STARS stands for Spiel-Tisch-AnReicherungs-Sytem, a

German acronym for game table augmentation system). STARS platform (Figure 2.8) is an

experimental hardware setup for gaming applications composed by devices such as: public vertical

displays; personal digital assistants (PDAs) equipped with RFID antennas; and a centered smart

interactive table with a touch sensor display. The playing pieces are detected by an overhead camera

that also determines the positions of the players.

Figure 2.8: The STARS tabletop platform

In KnightMage (Figure 2.9), players explore and ransack dungeons and landscapes filled with

horrifying monsters, moderated by a human Game Master. The idea behind KnightMage is to

combine the strong social situations of traditional pen and paper tabletop role-playing games with the

benefits found in computer adaptations of role-playing games. What makes KnightMage especially

interesting is the change of cooperative behaviour when fighting monsters to competitive interests

when searching for treasures. In KnightMage, certain game events are privately communicated from

the game logic to a player PDA and players decide on their own if they want the others to know.

Another focus of KnightMage lies in the flexibility of interface integration. The game board can either

be rendered on a standard GUI, on a hybrid interface such as an interactive table surface or on an

entirely physical interface. This allows for researching the effects on the gaming experience of either

stressing the benefits of virtual representations and GUIs (i.e. rich audio and video, highly dynamic

and changing game boards, etc) or stressing the benefits of physical interfaces (i.e. direct control and

manipulation, no attention drain, etc.).

16

Page 33: iCat, the Chess Player - Técnico Lisboa - Autenticação · João Gonçalves for always being there to help and for introducing iCat to me, we have made a good surgery team when

Figure 2.9: The STARS interactive table showing KnightMage game board

2.2.1.2 Smart Playing Cards

Smart Playing Cards (SPC) is a computer-augmented card game that provides a number of useful

services to the players. These include automated score keeping, advice to novice players and alerts

of wrong moves. SPC (Figure 2.10) does not disrupt or modify the game flow of a conventional card

game, is portable and low-cost, and works reliably (Floerkemeier and Mattern 2006). The hardware

setup consists of: five RFID reader antennas integrated into a cover placed on the table surface; one

RFID label in each playing card; a tablet PC to interpret the RFID data, compute score and advice;

and one mobile phone for each player to communicate information such as score and advices.

Figure 2.10: Playing Cards and Mobile Phone (shown in the left photo) and Unobtrusive Integration

of RFID Tags (shown in the right photo)

2.2.2 Affective games

The concept of emotion or ‘affect’ is used to encompass a spectrum which includes feelings,

moods, sentiments, etc. (Axelrod and Hone 2005). Rosalind Picard distinguishes between inner

emotional experiences and the outward emotional expressions that people may use to convey

messages about their emotional states (Picard 1997). Emotional expressions are composed by, for

instance, tone of voice, body movements, gesture and facial expression. Computers are becoming

17

Page 34: iCat, the Chess Player - Técnico Lisboa - Autenticação · João Gonçalves for always being there to help and for introducing iCat to me, we have made a good surgery team when

more ubiquitous, and users’ requirements include design for engagement, enjoyment, fun and

playability, as well as usability. This can be accomplished by having technologies that benefit from

emotional design (Norman 2004). Capturing how a player is feeling at any given moment and

integrating this very personal representation of context into a game is the goal of affective gaming.

Affective technologies are still far to approach human abilities to detect and respond to emotional

expressions. Relatively few studies have therefore attempted to study user interactions with affective

systems that respond to human emotion (Axelrod and Hone 2005). Sensing certain aspects of a

player’s experience while engaged in entertainment technologies is more manageable and can create

“magical” game experiences.

2.2.2.1 Leonardo

Leonardo (Figure 2.11) is a humanoid robot with 65 degrees of freedom that was specifically

designed for social interaction by means of facial expressions and life-like body poses (Brooks, Gray

et al. 2004). Leonardo has the following software components: speech recognition and parsing; vision

and attention; cognition and behaviour, and motor control. A social game was created in which human

subjects interact with the robot in order to make him perform different tasks using speech and

gestures. The objectives of the game are: teaching the robot the names and locations of the different

buttons placed in front of him, checking to see if the he knows the names of the buttons, asking him to

push the buttons and finally making him known that the task is done. Leonardo uses gestures to

communicate its own capabilities and is constantly shifting its gaze between the object and the human

to direct the human’s attention to what he needs help with. The robot’s eye cameras allow him to look

directly at any point in a natural and believable flowing motion. Humans are easily able to perceive

errors of even a few degrees in eye contact, so this ensures that Leonardo acts as expected by a

socially-aware play partner (Brooks, Gray et al. 2004).

Figure 2.11: Leonardo acknowledges the human’s gesture towards a button by looking at that button

2.2.2.2 Smart Toys

Children are drawn away from traditional toys at a younger age and nowadays they tend towards

computer games. Pervasive Gaming may reverse these trends, as it can bring similar levels of

18

Page 35: iCat, the Chess Player - Técnico Lisboa - Autenticação · João Gonçalves for always being there to help and for introducing iCat to me, we have made a good surgery team when

interactivity that are available in computer games to traditional toys. The shape of a toy alone

suggests the way it should be played, but contrary to games, they are not bound by rules or

limitations (Herman D'Hooge 2000). If we apply Pervasive Gaming to toys preserving their usual ease

of use, it is a perfect way to extract principles of user interaction, which allows learning new gaming

experiences that might emerge. Smart toys take advantages of two worlds by integrating the power of

computers and electronic chips with traditional toys. It is predicted that in a near future every toy will

have interactive technology. Smart toys can so be defined as toys that use computing power.

2.2.2.3 SenToy

SenToy (Figure 2.12) has sensors in its arms, body and legs (Paiva, Chaves et al. 2003). These

sensors allow the user who interacts with the doll to influence its emotional state controlling its

emotions. A study was made to determine how users could express emotions by handling the

physical doll. With the study they have concluded the most common gestures to express its six

emotions (anger, fear, disgust, happiness, sadness and surprise). After the implementation, SenToy

doll was integrated with FantasyA, a role playing game in which players must exhibit emotions to

perform actions as a way to evolve in the game. SenToy is wirelessly connected to the computer and

has three sets of sensors: accelerometers, enabling us to know the value of the acceleration that

SenToy is subjected to; analogical sensor to determine the limbs position; and a digital sensor to

sense if the doll has its hands over the eyes or not to detect the fear emotion.

Figure 2.12: The SenToy tangible interface (shown in the left photo). Continuous up and down

movement with SenToy which represents the happiness emotion (shown in the right photo)

2.2.3 Location-aware games

Location-aware games use the world we live in as a game board, and can make objects and body

movements as an integrating part of our digital games. Doing so we are mixing the virtual space with

elements of the real world creating innovative and fun pervasive game experiences. The player has to

play in two worlds and consider his virtual game consequences as well as the consequences of his

actions in the real world. The growing rate of integration of localization technologies like GPS on

19

Page 36: iCat, the Chess Player - Técnico Lisboa - Autenticação · João Gonçalves for always being there to help and for introducing iCat to me, we have made a good surgery team when

mobile devices such as PDAs, cell phones or portable game consoles enables pervasive mobile

gaming. Since location-aware games can be integrated easily on mobile devices, they also benefit

directly from the predicted huge increase in the mobile gaming market revenues.

2.2.3.1 CityPoker

CityPoker (Schlieder 2005) is played by two teams that start with a given poker hand. The players

move around in an outdoor environment where they are able to find cards hidden in caches in order to

trade their cards and improve their poker hand. The caches (Figure 2.13) are five geographic

locations and in each one of them there are two hidden cards. To find the caches the players get a

map in their GPS enabled device showing five imprecise large rectangular regions. They can increase

the precision of the locations in their map by taking quiz questions and therefore decreasing the area

they need to search for the cards. If a team cannot answer the quiz questions they can ask for help at

somebody on the street. After asking for help, if they cannot complete the quiz they will have to

search all of the three possible locations for a cache. Each team may select one out of the two cards

at every cache, but a team may not visit a cache twice. The game has a two hour limit and when the

game ends the team with the best poker hand wins.

Figure 2.13: Starting card distribution (shown in the left photo) and GPS track of a team in a cache

region (shown in the right photo)

2.2.4 Augmented reality games

Augmented Reality (AR) is a technology that brings virtual objects into the real world. AR

environments provide more enhanced immersion by seamless merging of real and virtual worlds. It

also provides realism through interaction with augmented objects (Azuma 1997). AR can be created

by several different ways, although for gaming three general approaches are used (Magerkurth,

Cheok et al. 2005): use of head-mounted displays (i.e. the users see the virtual objects along with the

video of the real world taken from a camera mounted in their headset), using projected images on real

20

Page 37: iCat, the Chess Player - Técnico Lisboa - Autenticação · João Gonçalves for always being there to help and for introducing iCat to me, we have made a good surgery team when

world surfaces and using hand-held devices attached with video cameras that blend virtual content

with the camera information.

Currently, AR games are more focused on the technology rather than on game design, but the

technology is becoming more stable and novel game designs are beginning to appear.

2.2.4.1 Augmented Reality Worms

AR Worms was created based on the Worms computer game (Figure 2.14) produced in 1994 by

Team17 Software (Team17 2007). In AR Worms, the game area is a large table set up between

players. Each player wears a head mounted display. The game area is augmented with a deformable

3D terrain, with worms laid out randomly across it. Each worm has its name and health floating above

them and a large red arrow is used to indicate the active worm. To control their worms, players use a

wireless gamepad. Gaze selection was implemented: to select a worm or weapon a player looks

directly at it on the table and after a short time the selection is made. Additional info such as wind

direction, which varies from turn to turn, is indicated in AR Worms by leaf particles that float through

the air between players in appropriate speed and direction in the 3D virtual projection. Players can

also control their worms from a first person perspective by using a virtual reality mode (NILSEN,

LINTON et al. 2004). This game evaluation showed that the use of AR in table-top games has great

potential.

Figure 2.14: AR Worms (Shown in the left photo) and the original game (shown in the right photo)

2.3 Concluding Remarks

Traditional chess is an ancient table-top game in which two real opponents battle in that familiar

black and white 64 square board. Computerized chess is primarily played on a GUI of a computer

screen without any social interaction. In this chapter we give examples of how we can bring

computerized chess back to the real world. As analysed earlier in the introduction chapter,

computerized chess has at least two disadvantages over traditional chess and we will address each

one independently.

21

Page 38: iCat, the Chess Player - Técnico Lisboa - Autenticação · João Gonçalves for always being there to help and for introducing iCat to me, we have made a good surgery team when

The first disadvantage – the use of a GUI instead of a chess game board – can be attenuated or

eliminated by the use of one of the analysed tangible user interfaces for computerized chess. Also, if

we look at the analysed examples of pervasive gaming, we easily get new ideas of how to represent

the GUI into the real world, achieving a more pervasive experience. One example of this could be

using the STARS platform in which KnightMage was constructed, and use its smart table to represent

the board and move the chess pieces with its touch sensors; another example is to use a head-

mounted display as referred in the AR Worms game, to merge the virtual chess board and pieces into

reality.

To fade or eliminate the second disadvantage of computerized chess – no emotional response by

the opponent – we have not yet discovered an implemented GUI or tangible interface that addresses

the problem. But again, if we take a look at the pervasive game examples we can easily imagine a

robot like Leonardo happy because it’s winning and have captured your queen. We can even imagine,

like in the smart cards example, that there is an agent in a mobile that connects wirelessly to a DGT

electronic chessboard, telling the user the move he wants to make and showing the user how sad it is

because he has captured the users queen and his personality makes it sad when the user is losing. It

can also give advices on how to play.

As we have seen, the two problems noticed in computerized chess can be attenuated by

integrating pervasive gaming elements in computerized chess. By doing so, some virtual elements of

computerized chess can be brought back to real life. Nevertheless, pervasive gaming offers much

more opportunities rather than simply addressing these two problems, such as new innovative gaming

experiences that can be created. For instance, we can take inspiration from the CityPoker game and

imagine a new game where we search for hidden cards that will give us advantages in the chess

game disputed afterwards by changing the default rules of chess, like in Tempête sur l'échiquier

("Storm on the Chessboard") (Chessvariants 1986). Maybe in a near future every child will learn to

play chess with her smart toy opponent and tutor.

22

Page 39: iCat, the Chess Player - Técnico Lisboa - Autenticação · João Gonçalves for always being there to help and for introducing iCat to me, we have made a good surgery team when

Chapter 3

Conceptual Model

This conceptual model describes how to design a pervasive chess game. With this model, we

intend to take the better of two worlds, by putting together the advantages of both real world and

computerized chess.

First, in section 3.1, we depict a conceptual model for a traditional chess game played between

two human players with a regular chess board. In section 3.2, we follow by drawing the model of a

computer application of a chess game for one player only. Finally, in section 3.3, we merge the two

earlier identified models to conceptualize a pervasive chess game.

Since the objective is to design a pervasive game, we will divide all the conceptual models

described below in widely used domains of pervasive gaming (Magerkurth, Engelke et al. 2004). The

models will comprise game elements of one to three domains: physical, social and virtual.

Physical Domain – The physical domain lies in the world around us. Gaming elements in this

world generally stand for Tangible User Interfaces (TUI). TUIs allow us to physically represent and

control the underlying virtual gaming world.

In the physical domain everyday life properties can be used in a game. For instance, we can take

information from the weather outside our window and use that data to change the virtual world

accordingly.

Social Domain – Games with a social domain use for the most part face to face interactions to

include elements such as directed speech, gestures and showing or capturing emotions. In social

experiences players interact in a natural fashion, therefore making the experience more instinctive

and socially rewarding.

Virtual Domain – This is the typically used environment in nowadays gaming. Any game involving

a computerized scenario has a virtual domain, where the digital game logic is displayed usually by a

Graphical User Interface. The term virtual often means “something that is almost something else”.

Virtual is not Real but can display all the qualities of Real and therefore it is widely used in computer

gaming where it tries on numerous occasions it tries to mimic the Real.

23

Page 40: iCat, the Chess Player - Técnico Lisboa - Autenticação · João Gonçalves for always being there to help and for introducing iCat to me, we have made a good surgery team when

3.1 Conceptual Model of a Traditional Table Top Chess Game

Figure 3.1: A conceptual model and cycle of a traditional chess game.

In figure 3.1 we can see a conceptual model for a regular chess game between two players. This

type of human to human interaction presents game elements from the physical and social domains as

integral parts of the gaming experience.

3.1.1 Social Domain

In a classic chess game between two human players, there is a strong component of social

interaction. One player interacts with the other, for example, by asking to take back one move. The

opponent chooses to accept or deny that request and may express an emotional reaction. Another

example of social interaction in a chess game happens when we try to study our opponent’s “mind”

by, for instance, detecting that false signal he just made, representing a terrible gaffe, with the

intention of bluffing. Some players think that the priceless look on the face of a defeated opponent is

what makes, across the board chess, the game it is. In chess tournaments the social domain is less

important because players cannot talk or distract the opponent, but even though, there are still

examples of the use of social tricks to cause discomfort or annoy adversaries in high level

tournaments.

24

Page 41: iCat, the Chess Player - Técnico Lisboa - Autenticação · João Gonçalves for always being there to help and for introducing iCat to me, we have made a good surgery team when

3.1.2 Physical Domain

The player and his opponent are present in the physical domain because it is where they interact

with the chessboard. Since a chessboard is shared by both players, when a player inputs a new

move, that move becomes the output of the adversary.

3.2 Conceptual Model of a traditional Computerized Chess Game

Figure 3.2: A conceptual model and cycle of a traditional computerized chess game.

In the figure above (Figure 3.2) a conceptual model for most of the computer chess games

available today is presented. Although the player could be represented in the physical domain, there

is no interaction in that domain, so there is no need to represent it. The virtual domain, on the other

hand, is where all the interactions of a computerized chess game take place.

25

Page 42: iCat, the Chess Player - Técnico Lisboa - Autenticação · João Gonçalves for always being there to help and for introducing iCat to me, we have made a good surgery team when

3.2.1 Virtual Domain

Most chess computer games use a mouse driven graphical user interface, providing the user with

the control of the pieces in a virtually displayed chess board. The GUI enables the player to input his

move into the virtual domain. Afterwards a chess engine analyses the state of the chessboard and

computes its move. Finally, the GUI updates the virtual chessboard with the engine’s move, in order

to offer output to the user.

With the presented model, we are able to play a one player chess game with the assistance of the

controls and representation offered by the GUI, combined with the computing power of a chess

engine. The term opponent does not appear in this model because even though there is a chess

engine that “thinks” about the best move to make, the embodiment of such opponent is not physically

or virtually represented.

3.3 Conceptual Model of a Pervasive Chess Game

26

Page 43: iCat, the Chess Player - Técnico Lisboa - Autenticação · João Gonçalves for always being there to help and for introducing iCat to me, we have made a good surgery team when

Figure 3.3: A conceptual model for a pervasive chess game.

3.3.1 Advantages of the Previous Models

From the analysis of the two previous models (sections 3.1 and 3.2), we conclude that: a

traditional chess game (a) has the advantage of providing innumerous social possibilities between a

player and an opponent, (b) rewards the player with a physical experience provided by a real Chess

Board where the representation matches the controls.  On the other hand, computer chess games (c)

give us the opportunity of playing a one player game using a chess engine which allows us to play a

chess match any time of the day, any number of times we desire. Chess playing systems, as seen in

section 2.4.1, (d) provide users with a large number of tasks that are only possible recurring to a

chess instructor or a chess book. Some examples of these tasks are move advices, a large database

of played games, video tutorials, chess problems and chess puzzles.

3.3.2 Pervasive Chess Game Model

To bring together the advantages mentioned in the previous subsection into one single model, we

show in figure 3.3 a model of a pervasive chess game. This model comprises the virtual domain

deriving from the computer chess game model, and both the physical and social domains coming

from the traditional table top chess game.

Why should we call this model a pervasive chess game model? Why not name it a hybrid chess

game or even a computer augmented chess game? These questions can be answered with the

definition of pervasive gaming given in section 2.2. In its definition, a pervasive game should have

both social and physical aspects to mixture real world entertainment with digital entertainment, which

is exactly our goal. Any chess game developed under this model belongs to at least two pervasive

gaming genres: Computer Augmented Table top Games and Affective Games.

27

Page 44: iCat, the Chess Player - Técnico Lisboa - Autenticação · João Gonçalves for always being there to help and for introducing iCat to me, we have made a good surgery team when

3.3.3 Chess Playing Agent / Opponent

Drawing together the advantages described above is possible by developing a social software

agent that interacts with a computer augmented table top chess game. A software agent is an artificial

software system situated in a computerized environment, which senses that environment and acts on

it, over time, achieving its goals. A social software agent focuses on anthropomorphism because it is

the key requirement to guarantee collaboration between human and agents (Baylor 2002). Social

agents can interpret human cues or imitate them; such social cues are, for instance, natural language

speech or showing emotions via facial expression or gestures. Therefore, to perform such social

cues, the agent must be virtually or physically embodied. By bringing a social agent that is capable of

simulating human emotions into a game we are in presence of an affective game (see section 2.2.2).

In our model, the chess playing agent/opponent appears in a hatched line across the virtual and

physical domains because it can be physically or virtually embodied. If the opponent is physically

embodied it coexists in the virtual domain as well, because the agent’s mind is always in the virtual

world.

3.3.4 Social Domain

The social elements of a classic two player table top chess game can also be achieved through an

embodied social agent in a one player computerized chess game. The idea is to maintain the social

interaction between the player and the agent and by that simulate the real human to human

interaction, described in the social domain of the first model. For instance, while waiting for the

opponent’s move, the player can try to read the embodied agent’s “mind”, or even look at its defeated

expression when it loses.

3.3.5 Virtual Domain

When comparing the virtual domain of this model to the one of computer chess model, it loses the

GUI to display the virtual chessboard since the objective is to have a chess tangible interface in the

physical domain to replace it. Although not represented in the figure 3.3, a GUI might be also included

to display a virtually embodied opponent and data such as tips and advices.

The chess engine still subsists, but we can also consider it as a part of the agent’s mind and

include it in the chess playing agent. The objective of the chess engine is the same, which is to

provide a single player mode and all the advantages of computerized chess gaming. The input of the

chess engine this time is not provided by the GUI but by the computer augmented chessboard. After

the computation, the chess engine’s move is transmitted to the chess playing agent.

28

Page 45: iCat, the Chess Player - Técnico Lisboa - Autenticação · João Gonçalves for always being there to help and for introducing iCat to me, we have made a good surgery team when

3.3.6 Physical Domain

In the direction of maintaining the physical domain of a traditional table top chess game and

preserve the virtual possibilities offered by computers, we need one chess tangible user interface (see

section 2.1.1.3) to replace the virtual chessboard of computer chess applications with a real

chessboard with augmented computation. Using a tangible user interface, we can input the user’s

move into the virtual domain simply by moving a piece in the chessboard.

After knowing the agent’s move, the agent has to act on the chessboard like as a real life

opponent. The agent may have the capability of moving its pieces with, for example, a mechanical

arm. If so, he plays the move, otherwise, the agent must ask the player to make the move.

3.4 Concluding Remarks

In this chapter we presented a model of a pervasive chess game. This model was constructed by

the mixture of game elements from both computerized chess and traditional table-top chess.

Therefore by following this new model to build a pervasive chess game we have game elements from

the three identified domains: social, physical and virtual.

We believe that this innovative chess game design can bring new fans to the game, like battle

chess (consult section 2.1.3) did back in 1988. This model can also be used to create a chess tutor

for use in schools taking advantage of the benefits that chess offers to education.

29

Page 46: iCat, the Chess Player - Técnico Lisboa - Autenticação · João Gonçalves for always being there to help and for introducing iCat to me, we have made a good surgery team when

30

Page 47: iCat, the Chess Player - Técnico Lisboa - Autenticação · João Gonçalves for always being there to help and for introducing iCat to me, we have made a good surgery team when

Chapter 4

Implementation

In the previous chapter a conceptual model for a pervasive chess game was presented. Following

that model, we implemented a chess game named “iCat, the Chess Player”. In this chapter we will

describe the chess game architecture (see figure 4.1).

“iCat, the Chess Player” is a game where a user plays a chess game against a social embodied

agent, the iCat. The game is played on an electronic chessboard that automatically detects the user’s

moves. A game can begin from the initial position or from any valid chess position (e.g. a chess

problem). The user can take hints about the state of the game by analysing iCat’s facial expressions.

Mood is one of the aspects to consider. For example, if iCat is expressing a very happy face it means

that it is winning. Likewise, after every move played, iCat also gives feedback about what it “thinks”. If

the user played a bad move iCat reacts with a happy animation. When this happens the user can take

back the move and play another one. By repeating this process, chess can be learned by

distinguishing the bad from the good moves. Since iCat does not have any mechanism that allows it

to move the chess pieces it verbalizes its move to the user who plays the corresponding move.

Figure 4.1: iCat Chess Player Architecture

31

Page 48: iCat, the Chess Player - Técnico Lisboa - Autenticação · João Gonçalves for always being there to help and for introducing iCat to me, we have made a good surgery team when

To describe the pervasive game’s architecture we will begin to describe the two chosen pervasive

elements for the chess playing agent and for the chess tangible user interface. Next, we will describe

iCat the Chess Player Module, its state machine, chess engine and emotion system.

4.1 Pervasive Elements

The pervasive elements in iCat The Chess Player game are the physical components that allow us

to bring the social and physical domains to a computerized chess game. To build a pervasive chess

game based on the model presented on section 3.3, we had to choose the technology of the

pervasive elements, which are the embodiment of the chess playing agent and the chess tangible

user interface.

In this section, we introduce and describe the technology of the chosen pervasive elements.

4.1.1 Chess Playing Agent Embodiment

The chess playing agent chosen for the implementation had to give the user the ability of

understanding what the agent is thinking, which would allow us to simulate the human to human

interaction of a traditional two player chess game (consult section 3.1). The natural manner used to

perform these interactions is by body gestures and facial expressions. Given the above, the chess

playing agent must have social skills and therefore it must be a social agent.

In our conceptual model we state that the chess playing agent could have a physical or a virtual

embodiment. In the implementation we had to have both, this happens because in the evaluation

chapter we want to test if the users have more fun while playing with a physical opponent than with a

virtual one. The selected embodiment for both the physical and virtual opponent was a social robot

named iCat.

4.1.1.1 iCat Robot

In Figure 4.2 we can see iCat, a user-interface robot developed by Phillips Research (Breemen

2004) that is capable of mechanically rendering facial expressions. iCat uses 11 servos and 2 motors,

used for controlling individual parts of the iCat body, such as its eyelids and body. A webcam is

located on iCat’s nose and it can be used for computer vision algorithms, such as recognizing faces.

Located on the robot’s front there is a loudspeaker controlled by an internal soundcard device. The

speaker is used for speech and sounds.

With all these capabilities iCat can be considered a social robot since it has many of the

characteristics needed to simulate human-to-human interaction. Therefore it is a good choice to

embody our social chess playing agent.

32

Page 49: iCat, the Chess Player - Técnico Lisboa - Autenticação · João Gonçalves for always being there to help and for introducing iCat to me, we have made a good surgery team when

Figure 4.2: iCat expresses different emotions

The iCat Research Platform which comprises three components: an iCat robot, a website for

supporting iCat Research Community and a software tool entitled “The Open Platform for Personal

Robotics” (OPPR).

OPPR System

The OPPR software development environment provides programmers with development of

building blocks used for creating applications for social robots like the iCat. OPPR system (see Figure

4.3) is divided in four parts: architecture, animation, connectivity and intelligence.

Our application – iCat the Chess Player – was developed using OPPR software tool and modules

from three distinct parts of the architecture. The only unused part was Connectivity because it has

only one component, the mail module used to read and answer emails, and it was of no use for the

application.

33

Page 50: iCat, the Chess Player - Técnico Lisboa - Autenticação · João Gonçalves for always being there to help and for introducing iCat to me, we have made a good surgery team when

Figure 4.3: OPPR System

Architecture

Each building block (module) is developed under the DML Middleware which defines a software

component model for developing modular applications. Each Dynamic Module Library (DML) module

is runtime interactive, platform-independent and object-oriented. A DML API for C++ is provided

allowing OPPR users to create DML modules for controlling iCat at their needs. Since we have

chosen iCat as the embodiment of our social agent, our pervasive chess game was also built under

this architecture and therefore it is a module running in the OPPR system.

In order to add and remove modules from the OPPR system the software tool also provides us

with a console. With the OPPR console we can dynamically add, probe or remove modules while

they are running.

Animation

A graphical application named Animation Editor is included on the OPPR software tool. With the

animation editor we can easily build precise animations for the iCat robot. Once created, the

animations are stored in “*.raf” files. This type of files can also be edited using this application. By

using this editor, we have created the animations to use in our application. This was achieved by

editing the value over time of each of the iCat’s individual servos and motors.

The “*.raf” files can be used in OPPR applications via the Animation Module. This DML module

allows us to blend pre-scripted animations and control algorithms at runtime. We have used the

34

Page 51: iCat, the Chess Player - Técnico Lisboa - Autenticação · João Gonçalves for always being there to help and for introducing iCat to me, we have made a good surgery team when

OPPR console to launch both the application and animation modules. To communicate between

those modules we have created a C++ class interface for the animation module.

If the iCat is unplugged, it automatically launches a window with a virtual iCat that replaces the

physical robot. Using OPPR System gave us the advantage of not having to create a three

dimensional model for the iCat’s virtual embodiment.

Intelligence

The intelligence part of the OPPR system consists of the Scripting Module. Based on the Lua

scripting language (PUC-Rio 2007), we can build scripts and load it through the Scripting Module.

This is an alternative to the development of DML Modules in C++. Although a scripting language can

make the act of developing dialogues easier, we have used this alternative only in the beginning for

testing purposes and to implement iCat mood.

4.1.2 Chess Tangible User Interface

On the related work (in section 2.1.1.3) we have analysed some computerized chess TUIs. Since

none of our objectives is to construct a TUI, we have only the selected programmable commercial

tangible user interface available, the DGT Electronic Chessboard from DGT Projects.

4.1.2.1 DGT Electronic Chessboard Class

Two versions of this board are commercially available one USB and one serial (COM) version. We

built up the pervasive chess game using the USB version. DGT Projects Electronic Chessboard

supplies a board communication protocol manual and a DLL windows board driver. To facilitate the

use of this DLL in our application we have created a C++ class file (electronicboard.cpp). The UML

Class diagram of this class can be consulted in appendix A1. The developed class was based on the

c-Language source code provided by Ben Bulsink at DGT Projects website.

To create an instance of our electronic chessboard class we have to give the information of what is

the USB port number being used by the chessboard, because we were unable to automatically

retrieve it. Once instanced, we have a method that verifies if the board is stable and able to

communicate with the DLL. When the board is stable we can verify if a new move was played, if so,

we have a method (GetMove) that returns a string in coordinate chess notation. For example, if it is

the first move of a chess game and white plays the g1 knight to f3, we would get a string with the

following content “g1f3”.

35

Page 52: iCat, the Chess Player - Técnico Lisboa - Autenticação · João Gonçalves for always being there to help and for introducing iCat to me, we have made a good surgery team when

DGT XL Clock

As we have related before, there are few chess tangible user interfaces that possess a physical

mechanism useful to move its chess pieces. DGT electronic chessboard doesn’t have that

mechanism. By using this board the user has to play the computer’s move on the chessboard.

Therefore, the user has to know the computer’s move to play it, and for that, we have used the

speech and gestures provided from the chess playing agent. However, after some tests with users,

we have concluded that they sometimes needed to hear the computer’s move more than one time.

Consequently, we did not want to annoy the users by constantly repeating the computer’s move. To

address this situation we came up with the solution of connecting a DGT XL clock to the chessboard,

using it to display the computer’s last move (see Figure 4.4).

Figure 4.4: DGT XL clock displaying the computer’s move

In the developed electronicboard.cpp class we have created a sendclockmessage method that

receives the computer’s move string and displays it on the digital chess clock.

4.2 iCat The Chess Player Module

iCat the chess player module is a DML time-based execution module created to run on the OPPR

system. This module comprises the “mind” of our game, a state-driven social agent that plays chess

with the user via an electronic chessboard with the goal of winning the game. The agent also engages

users by expressing its affective state during the game through its embodiment. Being a state-driven

agent, its “mind” is controlled by a finite state machine.

36

Page 53: iCat, the Chess Player - Técnico Lisboa - Autenticação · João Gonçalves for always being there to help and for introducing iCat to me, we have made a good surgery team when

The state machine controls three components (see Figure 4.1): the chess engine and the emotion

system that will be analysed in this section, as well as the electronic board interface already depicted

in the previous section. To conclude this section the state machine will be widely analysed.

4.2.1 Integration with a Chess Engine

To build a one player computerized chess game, and to use the board evaluation value in the

emotion system, we need to integrate our application with a chess engine.

As discussed in section 2.1.2 there are several freeware open source chess engines of different

strengths. In our application we did not had the need of a very strong virtual chess opponent. The

focus was to add the social and physical domains to the game. Therefore, the engine did not have to

play at grandmaster level. Examining all the available engines we have concluded that Tom

Kerrigan’s Simple Chess Program (TSCP) would give as the same features as the others but with

less implementation time.

The chosen engine is written in C language and has a simple console/terminal interface. Since we

wanted to use the chess engine in a DML Module (written in C++) we created an object oriented

version of TSCP. The UML class diagram can be consulted in appendix A2.

We have added two additional features to TSCP. The first one was to insert random moves to a

game because even with the smaller depth possible, some opponents find it hard to win. Now we can

generate a random move by using the method playRandom which returns a random possible move in

coordinate chess notation.

The secondly added feature was the ability of beginning a chess game from any position. This is

now possible by calling the method putPosition however we have to supply some information because

it is not possible to know, only by the pieces on the chessboard. Necessary information is to know the

next color to move, because the game can start in the same position but with a different side to move.

Also by the current state of the board we cannot take conclusive information if a castle is legal

because any player may have moved their king and returned to the initial position, this happens

because by chess rules a castle is only possible if the king has not yet moved. Therefore to call the

method putPosition three arguments are necessary: (1) the color to play in the next move; (2) A

number representing if castle is still possible; (3) the board representation in a 64 positions array data

structure.

4.2.2 Emotion System

The emotion system is triggered after the user plays his move. It receives the board evaluation

from the chess engine and after processing those values the state of the agent is updated. The

37

Page 54: iCat, the Chess Player - Técnico Lisboa - Autenticação · João Gonçalves for always being there to help and for introducing iCat to me, we have made a good surgery team when

affective state will then be reflected in the embodied agent’s behaviour, which is controlled by the

animation module.

The complete design and implementation of this system is described in (Leite 2007). In this

emotion system, the agent has two main components: emotional reactions and mood. In this section

we will depict both.

4.2.2.1 Emotional Reactions

Emotional reactions are computed using the emotivector model. Emotivector is an anticipatory

mechanism joined with a sensor that (Martinho and Paiva 2006):

1- Uses the history of the previous sensed values to anticipate the next sensor state.

2- Interprets the mismatch between the prediction and the sensed value, by computing its

attention grabbing potential and associating a basic qualitative sensation with the signal.

3- Sends its interpretation along with the signal.

The prediction of the next sensor state is based on the moving averages algorithm

(NIST/SEMATECH 2007). This algorithm has the purpose of smoothing a data series making it easier

to spot trends. Depending on the sensed values, which in this case are the values sent by the chess

engine, different sensations are selected. Having selected a sensation, a corresponding predefined

animation that reflects an emotion (e.g. happy, sad…) is played on the embodied agent via the

animation module. The employed animations were provided from the OPPR platform. We have

chosen these animations because they have already been submitted to tests which verified that users

perceived those emotional expressions on the iCat’s embodiment (Bartneck, Reichenbach et al.

2004).

To exemplify a generation of an emotional reaction, we can follow with an example in which iCat

has a small advantage in the game (in terms of material or position of the pieces) and suddenly the

user commits a mistake allowing iCat to capture her queen. In this case the triggered sensation will be

a “stronger reward”, which will lead to a happy emotion. We believe that this anticipatory mechanism

increases iCat’s believability, allowing a more engaging experience to the user. This factor positively

affects the likeability of the character, increasing user’s attention to the agent’s emotional reactions

and motivation to interact with the iCat.

4.2.2.2 Mood

Comparing to emotional reactions, mood is a more lasting affective state. It is less specific,

frequently less intense and less likely triggered by a particular stimulus or event (Thayer 1989). iCat’s

mood is controlled by a valence variable that ranges from -100 to 100. The value of this variable is

based on the evaluation function of the current board and therefore it also changes when the

38

Page 55: iCat, the Chess Player - Técnico Lisboa - Autenticação · João Gonçalves for always being there to help and for introducing iCat to me, we have made a good surgery team when

opponent makes a move. However, this change is done progressively and without abrupt variations. If

iCat is winning the board evaluation is positive and therefore the valence values are also positive (100

means that iCat will soon checkmate its opponent), whereas negative values appear when iCat is in a

least favorable position than its opponent (-100 means that iCat is probably going to lose).

Mood uses two predefined facial expressions, a “happy” and a “sad” face, each one corresponding

to one of the limits of the valence variable. Again, these two parameterizations are based in the

animations existing in the OPPR platform. The “happy” face, as defined in the parameterization, is

displayed when valence is 100. The facial expressions for the remaining positive valence values are

computed by interpolation of that parameterization, resulting in happy faces with smaller intensities.

The same happens to the negatives valence values, this time employing the “sad” face

parameterization. When the valence value is close to zero, the facial expression tends to become

neutral.

While in this application emotional reactions have the maximum duration of ten seconds, mood is

always present. Even though, in the absence of new stimuli, the facial resultant facial expression

tends to become neutral, due to the implemented decay of the valence variable.

4.2.3 State Machine of iCat the Chess Player

Finite state machines (FSMs) have for many years been the AI coder’s instrument of choice to

imbue a game agent with the illusion of intelligence (Buckland 2004). A finite state machine is a model

of a device, which has a finite number of states that can at any given time make a transition to

another state, sometimes by causing an output or action to take place.

In this section the state machine of our game agent is presented (see Figure 4.5). This finite state

machine has six states. We will explain what happens in each one of them. Each state is depicted by

its conditions and state transitions (see Table 4.1).

Current State  Condition  State Transition Begin  a ‐ White to move  Thinking Begin  b ‐ Black to move  Waiting For User's MoveThinking  c ‐ Return the board value to the reaction state  Reacting Reacting  d ‐ Reaction animation over  Waiting for My Move Reacting  i ‐ The user takes back his move  Waiting For User's MoveWaiting For My Move  e ‐ The user makes my move  Waiting For User's MoveWaiting For My Move  g ‐ The game ends  Game Over Waiting For My Move  i ‐ The user takes back his move  Waiting For User's MoveWaiting For User's Move  f ‐ The user makes his move  Thinking Waiting For User's Move  f ‐ The user makes his move and the game ends  Game Over 

Table 4.1: Table of conditions and transitions of iCat The Chess Player State Machine

39

Page 56: iCat, the Chess Player - Técnico Lisboa - Autenticação · João Gonçalves for always being there to help and for introducing iCat to me, we have made a good surgery team when

Figure 4.5: Game State Machine on the iCat’s perspective

4.2.3.1 Begin State

In this state iCat plays a welcome animation that we created on the animation editor. In this

animation, the iCat “wakes up” and says the “Let’s play” sentence to the user. Animation editor,

besides giving us control of iCat’s servos and motors, also enables using text to speech sentences

and wav sounds for sound output in the iCat’s front speaker.

From begin state can transit to two other states. In chess whoever has the white pieces is the first

to move, so if iCat has the white pieces it moves to the thinking state. If on the other hand iCat is

destined to have the black pieces it has first to wait for the user’s move and therefore transit to the

Waiting for User’s move state.

However the begin state can start from any valid chess position it does not have to necessarily

begin from the starting position where white is always the first to move. By using a configuration file in

XML format, we allow users to define the side to move as well as many other options. In appendix B1

we give an example of the XML file used to customize the game. Another configuration file (Appendix

B2) was a language configuration file created to use together with a Portuguese text to speech to edit

iCat’s speech sentences and animations. We have also created a second language configuration file,

designed to use with an English text to speech, this file was used at a demonstration we did at the

ACII (affective computing and intelligent interaction) conference (Appendix C1).

40

Page 57: iCat, the Chess Player - Técnico Lisboa - Autenticação · João Gonçalves for always being there to help and for introducing iCat to me, we have made a good surgery team when

4.2.3.2 Thinking State

This state uses the chess engine to choose the best move for iCat and to evaluate the value of the

current board position. The current board’s evaluation is the value returned, after a depth search, from

the leaf evaluation (consult section 2.1.1.4) of the chosen move.

When the move is chosen we pass along to the next state, reacting, where the returned value and

the chosen move are used.

One second can be used to compute iCat’s move or it can take one minute. The choice relies on

the user who can make his opponent stronger by editing the XML file to change the engine’s search

depth or its thinking time. If the user limits the search depth the engine will take more time on

openings because there are more variations to analyse, and less on the endgame. If a constant

thinking time is desired the xml attribute, thinking time, can be altered.

4.2.3.3 Reacting State

This state uses the emotion system described before to react to the user’s move by changing

iCat’s affective state. Emotion system uses the board’s value computed in the previous state.

We have created several idle animations that are randomly used to simulate iCat looking at the

chess board thinking about what move to make. These animations happen after the iCat’s animation

of the corresponding emotional reaction finishes playing. The final step in order to transit to the next

state is to verbalize the previously chosen move. This is achieved by communicating text to speech

sentences into the animation module. After saying its move a transition to the waiting for my move

state is reached.

In this state a second transition is allowed. It happens when the user takes back her last move. For

example, if the user has played the pawn on e2 to e4, and iCat is reacting to that move, the user can

interrupt iCat’s reaction state by playing his pawn on e4 back to e2. When this happens iCat uses a

text to speech sentence to tell the user that he can play again, transiting to the Waiting for User’s

Move state. This allows the user to see iCat’s reaction and use that information to take back his

move. This is possible because the chess engine saves the history of the chess game, and after a

move is played we verify if it is a new move or a take back move. If it is a take back move we update

the chess engine taking back the move.

4.2.3.4 Waiting for My Move State

Waiting for my move state presents a time waiting period until the user plays iCat’s move on the

chessboard. In this time waiting period iCat is animated by three series of animations. These

animations were taken from the OPPR platform. In addition we have created, using the animation

41

Page 58: iCat, the Chess Player - Técnico Lisboa - Autenticação · João Gonçalves for always being there to help and for introducing iCat to me, we have made a good surgery team when

editor, some animations of iCat looking at the chessboard. The three series of animations contribute

to a varied and believable behaviour. In the first two series there are animations for blinking, looking

left, looking right and looking up. The difference is that in the first series of animations iCat is active

and constantly looking at the chessboard, when in the second iCat is sleepy and do not look at the

chessboard. Animations of the second series start to appear when the user takes more than a pre-

determined time to make the iCat’s move. The third series animations represent iCat sleeping and

snoring.

From this state we can jump to two other states. The most usual jump is to the Waiting for User’s

Move State. This jump happens when the user plays iCat’s move correctly. Another possible

transition is if the iCat’s move is a move that ends the game. If so, the current state of iCat state

machine transits to the Game Over State.

If the user does not play the verbally requested move, iCat warns her that she has played

incorrectly. This warning appears with the same probability in two shapes, verbal sentences and iCat

animations. If the warning is via verbal sentences iCat randomly chooses one of several biased

sentences, “That was not my move” is one of the possible sentences. The warning can also come

from choosing one of many animations that indicate that the move was incorrect. A sample animation

can be nodding the head sideways. Otherwise, if the user plays the move correctly, other animations

and sentences were created, in order to give her indication that she is in the right way. The chosen

animations and sentences can be edited accessing the configuration XML file, consult appendix A5.

4.2.3.5 Waiting for User’s Move State

The time waiting period present in this state is animated with the same animations of the previous

one. Likewise the sentences and animations for illegal and legal moves are the same of the earlier

described state.

From this state we can only transit to the thinking state. This happens after the user thinks and

makes her move

4.2.3.6 Game Over State

When we reach this state three possible situations might had happened. For all the three different

scenarios, losing, winning or drawing, a new animation was created. One of these animations plays

correspondingly after verifying if iCat has just lost, won or drawn. To end the game iCat plays a final

animation where it falls asleep, making it clear that the interaction has ended.

42

Page 59: iCat, the Chess Player - Técnico Lisboa - Autenticação · João Gonçalves for always being there to help and for introducing iCat to me, we have made a good surgery team when

4.3 Concluding Remarks

In this chapter we described how our application iCat the Chess Player was implemented. In this

application we tried to add the social and physical domains to a standard computerized chess game

transforming it into a pervasive chess game. The model of interaction we followed to implement our

pervasive chess game is described in section 3.3. We can admit our game in two sub-genres of

pervasive gaming; one of them is computer augmented table-top games because we have added a

virtual opponent with a physical embodiment to the traditional board game. The second genre is

affective games, because we tried to simulate the emotional interaction between players in a

traditional chess game using an embodied social agent.

This application is a module running under the OPPR platform that uses two physical user

interfaces to interact with the user; a social robot and an electronic chessboard. A brief description of

the agent’s mind/application is presented next: a user’s move is detected when a piece is moved on

the electronic board. If it was a legal move it is analysed by a chess engine. Then, the engine sends

the board evaluation to an emotion system which creates an emotional reaction that is animated by

the iCat robot.

43

Page 60: iCat, the Chess Player - Técnico Lisboa - Autenticação · João Gonçalves for always being there to help and for introducing iCat to me, we have made a good surgery team when

44

Page 61: iCat, the Chess Player - Técnico Lisboa - Autenticação · João Gonçalves for always being there to help and for introducing iCat to me, we have made a good surgery team when

Chapter 5

Evaluation

This chapter describes the preliminary experiment we did in order to evaluate our implementation

of a pervasive chess game, iCat the Chess Player, in both its physical and virtual embodiment. In the

first section of this chapter we will articulate our research question. Next we will discuss the

methodology involved in our experiment and in the final section the results will be shown and

analysed.

5.1 Research Question

This experiment consists of testing our hypothesis which was to measure user’s enjoyment while

using our pervasive chess game by varying between a physical and a virtual setup in order to answer

the proposed research question:

Do people have more fun using the version of our system with a more pervasive

(i.e. physically embodied) opponent? Or have they higher enjoyment while

playing against a less pervasive one (i.e. virtually embodied)?

5.2 Methodology

In order to answer our research question, a preliminary experiment involving 18 participants has

been performed. In that experiment the participants had the opportunity to play a chess game against

the iCat using a DGT electronic chessboard. The next subsections will explain what the experiment

tries to measure, the model we used to measure it, the participants involved in the experiment and

finally the two different setups we used.

45

Page 62: iCat, the Chess Player - Técnico Lisboa - Autenticação · João Gonçalves for always being there to help and for introducing iCat to me, we have made a good surgery team when

5.2.1 Measurements

In order to answer our research question in this experiment, each participant played chess in our

application against either a physical or a virtual opponent. To evaluate our dependent variable i.e., the

user enjoyment, we followed the design of an independent test where each participant only played

against one of the two possible embodiments. Therefore our independent variable was the type of test

(physical or virtual).

5.2.2 Pervasive Gameflow

To evaluate our dependent variable, the user enjoyment, we have chosen to use a model

designed to evaluate user enjoyment in pervasive games, the Pervasive Gameflow (Jegers 2007).

This model is an extension of the Gameflow model (Sweetser and Wyeth 2005). Gameflow is based

in the flow theory analysed by Csikszentmihalyi in 1990 (CSIKSZENTMIHALYI 1990), who conducted

an extensive research to discover what makes experiences enjoyable. The research was based on

interviews and questionnaires from thousands of people such as music composers and chess players

and lasted approximately twelve years. After his research, Csikszentmihalyi concluded that flow is a

mental state in which a person is fully immersed at what she or he is doing and is feeling involved in

an optimal experience. Flow experiences can be divided in eight elements and a combination of these

elements provokes a sensation of deep enjoyment that people just for the sake of feeling it spend a

great deal of energy and time. The eight elements are (Sweetser and Wyeth 2005):

1. A task that can be completed;

2. The ability to concentrate on the task;

3. That concentration is possible because the task has clear goals;

4. That concentration is possible because the task provides immediate feedback;

5. The ability to exercise a sense of control over action;

6. A deep but effortless involvement that removes awareness of the frustrations of everyday

life;

7. Concern for self disappears, but sense of self emerges stronger afterwards;

8. The sense of the duration of time is altered;

A flow model can be used to evaluate user enjoyment in any task, but since we want to measure

user enjoyment specifically in a game we used the adaptation constructed for games, the Game Flow

model. This model maps the elements from flow to elements of the game literature and concludes that

to have flow (user enjoyment) in a game the elements that must be present are:

1. Concentration (Games should require concentration and the player should be able to

concentrate on the game);

2. Challenge (Games should be sufficiently challenging and match the player’s skill level);

46

Page 63: iCat, the Chess Player - Técnico Lisboa - Autenticação · João Gonçalves for always being there to help and for introducing iCat to me, we have made a good surgery team when

3. Player Skills (Games must support player skill development and mastery);

4. Control (Players should feel a sense of control over their actions in the game);

5. Clear Goals (Games should provide the player with clear goals at appropriate times);

6. Feedback (Players must receive appropriate feedback at appropriate times);

7. Immersion (Players should experience deep but effortless involvement in the game);

8. Social Interaction (Games should support and create opportunities for social interaction);

To evaluate each one of these elements we have chosen to use some criteria formulated in the

original Game Flow and extended in the Pervasive Game Flow model. Even though we could have

used those criteria directly we have reformulated them. This happened because some of them didn’t

make sense to evaluate our application and they are written for expert game reviewers which were

not our type of target participants. Clear goals element was removed because the only existing goal

that exists in our game is very clear which is to win a chess game against iCat. The mapping of the

criteria (Questions) chosen to evaluate each element are presented below:

Concentration:

Q1 - iCat’s expressions are important for me.

Q2 - iCat keeps me focused in the game.

Q3 – This game is not boring.

Q4 – iCat does not distract me from the game.

Challenge:

Q5 – iCat’s chess skills are approximately close to my own.

Q6 – Playing with the iCat was a challenge for me.

Player Skills:

Q7 – It’s easy playing against iCat.

Q8 – When I look at iCat I can figure out the best moves to make.

Q9 – iCat indicates me when I’m not playing by the rules.

Q10 – When I make good moves, seeing iCat losing makes me happy.

Control:

Q11 – I have more control over the game than iCat does.

Q12 – My moves influence iCat’s behaviour.

Feedback:

Q13 – iCat reacts immediately after each move I make.

Q14 – By iCat’s behaviour I can understand if I’m winning.

Immersion:

Q15 – I’ve lost notion of time.

Q16 – I forgot where I was.

Social Interaction:

Q17 – I felt emotionally involved with iCat.

Q18 – Although iCat plays against me, it helps me by expressing its feelings.

47

Page 64: iCat, the Chess Player - Técnico Lisboa - Autenticação · João Gonçalves for always being there to help and for introducing iCat to me, we have made a good surgery team when

Q19 – iCat talks to me during the game.

The value of each element, similarly to the Game Flow model, is calculated by a simple mean of

the assigned questions. Each question is a five point evaluation Likert scale (Babbie 2005) where the

user may choose to strongly disagree, disagree, neither agrees or disagrees, agree or strongly agree.

User enjoyment is calculated by a simple mean of the seven element’s value. We can also interpret

each of these elements as a dependent variable of our experiment.

5.2.3 Direct Questions

We also wanted to measure whether people prefer to play in our system or against a computer

chess game. If people prefer to play in our system we also would like to know if they gave more

importance to the electronic chessboard or the iCat agent. We were able to ask these questions

because all selected participants have played computerized chess before:

Q20 – I prefer playing chess against iCat in the electronic chess board than with a regular

computer chess game.

The last question was not based on the Likert scale and had only two choices, the electronic board

or the iCat agent:

Q21 – Did you give more importance to the iCat agent or to the electronic chess board?

5.2.4 Participants

There was a total of 18 participants, all of them knew how to play chess and had some experience

with computerized chess. For testing purposes we did not wanted iCat to be very strong because we

wanted to test it mainly on kids. Therefore, we fixed the chess engine search depth on 3 moves which

makes iCat stronger in the beginning of the game and weaker when the game approaches the end.

This happens because we can predict more moves at the outcome of the game where there are

lesser pieces, and at this phase iCat will be in disadvantage because it can only calculate three

moves ahead, making it easier for the opponent to win. Since a regular chess game without time

restrictions usually takes up to 2 hours or more to play, we have chosen to test users in a predefined

more advanced position (shown in Figure 5.1). This position gave some advantage to the user and

was designed with the intention of entering early in the end part of the game, taking less time to play

and therefore we could manage to test it with more users.

In the beginning, the idea was to use only chess club children with ages from 8 to 12 years old, but

due to time constraints we had for testing purposes we could only arrange a very scarce sample with

8 participants in these conditions. Consequently, we tested our application in 2 different locations. The

48

Page 65: iCat, the Chess Player - Técnico Lisboa - Autenticação · João Gonçalves for always being there to help and for introducing iCat to me, we have made a good surgery team when

first two sessions of testing occurred on a chess club, “Clube de Xadrez de Sintra” (Xadrez 2007) ,

where we had 5 participants with the target age from 8 to 12 years old. The second location was in

our university, “Instituto Superior Técnico - Taguspark” (IST 2007), where we tested the remaining 10

participants with subjects of ages between 20 and 32.

Figure 5.1: Initial position of the testing scenario

5.2.5 Setting

This experiment was conducted in two different testing scenarios. One of the scenarios comprised

a physical embodied chess playing agent and the other one a virtual embodied agent (see Figures 5.2

and 5.3). The participants who played in the first scenario did not play on the second one and vice

versa, because they would have played the same position twice and therefore harm the results of the

second experiment. After each game against our agent, the user filled up the 21 questions

questionnaire described above. Next we will describe in detail the physical and the virtual setup.

5.2.5.1 Physical Setup

In this set up (see Figure 5.2), the participants sat on a chair in front of a table that contained the

DGT electronic chessboard, DGT XL clock and the Phillips iCat. Even though the player did not

interact with it, the table also contained a laptop in order to run our application and connect to both the

iCat robot and electronic chessboard. In this scenario the participants made their moves on the

electronic chessboard and watched over iCat’s behaviour and its reactions to the same moves.

49

Page 66: iCat, the Chess Player - Técnico Lisboa - Autenticação · João Gonçalves for always being there to help and for introducing iCat to me, we have made a good surgery team when

Figure 5.2: Physical setup

5.2.5.2 Virtual Setup

The virtual setup (see Figure 5.3) differs from the physical one because in this case the iCat is

virtually embodied and therefore it is displayed on a 17 inch TFT LCD (Thin Film Transistor Liquid

Crystal Display) computer screen. As described before, in the implementation chapter, if the OPPR

system does not detect the iCat robot it launches a window with a virtual representation of iCat acting

in the same way as the original one. In this scenario, the virtual iCat window is then moved and

maximized in the extended windows desktop provided by the 17 inch computer monitor.

Figure 5.3: Virtual setup

50

Page 67: iCat, the Chess Player - Técnico Lisboa - Autenticação · João Gonçalves for always being there to help and for introducing iCat to me, we have made a good surgery team when

5.3 Results

In this section we present the results of our preliminary testing sessions. After all the 18

participants filled up their respective questionnaire, we compiled the results in order to study our

research questions. We have used non parametric tests because we did not have a sufficiently large

sample of data in order to obtain a normal distribution. The results of this compilation are summed up

in two different result tables.

The first result table shows the results of a non parametric Mann-Whitney U Test used to analyse

the two independent samples provided by grouping the results of the physical and virtual iCat and

comparing the seven important elements according to the Pervasive Game Flow model and the

overall user enjoyment.

In the second result table we also present a non parametric Mann-Whitney U Test in order to show

if the participants prefer our game instead of a traditional computer chess game with a graphical user

interface and no emotion system.

5.3.1 User Enjoyment – Virtual versus Physical

To study the differences of the user enjoyment between the physical and virtual embodiment of the

iCat, we have used the Mann-Whitney U Test in order to analyse the data provided from the compiled

data.

First we ran the Mann-Whitney U Test using the Type of Test as the grouping variable and the

User Enjoyment as the test Variable (results in tables 5.1 and 5.2).

Type of Test N Mean Rank Sum of Ranks User Enjoyment 1 – Physical 9 12,06 108,50 2 – Virtual 9 6,94 62,50 Total 18

Table 5.1: User enjoyment Mann-Whitney U Test Ranks

By analysing table 5.1 in the mean rank and sum of ranks we can conclude that the direction of the

difference in user enjoyment is physical > virtual.

Item  Z‐Score  р‐Value  Direction 

User Enjoyment  ‐2,035  0,042  Physical > Virtual 

Table 5.2: User enjoyment Mann-Whitney U Test Statistics

51

Page 68: iCat, the Chess Player - Técnico Lisboa - Autenticação · João Gonçalves for always being there to help and for introducing iCat to me, we have made a good surgery team when

Concluding this analysis, we summed up in table 5.2 the important data given by the Mann-

Whitney test which gives us the information that we have a significant result (р-value < 0.05) and a Z-

score of -2,035 with the difference direction of physical > virtual. Therefore, in our preliminary

experiment, we can affirm that playing chess with a virtual embodied social agent gives the user less

enjoyment that with a physically embodied one.

Why did the participants enjoyed less the virtual embodied character?

To answer this question we have again used the Mann-Whitney U Test but this time we made it to

the seven different game elements used to calculate the user enjoyment variable. The results are

shown in table 5.3.

Item  Z‐Score  р‐Value  Direction Concentration  ‐0,536  0,605  Physical > Virtual Challenge  ‐0,461  0,666  Physical > Virtual Player Skills  ‐0,946  0,387  Physical > Virtual Control  ‐0,409  0,73  Physical > Virtual Feedback  ‐2,249  0,031  Physical > Virtual Immersion  ‐2,114  0,04  Physical > Virtual Social Interaction  ‐2,184  0,031  Physical > Virtual 

Table 5.3: Pervasive Game Flow Elements Mann-Whitney U Test Statistics

Even though all these results have the same direction, by analysing these game elements

separately, we can indicate by the p-value and z-score that Feedback, that Immersion and Social

interaction values are significantly higher in the pervasive chess game setup that uses a physical

embodied agent than with the setup that uses a virtual one. The other four game elements have high

p-values and therefore we cannot take any conclusion about their values when we change the

embodiment of the agent in our application.

5.3.2 Qualitative Data

This subsection shows the results of the qualitative data we compiled from questions 20 and 21 of

our questionnaire. In question 20 we directly measure if the participants prefer playing chess with iCat

in a computer augmented chessboard rather than playing it on their usual computerized chess

software. In this case, since it is a direct measuring of the user preferences, it is useful to look at the

frequencies of each occurrence. The frequencies are shown in table 5.4.

52

Page 69: iCat, the Chess Player - Técnico Lisboa - Autenticação · João Gonçalves for always being there to help and for introducing iCat to me, we have made a good surgery team when

Question 20 Frequencies  Strongly Disagrees  Disagree Undecided Agree  Strongly AgreePhysical  0  0  1  3  5 Virtual  0  0  3  2  4 

Table 5.4: Question 20 Frequencies.

The only determining conclusion we can take from the data retrieved is that no participant

disagreed or strongly disagreed with this question which leads us to the preliminary conclusion that

users prefer playing in our application either with a virtually or a physically embodied character.

The final question of our questionnaire asks if the users gave more importance to the iCat

character or to the physical electronic chessboard. The results varied very much depending on the

embodiment. Using the setup with the physical embodiment 88% of the participants gave more

importance to the iCat character. The participants of the virtual setup only showed a 22% preference

to the iCat character and consequently gave a 78% importance factor to the DGT electronic board.

5.4 Concluding Remarks

In this chapter we have described the experiment that we conducted to evaluate our pervasive

chess game. We first described our research questions, explained how we reached our questionnaire,

the methods we used in the experiment and to finish the chapter we analysed the results.

The experiment consisted of testing both iCat’s physical and virtual embodiment. We have

evaluated the user enjoyment in both these scenarios and showed that people have more fun playing

against a physical opponent rather than with a virtual one. Thereupon we can indicate that a more

pervasive chess playing experience (with an opponent that belongs to the physical domain) is more

enjoyable than the experience of playing with an opponent present in the virtual domain. We have

also concluded, by analysing our preliminary results, that three of the seven game elements present

in the Pervasive Game Flow Model were significantly influenced by the variation of the two different

setups. The setup involving the physical setup had a more immersive user experience, improved

game feedback and more believable social interaction.

Finally we have asked the users (1) if they preferred our pervasive chess game or their traditional

chess software and (2) if they gave more importance to the electronic chessboard or the iCat. The

results on the first question were very elucidating, having 0% of people preferring their usual software.

This result suggests that our application was successfully accepted and brings something new to a

chess game. In the second question, we tried to found their reason for liking our pervasive chess

game and concluded that the users who played with the iCat virtual embodiment gave more

importance to the electronic chessboard than to the iCat. The same did not happen to the users who

played with the physical embodiment of the iCat who preferred the social robot.

53

Page 70: iCat, the Chess Player - Técnico Lisboa - Autenticação · João Gonçalves for always being there to help and for introducing iCat to me, we have made a good surgery team when

Some of the experiments we have conducted were at a Portuguese chess club (“Clube de Xadrez

de Sintra”) with children from eight to twelve years old. In one of those sessions, while playing with

our system against the iCat social robot, the kids were at the same time taking lessons from their

chess instructor “Luis Maninha” who was teaching them alongside our application the best and the

smartest ways to play in the presented positions. Even though our experiment sample was not broad

enough to take conclusions about children’s user enjoyment in specific, their acceptance and

happiness using our pervasive chess game was easily noticeable. This may be an important

accomplishment because if we appeal children at young ages to play chess we enhance their

concentration, patience and perseverance. Besides, this game develops their creativity, intuition,

memory, and most importantly, the competence to analyse and deduce from a set of general

principles, learning in this way to make tough decisions and solve problems flexibly (Dauvergne

2000).

54

Page 71: iCat, the Chess Player - Técnico Lisboa - Autenticação · João Gonçalves for always being there to help and for introducing iCat to me, we have made a good surgery team when

Chapter 6

Conclusions

With this dissertation we attempt to innovate the way computerized chess is designed in order to

provide users with more enjoyable playing experiences. In order to achieve this goal, we looked

deeply upon one of the first artificial intelligence fields (computerized chess) and one emerging

gaming area (pervasive gaming).

This research enabled us to conceptualize a model for a computerized pervasive chess game by

joining the social and physical domains present in the model of a traditional chess game, played

between two human players in a regular chess board, with the virtual domain of a simple one player

computer chess game.

After the conceptualization of this model, we have implemented an application under the name of

“iCat, the Chess Player” with two different setups. The first setup comprised the iCat robot as the

physical embodiment for our chess playing agent, and the other one incorporated only the virtual

representation of the iCat at a computer screen.

By developing these two setups we were able to perform an experiment to answer our research

question, which was: Do people have more fun using the version of our implementation with a more

pervasive (i.e. physically embodied) opponent? Or have they higher enjoyment while playing against

a less pervasive one (i.e. virtually embodied)?

The results of the experiment suggest that our initial hypothesis presented in section 1.2 was

correct, since by varying between the two experimented setups we were able to take conclusions

about the more enjoyable scenario. Those conclusions showed that participants who have tested the

more pervasive physically embodied agent had higher enjoyment experiences than those who have

tested with the virtual embodied chess playing agent.

Using our work, we have performed a system demonstration in the Second Affective Computing

and Intelligent Interaction Conference (ACII 07). The description of our demonstration in this

conference is presented in Appendix C1. The acceptance the community had towards our work has

been great, which motivates us even further to continue our work.

55

Page 72: iCat, the Chess Player - Técnico Lisboa - Autenticação · João Gonçalves for always being there to help and for introducing iCat to me, we have made a good surgery team when

6.1 Future Work

The performed preliminary experiment served our purpose but it would have been interesting to

have more samples in order to extend our conclusions. If we had a higher amount of samples with

different kinds of groups we could explore some relations between the user enjoyment and

participant’s age, chess skills or gender while using our system.

A model for building a pervasive chess game was successfully conceptualized. However, our

application, iCat the chess player, could have presented more features if we wanted to develop an

application exclusively for the iCat’s physical embodiment. We have not developed these features

because we wanted to have a similar application for both the embodiments. Nevertheless, we can

develop the physical embodiment further. For instance we can use the iCat’s camera (only present in

the physical embodiment) and gaze algorithms to make iCat even more believable by following the

opponents face and movements. Another unused feature that we can use is the sensors present in

iCat’s paws and ears that could be used, for instance, to start a new game or to give up the current

one.

56

Page 73: iCat, the Chess Player - Técnico Lisboa - Autenticação · João Gonçalves for always being there to help and for introducing iCat to me, we have made a good surgery team when

Bibliography

Artise,  J.  (2007).  "Chess  and  Education  By  John  Artise."      Retrieved  18/01/2007,  from http://www.chesshouse.com/articles.asp?id=114.    Axelrod,  L.  and  K.  Hone  (2005).  E‐motional  Advantage:  Performance  and  Satisfaction  Gains with Affective  Computing.  Conference  on Human  Factors  in  Computing  Systems  (CHI  2005).  Portland, Oregon, USA.    Azuma,  R.  (1997).  "A  Survey  of  Augmented  Reality."  Presence:  Teleoperators  and  Virtual Environments 6, 4: 355 – 385.    Babbie, E. R. (2005). The Basics of Social Research, Thomson Wadsworth: 174.    Bartneck,  C.,  J.  Reichenbach,  et  al.  (2004).  In  your  face,  robot!  The  influence  of  a  character's embodiment on how users perceive its emotional expressions. Design and Emotion, Ankara, Turkey.    Baylor, A.  L.  (2002).  "Agent‐based  learning environments  for  investigating  teaching and  learning." Journal of Educational Computing Research 26(3): 249‐270.    Boškovic, B., S. Greiner, et al. (2005). "The Representation of Chess Game." Proceedings of the 27th International Conference on Information Technology Interfaces: 381‐‐386.    Breemen,  A.  (2004).  Animation  Engine  for  Believable  Interactive  User‐Interface  Robots.  IEEE/RSJ International Conference on Intelligent Robots and Systems, Sendai, Japan.    Brooks,  A.,  J.  Gray,  et  al.  (2004).  "Robot’s  Play:  Interactive  Games  with  Sociable  Machines  " Computers in Entertainment 2: 1‐18.    Buckland, M. (2004). Programming Game AI by Example.    Chessbase.  (2006).  "Chessbase  Mega  Database  2007."      Retrieved  18/01/2007,  from http://www.chessbase.com/shop/product.asp?pid=255.    Chessvariants.  (1986).  "Chessvariants  ‐  Tempete  sur  l'Echiquier."      Retrieved  18/01/2007,  from http://www.chessvariants.org/cards.dir/tempete.html.    ChessWorld.  (2007).  "Portable  Game  Notation."      Retrieved  18/01/2007,  from  http://www.very‐best.de/pgn‐spec.htm.    CSIKSZENTMIHALYI,  M.  (1990).  Flow:  The  Psychology  of  Optimal  Experience.  New  York,  Harper Perennial.    Dauvergne, P. (2000). "The Case for Chess as a Tool to Develop Our Children’s Minds." University of Sydney.    DGT.  (1998).  "DGT  Projects  Electronic Board  supported programs."     Retrieved  18/01/2007,  from http://www.dgtprojects.com/eboard_supported.htm.    

57

Page 74: iCat, the Chess Player - Técnico Lisboa - Autenticação · João Gonçalves for always being there to help and for introducing iCat to me, we have made a good surgery team when

DGT. (2007). "DGT Projects."   Retrieved 18/01/2007, from http://www.dgtprojects.com/     Donninger,  C.  (1993).  "Null Move  and Deep  Search:  Selective‐Search Heuristics  for Obtuse  Chess Programs." ICCA Journal 16(3): 137‐143.    FIDE. (2007). "World Chess Federation."   Retrieved 18/01/2007, from http://www.fide.com/.    Floerkemeier, C.  and  F. Mattern  (2006).  Smart Playing Cards –  Enhancing  the Gaming Experience with RFID. Third International Workshop on Pervasive Gaming Applications ‐ PerGames 2006 Dublin, Ireland.    Fritz.  (2007).  "Chessbase  ‐  Fritz  10."      Retrieved  18/01/2007,  from http://www.chessbase.com/shop/product.asp?pid=295.    FSF. (1985). "Chess – GNU Project – Free Software Foundation (FSF)."   Retrieved 18/01/2007, from http://www.gnu.org/software/chess/.    Groen,  F.,  G.  Boer,  et  al.  (1992).  "Toto’s  Robot  Arm."      Retrieved  18/01/2007,  from http://staff.science.uva.nl/~toto/Work/RobotChess/.    GUTWIN, C. and S. Greenberg (2004). The importance of awareness for team cognition in distributed collaboration. Team Cognition: Understanding  the Factors  that Drive Process and Performance. E. Salas and S. Fiore: 177‐201.    Herman D'Hooge,  L. D.  (2000).  Smart  Toys:  Brave New World?  Conference  on Human  factors  in computing systems (CHI 2000). Hague, Netherlands.    Huffman, D. A. (1952). Huffman's original article. Proceedings of the I.R.E.    Hyatt,  R.  (2007).  "Robert  Hyatt's  Home  Page."      Retrieved  18/01/2007,  from http://www.limunltd.com/crafty.    IBM.  (1997).  "IBM  Research  Deep  Blue  Overview  "      Retrieved  18/01/2007,  from http://www.research.ibm.com/deepblue/watch/html/c.shtml.    ICC. (2007). "Internet Chess Club."   Retrieved 18/01/2007, from http://www.chessclub.com/     Interplay.  (1988).  "Interplay  Entertainment  Corp  ‐  Battle  Chess."      Retrieved  18/01/2007,  from http://www.interplay.com/games/product.asp?GameID=325.    IST.  (2007).  "Insituto  Superior  Técnico  Campus  Taguspak."      Retrieved  18/08/07,  from http://www.ist.utl.pt/html/campus/tagus/.    Jegers,  K.  (2007).  "Pervasive  game  flow:  understanding  player  enjoyment  in  pervasive  gaming  " Comput. Entertain. 5 (ACM Press): 1544‐3574.    Kerrigan’s,  T.  (2007).  "Tom  Kerrigan’s  Home  Page."      Retrieved  18/01/2007,  from http://home.comcast.net/~tckerrigan/.    Leite, I. (2007). iCat The Chess Tutor. GAIPS, IST. Md.    

58

Page 75: iCat, the Chess Player - Técnico Lisboa - Autenticação · João Gonçalves for always being there to help and for introducing iCat to me, we have made a good surgery team when

Lewis, C.  and  S.  Sallam  (2004). ChessBox: A  Tangible  Interface  for Computer Chess. University of Saskatchewan, Canada.    Linder, I. (1990). Chess, a Subject Taught at School. Sputnik: Digest of the Soviet Press, June 164‐166.    Magerkurth, C., A. Cheok, et al. (2005). "Pervasive games: Bringing computer entertainment back to the real world." ACM Computers in Entertainment 3, nº 3.    Magerkurth, C., T. Engelke, et  al.  (2004). Augmenting  the  virtual domain with physical  and  social elements:  towards  a  paradigm  shift  in  computer  entertainment  technology.  ACM  SIGCHI International Conference on Advances in computer entertainment technology.    Mann,  T.  (2003).  "Chess  engine  communication  protocol."      Retrieved  18/01/2007,  from http://www.tim‐mann.org/xboard/engine‐intf.html.    Mann,  T.  (2007).  "Tim  Mann’s  Chess  Pages."      Retrieved  18/01/2007,  from  http://www.tim‐mann.org/xboard.html.    Margulies, S. (1992). The Effect of Chess on Reading Scores, District Nine Chess Program Second Year Report.    Martinho, C. and A. Paiva (2006). Using Anticipation to Create Believable Behaviour. Proceedings of the  21st  National  Conference  on  Artificial  Intelligence  and  the  18th  Innovative  Applications  of Artificial Intelligence Conference, Stanford, California, USA, AAAI Press.    Meppelink,  D.  and  F. Martin  (2003).  A  Tangible  Interface  to  Computerized  Chess,  University  of Massachusetts Lowell.    NILSEN, T., S. LINTON, et al.  (2004). Motivations  for AR gaming. Proceedings of  the Fuse 04, New Zealand Game Developers Conference, Dunedin, New Zealand.    NIST/SEMATECH. (2007). "e‐Handbook of Statistical Methods."   Retrieved 21‐07‐2007.    Norman,  D.  (2004).  Emotional  Design: Why We  Love  (OrHate)  Everyday  Things.  New  York  Basic Books.    Nurse, D. (1995). Chess & Math Add Up. Teach, May/June: 15.    Paiva, A., R. Chaves, et al. (2003). Sentoy: a Tangible Interface to Control the Emotions of a Synthetic The  Second  International  Joint  Conference  on  Autonomous  Agents Multiagent  Systems  (AAMAS 2003), ACM Press: 1088‐1089.    Picard, R. (1997). Affective Computing. Cambridge, MA, The MIT Press.    PUC‐Rio. (2007). "Lua Programming Language." 18/08/07, from http://www.lua.org/.    Reinefeld, A. (1989). Explanation of PVS/Negascout. Berlin, Springer‐Verlag.    Saitek.  (2007).  "Mephisto  Range  from  Saitek."      Retrieved  18/01/2007,  from http://www.saitekusa.com/chess/chess.htm.    

59

Page 76: iCat, the Chess Player - Técnico Lisboa - Autenticação · João Gonçalves for always being there to help and for introducing iCat to me, we have made a good surgery team when

Schlieder, C. (2005). Representing the Meaning of Spatial Behavior by Spatially Grounded Intentional Systems. Geospatial Semantics, Berlin, Springer.    Shannon, C. (1950). Programming a Computer for Playing Chess, March. Philosophical Magazine. 41, Nº 314 Series 7: 256‐275.    Spiegel.  (2007).  "Man  Vs  Machine."      Retrieved  18/01/2007,  from http://www.spiegel.de/international/0,1518,451007,00.html.    Sweetser, P. and P. Wyeth (2005). "GameFlow: a model for evaluationg player enjoyment in games." Comput. Entertain. 3(3): 3‐‐3.    Team17. (2007). "Team17.com."   Retrieved 18/01/2007, from http://www.team17.com/.    Thayer, R. E. (1989). The Biopsychology of Mood and Arousal. New York, Oxford University Press.    Tse,  E.,  S. Greenberg,  et  al.  (2006). Multimodal Multiplayer  Tabletop Gaming.  Third  International Workshop on Pervasive Gaming Applications ‐ PerGames 2006 Dublin, Ireland.    Ubisoft.  (2007).  "Chessmaster  10th  edition."      Retrieved  18/01/2007,  from http://www.chessmaster.com/.    Ullmer, B. and H.  Ishii  ( 2000.).  "Emerging  frameworks  for  tangible user  interfaces."  IBM  Systems Journal 39 nº 3: 915‐931.    Wikipedia.  (2007).  "Wikipedia  ‐  El  Ajedrecista."      Retrieved  18/01/2007,  from http://en.wikipedia.org/wiki/El_Ajedrecista.    Xadrez,  M.  (2007).  "CLUBE  DE  XADREZ  DE  SINTRA."      Retrieved  18/08/07,  from http://www.maisxadrez.com/ondejogar/?id=104.     

60

Page 77: iCat, the Chess Player - Técnico Lisboa - Autenticação · João Gonçalves for always being there to help and for introducing iCat to me, we have made a good surgery team when

Appendix A

UML C++ Class Diagrams

A.1 – UML Class diagram of the C++ ChessEngine Class.

61

Page 78: iCat, the Chess Player - Técnico Lisboa - Autenticação · João Gonçalves for always being there to help and for introducing iCat to me, we have made a good surgery team when

A.2 – UML Class diagram of the C++ ElectronicBoard Class.

62

Page 79: iCat, the Chess Player - Técnico Lisboa - Autenticação · João Gonçalves for always being there to help and for introducing iCat to me, we have made a good surgery team when

Appendix B

XML Configuration Files

B.1 XML configurations file for the iCat Chess Player application with the Portuguese language file selected.

<?xml version="1.0" ?> <chessModCfg> <language file="ChessModportuguese.xml"/> <chessengine randomness="0" searchdepth="3" castle="0" sidetomove= "0" icatside= "1"/> <electronicboard port= "4"/> </chessModCfg>

B.2 XML Portuguese language configurations file.

<?xml version="1.0" ?> <reactsto> <confirmmove> <sentencespresent> <speech text="ok!"/> <speech text="certo!"/> <speech text="Obrigado!"/> <speech text="Ok, Obrigado!"/> <speech text="Ok Obrigado!"/> <speech text="Isso mesmo"/> <speech text="Obrigado por fazeres a minha jogada!"/> <speech text="sim, isso"/> </sentencespresent> <animationspresent> <animation raf="\STANDARD\Actions\Social\greet.raf"/> <animation raf="\STANDARD\Actions\Functional\nod.raf"/> <animation raf="\STANDARD\Actions\Functional\nodtwice.raf"/> <animation raf="\STANDARD\Actions\Functional\nodblink.raf"/> </animationspresent> </confirmmove> <notmymove> <sentencespresent> <speech text="Não foi isso que eu joguei"/> <speech text="Não foi isso que joguei"/>

63

Page 80: iCat, the Chess Player - Técnico Lisboa - Autenticação · João Gonçalves for always being there to help and for introducing iCat to me, we have made a good surgery team when

<speech text="Joga, a jogada correcta!"/> <speech text="Errado, Olha a jogada no Relógio!"/> <speech text="Joga o que te pedi!"/> <speech text="eu não joguei isso"/> <speech text="Não, não Quero Jogar essa!"/> <speech text="Não!"/> </sentencespresent> <animationspresent> <animation raf="\STANDARD\Actions\Functional\Alert.raf"/> <animation raf="\STANDARD\Actions\Functional\Deny.raf"/> <animation raf="\STANDARD\Actions\Functional\NotUnderstand.raf"/> <animation raf="\STANDARD\Actions\Functional\nana.raf"/> </animationspresent> </notmymove> <illegalmove> <sentencespresent> <speech text="Jogada ilegal!"/> <speech text="essa jogada não é permitida"/> <speech text="Joga correctamente!"/> <speech text="não sabes as regras?"/> <speech text="não podes jogar isso !"/> <speech text="Ilegal"/> <speech text="Não podes!"/> <speech text="Não!"/> </sentencespresent> <animationspresent> <animation raf="\STANDARD\Actions\Functional\Alert.raf"/> <animation raf="\STANDARD\Actions\Functional\Deny.raf"/> <animation raf="\STANDARD\Actions\Functional\NotUnderstand.raf"/> <animation raf="\STANDARD\Actions\Functional\nana.raf"/> </animationspresent> </illegalmove> <playagain> <sentencespresent> <speech text="Ok, podes jogar outra vez."/> <speech text="Podes jogar outra vez."/> </sentencespresent> </playagain> <check> <sentencespresent> <speech text="Chéque."/> </sentencespresent> </check> <winning> <animationspresent> <animation raf="\STANDARD\Actions\Social\winning.raf"/> </animationspresent> </winning> <losing> <animationspresent> <animation raf="\STANDARD\Actions\Social\losing.raf"/> </animationspresent> </losing>

64

Page 81: iCat, the Chess Player - Técnico Lisboa - Autenticação · João Gonçalves for always being there to help and for introducing iCat to me, we have made a good surgery team when

<draw> <animationspresent> <animation raf="\STANDARD\Actions\Social\empate.raf"/> </animationspresent> </draw> <lookatboard> <animationspresent> <animation raf="\STANDARD\Actions\Emotional\LookAtBoard.raf"/> <animation raf="\STANDARD\Actions\Emotional\LookAtBoard2.raf"/> <animation raf="\STANDARD\Actions\Emotional\LookAtBoard3.raf"/> <animation raf="\STANDARD\Actions\Emotional\LookAtBoard4.raf"/> </animationspresent> </lookatboard> </reactsto>    

65

Page 82: iCat, the Chess Player - Técnico Lisboa - Autenticação · João Gonçalves for always being there to help and for introducing iCat to me, we have made a good surgery team when

 

66

Page 83: iCat, the Chess Player - Técnico Lisboa - Autenticação · João Gonçalves for always being there to help and for introducing iCat to me, we have made a good surgery team when

Appendix C

Publications

C.1 – The Second International Conference on Affective Computing and Intelligent Interaction (ACII 2007)

67

Page 84: iCat, the Chess Player - Técnico Lisboa - Autenticação · João Gonçalves for always being there to help and for introducing iCat to me, we have made a good surgery team when

68

 

Page 85: iCat, the Chess Player - Técnico Lisboa - Autenticação · João Gonçalves for always being there to help and for introducing iCat to me, we have made a good surgery team when

iCat, the Affective Chess Player 1

iCat, the Affective Chess Player

Iolanda Leite, André Pereira

INESC-ID IST - Technical University of Lisbon

Av. Prof. Cavaco Silva Tagus Park

2780-990 Porto Salvo, Portugal

{iolanda.leite, andre.pereira}@tagus.ist.utl.pt  

Abstract. This demo presents “iCat, the Affective Chess Player”, a social robot that is capable of playing chess 

against a human opponent. The chess game is played on a physical electronic chessboard that detects the board state and sends it to the computer. The goal is to enable children to play with iCat, in a scenario in which the character’s affective state is influenced by every move the player makes. Each move is evaluated by a chess engine using the mini‐max algorithm. After the value of the evaluation function is returned, an emotion model based on the emotivector anticipatory mechanism is used to determine iCat’s affective reaction. By looking at iCat’s expressions, children experience in learning to play chess is enhanced, since they know that when they make a good or a bad move iCat will respond accordingly.   

1 Introduction

Social robots are robots especially designed to interact with people, helping them to perform tasks in several environments. Social robots, as well as other virtual characters, must have the ability of expressing emotions, so interactions with humans will be more believable, natural and enjoyable.  

Chess is an ancient social game in which two real opponents battle in a black and white 64 square board. Computerized chess is primarily played on a computer screen without any social interaction, discarding the social possibilities of the traditional chess game, in which players are able to interact.  

Since emotional information exchanges are very important in human social interaction and communication, the aim of our work consists on creating the behaviour of chess a player that can socially interact with a human opponent. 

2 Content

2.1 Demonstration setup

iCat is the world’s first available plug‐and‐play robot capable of mechanically rendering facial expressions [2]. It was designed to simulate Human‐Robot interaction under the perspective of social robotics. The iCat research platform is a platform developed by Philips that comprises both the iCat robot and a software platform called Open Platform for Personal Robotics (OPPR) [3] that allows the development of new applications for iCat.  

In our demonstration, iCat will be the opponent of a human player in a chess match played on an electronic chessboard provided from DGT Projects [4]. The goal is to enable children to play against 

Page 86: iCat, the Chess Player - Técnico Lisboa - Autenticação · João Gonçalves for always being there to help and for introducing iCat to me, we have made a good surgery team when

iCat, the Affective Chess Player 2

the character, in a scenario in which the character’s emotive behaviour is influenced by the game state. Children may then interpret the characters affective behaviour and by that acquire additional information to better understand the game. In Fig. 1, the demonstration set‐up is portrayed. 

 

Fig. 1. The demo set-up

2.2 Technical content

An overview of the architecture is depicted in Fig. 2. We have created a module that runs under the OPPR platform (iCat‐Chess Module) which is composed by two main parts: “chess” and “emotion”. The chess system contains the interface with the electronic board and a chess engine [8] used to evaluate the board state and by that return the iCat’s move. The emotion system is responsible for managing the character’s emotional state and receives information from the chess system. The animation module is an existing module of the OPPR platform that blends the pre‐scripted animations and behaviours requested in the iCat‐Chess module. 

The electronic board and the iCat are connected to a computer through a USB interface. The current state of the electronic board is interpreted by a chess evaluation function. The outcome of that evaluation function is the main stimulus to iCat’s emotional behaviour.  

The character’s emotion system has two main components: emotional reactions and mood.  

  

Fig. 2.  System Architecture 

Page 87: iCat, the Chess Player - Técnico Lisboa - Autenticação · João Gonçalves for always being there to help and for introducing iCat to me, we have made a good surgery team when

iCat, the Affective Chess Player 3

Emotional reactions are triggered every time iCat’s opponent makes a move. They are computed using the emotivector model, an anticipatory mechanism coupled with a sensor, that: (1) uses the history of the sensor to anticipate the next sensor state; (2) interprets the mismatch between the prediction and the sensed value, by computing its attention grabbing potential and associating a basic qualitative sensation with the signal; (3) sends its interpretation along with the signal [5]. The prediction of the next sensor state is based on the moving averages algorithm [6], which purpose is to smooth a data series and make it easier to spot trends. Depending on the values sent by the chess system, different elicited sensations are selected. The selected sensations will then pass to the animation module, where they are transformed into a predefined animation that reflects an emotion (e.g. sad, happy, surprised…). We used the animations provided form the OPPR platform because they have already been submitted to tests which verify that users perceive those emotional expressions on iCat’s embodiment [1]. For example, if iCat has a small advantage in the game (in terms of material or position of the pieces) and suddenly its opponent commits a mistake that allows the iCat to capture her queen, the triggered sensation will be a “stronger reward”, which will lead to an emotion of surprise (the sensation is better than we were expecting). 

Mood is a relatively lasting affective state. It is less specific, often less intense and thus less likely to be triggered by a particular stimulus or event. Moods generally have either a positive or negative valence effect and are longer lasting [7]. We represent iCat’s mood as a valence variable that ranges from ‐100 to 100. The value of this variable depends on the outcome of the evaluation function of the board state and therefore it also changes when the opponent makes a move. However, this change is done progressively and without abrupt variations. If iCat is winning, valence values are positive (100 means that iCat will soon checkmate its opponent), whereas negative values appear when iCat is in a least favorable position than its opponent (‐100 means that iCat is going to lose). Mood uses two predefined facial expressions, a “happy” and a “sad” face, each one corresponding to one of the limits of the valence variable. Again, these two parameterizations are based in the animations existing in the OPPR platform. The “happy” face, as defined in the parameterization, is displayed when valence is 100. The facial expressions for the remaining positive valence values are computed by interpolation of that parameterization, resulting in happy faces with smaller intensities. When the valence value is close to zero, the facial expression tends to become neutral. The same happens to the negatives valence values, this time employing the “sad” face parameterization.  

While emotional reactions have duration of at least ten seconds, mood is always present. Even though, in the absence of new stimuli, the facial resultant facial expression tends to become neutral, due to the decay of the valence variable. 

2.3 Storyboard

iCat can play an entire chess game from the beginning or start from a predetermined position. Both scenarios are possible to present in this demo. Fig. 3 shows the main steps of an interaction with iCat. 

Page 88: iCat, the Chess Player - Técnico Lisboa - Autenticação · João Gonçalves for always being there to help and for introducing iCat to me, we have made a good surgery team when

iCat, the Affective Chess Player 4

 Fig. 3.  User playing with iCat 

3 Conclusions

This demo presents a social robot that plays chess and engages the user by expressing its affective state during the game. One of the significant advantages of our emotion model is that it can be applied to any other game or task that uses evaluation functions, since all the signals needed to compute the model can be predicted.  

In the demo, we expect users to interact with iCat and interpret its emotional cues to better understand the game and thus to improve their chess skills. The use of anticipatory mechanisms increases character’s believability, allowing for a more engaging experience for the user. This factor positively affects the likeability of the character, increasing user’s attention to the game and motivation to interact with iCat. 

References

1.  Bartneck, C., Reichenbach, J., Breemen, A.: In your face, robot! The influence of a character's embodiment on how users perceive its emotional expressions In: Design and Emotion, Ankara, Turkey (2004) 

2.  Breemen, A.: Animation engine for believable interactive user‐interface robots. In: IEEE/RSJ – International Conference on Intelligent Robots and Systems, Vol. 3 (2004) 2873‐2878 

3.  Breemen, A.: iCat: Experimenting with Animabotics. In: AISB'05 Creative Robotics Symposium, Hatfield, England (2005) 

Page 89: iCat, the Chess Player - Técnico Lisboa - Autenticação · João Gonçalves for always being there to help and for introducing iCat to me, we have made a good surgery team when

iCat, the Affective Chess Player 5

4.  DGT Projects ‐ DGT Electronic Chessboard. Internet: http://www.dgtprojects.com/eboard.htm  (retrieved in 17‐07‐2008) 

5.  Martinho, C., Paiva, A.: Using Anticipation to Create Believable Behaviour. In: Proceedings of the 21st National Conference on Artificial Intelligence and the 18th Innovative Applications of Artificial Intelligence Conference, Stanford, California, USA. AAAI Press (2006) 

6.  NIST/SEMATECH e‐Handbook of Statistical Methods. Internet: http://www.itl.nist.gov/div898/handbook/  (retrieved in 21‐07‐2007) 

7.  Thayer, R.E.: The Biopsychology of Mood and Arousal.  New York: Oxford University Press (1989) 

8.  Tom Kerrigan's Simple Chess Program. Internet: http://home.comcast.net/~tckerrigan/  (retrieved in 18‐07‐2007)