SlideShare a Scribd company logo
A DISCRETE COMPUTATIONAL AESTHETICS MODEL
FOR A ZERO-SUM PERFECT INFORMATION GAME
MOHAMMED AZLAN BIN MOHAMED IQBAL
THESIS SUBMITTED IN FULFILMENT
OF THE REQUIREMENTS
FOR THE DEGREE OF DOCTOR OF PHILOSOPHY
FACULTY OF COMPUTER SCIENCE
& INFORMATION TECHNOLOGY
UNIVERSITY OF MALAYA
KUALA LUMPUR
SEPTEMBER 2008
ii
ABSTRACT
One of the best examples of a zero-sum perfect information game is chess. Aesthetics is
an important part of it that is greatly appreciated by players. Computers are currently
able to play chess at the grandmaster level thanks to efficient search techniques and
sheer processing power. However, they are not able to tell a beautiful combination from
a bland one. This has left a research gap that, if addressed, would be of benefit to
humans, especially chess players.
The problem is therefore the inability of computers to recognize aesthetics in the game.
Existing models or computational approaches towards aesthetics in chess tend to
conflate beauty with composition convention without taking into account the
significance of the former in real games. These approaches also typically use fixed
values for aesthetic criteria that are rather inadequate given the variety of possibilities
on the board. The goal was therefore to develop a computational model for recognizing
aesthetics in the game in a way that correlates positively with human assessment.
This research began by identifying aesthetics as an independent component applicable
to both domains (i.e. compositions and real games). A common ground of aesthetic
principles was identified based on the relevant chess literature. The available knowledge
on those principles was then formalized as a collection of evaluation functions for
computational purposes based on established chess metrics.
Several experiments comparing compositions and real games showed that the proposed
model was able to identify differences of statistical significance between domains but
not within them. Overall, compositions also scored higher than real games. Based on the
iii
scope of analysis (i.e. mate-in-3 combinations), any such differences are therefore most
likely aesthetic in nature and suggest that the model can recognize beauty in the game.
Further experimentation showed a positive correlation between the computational
evaluations and those of human chess players. This suggests that the proposed model
not only enables computers to recognize aesthetics in the game but also in a way that
generally concurs with human assessment.
iv
ACKNOWLEDGEMENTS
I would like to express my appreciation to my supervisor, Prof. Dato’ Ir. Dr. Mashkuri
Hj. Yaacob, who had the foresight to accept me as his doctoral student. I have benefited
from his experience, advice and the intellectual freedom he afforded to me during the
research period.
I would also like to thank John McCarthy (Stanford University, USA) for essentially
suggesting to me what I think is possibly the best approach to this research topic;
Michael Negnevitsky (University of Tasmania, Australia) for the meaningful
discussions we had about my research; Jonathan Levitt (Grandmaster of chess, UK) for
continuously and tirelessly accommodating my questions; David Friedgood (FIDE
Master and International Master of chess solving, UK) for his feedback and willingness
to share his connections to resourceful people; Peter Lamarque (University of York,
UK) who motivated me to improve my writing; and Malcolm McDowell (British Chess
Problem Society) for supplying me with several rare manuscripts on the royal game.
I also want to thank Brian Stephenson (UK) for his collection of chess compositions
which has become integral to this work; Daniel Freeman (Chessgames.com, Florida,
USA) for his support and commitment with regard to my online surveys; and the ICGA
Journal editorial board and reviewers, for their detailed and fruitful comments over the
years on various aspects of my research. I was simultaneously impressed and humbled
by their expertise.
Other people to whom I would like to express my gratitude for their comments and
feedback include Hans Gruber (Germany), Isaac Linder (who wrote back in pen and ink
v
from Russia), Michael Schlosser (University of Vienna, Austria), John Troyer
(University of Connecticut, USA), Matej Guid (FIDE Master, University of Ljubljana,
Slovenia), Muhidin Mulalic (International University of Sarajevo, Bosnia and
Herzegovina), A. C. Sukla (Sambalpur University, India) and the many unnamed
computer programmers, mathematicians and statisticians I have consulted with (and
learned from) over the Internet.
Special thanks to my colleagues, Uwe Dippel and Manjit Singh. The former for being
my (unofficial) academic mentor for several years and for his translation services
(German/French to English), and the latter for having shared with me many of his
experiences as a doctoral student. I would also like to thank the University of Malaya
staff (especially in the main library) for providing impeccable assistance and academic
resources. Even though they may never hear of it, my appreciation also goes to AT&T
Inc. for their ‘Natural Voices™’ technology, which enabled a computer to read this
entire thesis back to me in an almost human voice when it would have perhaps been too
much to ask of any human.
Very special thanks to Jaap van den Herik in the Netherlands for proofreading the final
draft of this thesis, and for his insightful comments. I wish you all the best, sir, on your
move from Universiteit Maastricht to Tilburg University, and sincerely appreciate the
time and effort you have spent on my behalf. Finally, I would like to thank my family
for their support and encouragement.
This research is supported by the University Tenaga Nasional research grant
J510050123.
vi
For Gamers of the Future
vii
CONTENTS
ABSTRACT.....................................................................................................................ii
ACKNOWLEDGEMENTS...........................................................................................iv
LIST of FIGURES .........................................................................................................xi
LIST of TABLES .........................................................................................................xiii
ABBREVIATIONS ......................................................................................................xiv
CHAPTER 1: INTRODUCTION..................................................................................1
1.0 Preliminary......................................................................................................1
1.1 Motivation........................................................................................................3
1.2 Thesis Objectives.............................................................................................5
1.3 Thesis Scope.....................................................................................................6
1.4 Main Contributions of this Work..................................................................8
1.5 Thesis Organization ........................................................................................9
1.6 Summary of Research Questions.................................................................11
CHAPTER 2: LITERATURE REVIEW....................................................................13
2.0 Computational Research into Chess Aesthetics .........................................13
2.1 Emanuel Lasker and Aesthetics...................................................................15
2.2 Automatic Judging of Compositions ...........................................................17
2.3 Principles of Beauty ......................................................................................21
2.4 Computer Chess Problem Composition......................................................24
2.5 Elements of Beauty Classified......................................................................27
2.6 Beauty Heuristics in a Game Engine...........................................................30
2.7 Computational Improvement of Chess Problems......................................33
2.8 A Look at Methodologies Used in Other Domains.....................................38
2.9 Chapter Summary.........................................................................................42
CHAPTER 3: METHODOLOGY – Aesthetics in the Game ...................................45
3.0 Components of the Research........................................................................45
3.1 The Proposed Model of Aesthetics...............................................................45
3.2 A Conceptual Framework for Aesthetics in the Game..............................46
3.3 An Examination of Aesthetics......................................................................49
3.3.1 Composition Conventions...........................................................................50
3.3.2 Brilliancy in Real Games ............................................................................52
3.3.3 Principles of Aesthetics...............................................................................54
3.4 A Selection of Aesthetic Principles and Themes.........................................58
3.5 A Formula for Cumulative Aesthetic Assessment .....................................61
3.5.1 The Development of Standard Evaluation Functions .................................62
3.5.2 Metrics and Properties Used in the Aesthetic Assessment .........................67
3.5.2(a) Piece Value and Piece Count ..........................................................69
3.5.2(b) Distance, Piece Power, Mobility and Piece Field ...........................71
3.5.2(c) Summary of Metrics and Properties................................................73
3.5.3 A Note on Benchmarks...............................................................................74
3.6 A General Methodology for Developing Aesthetics Formalizations ........74
3.7 The Scope of Analysis Explained.................................................................78
3.8 Points of Evaluation (POE) ..........................................................................80
3.8.1 The Moving Piece .......................................................................................81
3.9 Chapter Summary.........................................................................................82
viii
CHAPTER 4: METHODOLOGY – Aesthetic Principle Formalizations................83
4.0 Formalizing the Seven Aesthetic Principles................................................83
4.1 Violate Heuristics Successfully ....................................................................85
4.1.1 Keep Your King Safe..................................................................................86
4.1.2 Capture Enemy Material .............................................................................87
4.1.3 Do Not Leave Your Own Pieces ‘En prise’................................................89
4.1.4 Increase Mobility of Your Pieces................................................................90
4.2 Use the Weakest Piece Possible....................................................................91
4.3 Use All of the Piece’s Power.........................................................................92
4.4 Win with less Material..................................................................................93
4.5 Checkmate Economically .............................................................................94
4.5.1 Explanation of the Concept.........................................................................95
4.5.2 Features of Economy...................................................................................96
4.5.3 The Economy Evaluation Function.............................................................97
4.5.4 The Process of Evaluation.........................................................................100
4.5.5 Validation..................................................................................................102
4.5.5(a) Compositions vs. Tournament Games ..........................................102
4.5.5(b) Compositions vs. Tournament Games (Improved).......................104
4.5.5(c) Testing against Human Assessment..............................................105
4.5.6 Minor Economical Differences.................................................................106
4.5.7 Paradoxical Economy................................................................................108
4.5.8 Perfect Economy.......................................................................................109
4.6 Sacrifice Material........................................................................................110
4.7 Spread Out the Pieces (Sparsity) ...............................................................112
4.7.1 Explanation of the Concept.......................................................................112
4.7.2 A Look at Possible Approaches ................................................................115
4.7.3 The Sparsity Evaluation Function.............................................................116
4.7.4 Validation..................................................................................................119
4.7.4(a) Sparsity and Piece Count ..............................................................120
4.7.4(b) Sparsity and Piece Count (Alternative Method) ...........................121
4.7.4(c) Sparsity and Piece Configuration..................................................122
4.7.5 Discussion .................................................................................................124
4.8 Points of Evaluation for the Aesthetic Principles.....................................125
4.9 Chapter Summary.......................................................................................125
CHAPTER 5: METHODOLOGY – Theme Formalizations ..................................127
5.0 Formalizing the Ten Themes .....................................................................127
5.1 Fork ..............................................................................................................128
5.2 Pin.................................................................................................................132
5.3 Skewer..........................................................................................................137
5.4 X-Ray............................................................................................................139
5.5 Discovered/Double Attack..........................................................................142
5.6 Zugzwang.....................................................................................................146
5.7 Smothered Mate ..........................................................................................149
5.8 Cross-check..................................................................................................150
5.9 Promotion ....................................................................................................152
5.10 Switchback...................................................................................................154
5.11 Points of Evaluation for the Themes .........................................................155
5.12 Chapter Summary.......................................................................................156
ix
CHAPTER 6: EXPERIMENTAL RESULTS and DISCUSSIONS.......................158
6.0 The Six Experiments Performed ...............................................................158
6.1 Experiment 1: Frequencies.........................................................................160
6.1.1 Frequencies of the Themes........................................................................161
6.1.2 Frequencies of the Aesthetic Principles....................................................163
6.1.3 Discussion .................................................................................................164
6.2 Experiment 2: Evaluation of the Aesthetic Principles.............................165
6.3 Experiment 3: Evaluation of the Themes .................................................167
6.4 Experiment 4: Cumulative Evaluation .....................................................173
6.4.1 Aesthetic Principles Only..........................................................................178
6.4.2 Themes Only.............................................................................................180
6.4.3 Discussion .................................................................................................182
6.5 Experiment 5: Conformity to Authoritative Human Assessment ..........183
6.6 Experiment 6: Correlation with Human Assessment ..............................186
6.6.1 Survey 1 (Mixed) ......................................................................................190
6.6.2 Survey 2 (Mixed, Discrete Evaluations)...................................................192
6.6.2(a) Levels of Agreement.....................................................................194
6.6.3 Survey 3 (Tournament Games).................................................................195
6.6.4 Survey 4 (Compositions) ..........................................................................197
6.6.5 Survey Conclusions...................................................................................198
6.7 Chapter Summary.......................................................................................202
CHAPTER 7: CONCLUSION...................................................................................205
7.0 Preliminary..................................................................................................205
7.1 Thesis Summary..........................................................................................205
7.2 Thesis Contributions...................................................................................208
7.3 Implications of the Research......................................................................209
7.4 Directions for Further Work......................................................................212
REFERENCES............................................................................................................217
APPENDIX A: CHESS RULES ................................................................................233
1.0 Introduction to the Game...........................................................................233
1.1 Movement of the Pieces ..............................................................................234
1.1.1 Rook..........................................................................................................235
1.1.2 Bishop .......................................................................................................235
1.1.3 Queen ........................................................................................................236
1.1.4 Knight........................................................................................................236
1.1.5 King...........................................................................................................237
1.1.5(a) Castling .........................................................................................237
1.1.6 Pawn..........................................................................................................239
1.2 Check, Checkmate and Stalemate .............................................................240
1.3 Other Rules..................................................................................................242
1.3.1 Resignation and Draws .............................................................................242
1.3.2 Repetition of Positions..............................................................................243
1.3.3 50-Move Rule ...........................................................................................243
1.3.4 Touching Pieces ........................................................................................244
1.4 Chess Notation.............................................................................................244
1.4.1 Board Notation..........................................................................................246
APPENDIX B: GLOSSARY of CHESS TERMS ....................................................248
x
APPENDIX C: EXAMPLE POSITIONS.................................................................253
Subsection 3.3.1 .......................................................................................................253
Subsection 3.3.3 .......................................................................................................254
Subsection 3.5.1 .......................................................................................................255
Section 4.2 ................................................................................................................256
Subsection 4.5.4 .......................................................................................................257
Section 5.1 ................................................................................................................257
Section 5.2 ................................................................................................................259
Section 5.4 ................................................................................................................260
Section 5.5 ................................................................................................................261
D (Refer Appendix).................................................................................................263
APPENDIX D: CHESTHETICA ..............................................................................264
APPENDIX E: PSEUDOCODE ................................................................................271
Subsection 4.1.2 .......................................................................................................271
Subsection 4.1.3 .......................................................................................................272
Section 4.3 ................................................................................................................272
Section 4.5 ................................................................................................................273
Section 4.7 ................................................................................................................274
Section 5.1 ................................................................................................................274
Section 5.2 ................................................................................................................276
Section 5.4 ................................................................................................................278
Section 5.5 ................................................................................................................279
Section 5.6 ................................................................................................................281
APPENDIX F: SURVEY DATA ...............................................................................282
1.0 Overview of the Surveys.............................................................................282
1.1 Instruction Set (Surveys 1, 3 and 4)...........................................................283
1.1.1 Instruction Set (Survey 2) .........................................................................285
1.2 The Combinations Rated............................................................................288
1.3 The Combinations Rated (PGN Compatible)...........................................300
1.4 Control Questions .......................................................................................305
1.4.1 Survey 1 ....................................................................................................307
1.4.2 Survey 2 ....................................................................................................308
1.4.3 Survey 3 ....................................................................................................309
1.4.4 Survey 4 ....................................................................................................310
1.5 Respondent Ratings ....................................................................................311
1.6 Screen Captures ..........................................................................................319
SELECTED PUBLICATIONS..................................................................................321
xi
LIST of FIGURES
Figure 3.1 Concept of Aesthetics in Chess...............................................................48
Figure 3.2 Layers of an Aesthetic Evaluation Function...........................................67
Figure 4.1 Scores for Violation of ‘Keep Your King Safe’ .....................................86
Figure 4.2 Maximum ‘Control Fields’ for the Chessmen ........................................98
Figure 4.3 Economy Scores of Checkmate Positions.............................................102
Figure 4.4 Economy Scores for Compositions and Tournament Games ...............103
Figure 4.5 Economy Scores for ‘Improved’ Positions ...........................................105
Figure 4.6 Minor Economic Improvements to a Position ......................................107
Figure 4.7 Economy Paradox .................................................................................108
Figure 4.8 Highly Economical Checkmates...........................................................110
Figure 4.9 Sparsity in Chess Compositions............................................................113
Figure 4.10 Sufficient Sparsity (Constructed Positions) ..........................................114
Figure 4.11 Sparsity Scores of Chess Positions from Tournament Games..............118
Figure 4.12 Sparsity Scores of Go Positions............................................................119
Figure 4.13 Sparsity Values of 1,000 Random Game Positions ..............................120
Figure 4.14 Sparsity Values of 1,000 Random Game Positions (Alternate)............122
Figure 5.1 The Fork................................................................................................129
Figure 5.2 The Pin ..................................................................................................133
Figure 5.3 Aesthetic Assessment of the Pin ...........................................................136
Figure 5.4 The Skewer............................................................................................137
Figure 5.5 Aesthetic Assessment of the Skewer.....................................................138
Figure 5.6 The X-ray..............................................................................................139
Figure 5.7 Aesthetic Assessment of the X-Ray......................................................142
Figure 5.8 The Discovered/Double Attack.............................................................143
Figure 5.9 Aesthetic Assessment of the Discovered Attack...................................144
Figure 5.10 The Zugzwang.......................................................................................148
Figure 5.11 The Smothered Mate.............................................................................149
Figure 5.12 Aesthetic Assessment of the Cross-check.............................................151
Figure 5.13 The Saavedra Position...........................................................................153
Figure 6.1 Frequencies of Themes in the Combinations........................................161
Figure 6.2 Frequencies of Aesthetic Principles in the Combinations.....................163
Figure 6.3 Cumulative Aesthetic Scores for Combinations ...................................174
Figure 6.4 Highest Scoring Combinations (a) COMP, (b) TG...............................175
Figure 6.5 Lowest Scoring Combinations (a) COMP, (b) TG ...............................177
Figure 6.6 Cumulative Scores Based on Aesthetic Principles Only ......................179
Figure 6.7 Cumulative Scores Based on Themes Only..........................................181
Figure A.1 The Initial Position of the Pieces ..........................................................234
Figure A.2 Movement of the Rook..........................................................................235
Figure A.3 Movement of the Bishop.......................................................................235
Figure A.4 Movement of the Queen........................................................................236
Figure A.5 Movement of the Knight.......................................................................236
Figure A.6 Movement of the King ..........................................................................237
Figure A.7 Before and after Castling ......................................................................238
Figure A.8 Castling Illegal for Both White and Black............................................238
xii
Figure A.9 Movement of the Pawn .........................................................................239
Figure A.10 En passant .............................................................................................240
Figure A.11 Check.....................................................................................................241
Figure A.12 Checkmate and Stalemate .....................................................................242
Figure A.13 The Chessboard and its Coordinates.....................................................244
Figure C.1 A Typical ‘Logical’ School Composition.............................................253
Figure C.2 J. Mintz, The Problemist, 1982, Helpmate in 3 (Black to Play) ...........254
Figure C.3 The ‘Immortal Game’ (after 17. … Qxb2)............................................254
Figure C.4 Kasparov vs. Deep Junior, Game 5, New York, 2003..........................255
Figure C.5 Deep Blue vs. Kasparov, Game 6, New York, 1997.............................255
Figure C.6 Two-way Discovered Checkmate .........................................................256
Figure C.7 Two-Phase Piece Removal (Economy).................................................257
Figure C.8 Activated Fork.......................................................................................257
Figure C.9 Repeated Fork .......................................................................................258
Figure C.10 Immobilizing the Queen with a Two-way Pin......................................259
Figure C.11 A Three-way Pin (Bxd5).......................................................................259
Figure C.12 Negative Evaluation for the Pin after 1. Qg2........................................260
Figure C.13 A Double X-ray with 1. Bxd4...............................................................260
Figure C.14 Castling as a Discovered Attack Manoeuvre (0-0#) .............................261
Figure C.15 Double-Discovered Attack (after 1. Ndf4+) .........................................261
Figure C.16 Stalemate in 3........................................................................................263
Figure D.1 The Main Interface to CHESTHETICA ...............................................265
Figure D.2 The ‘About Box’ ...................................................................................266
Figure D.3 The Aesthetics Evaluation Panel...........................................................267
Figure D.4 The Thematic Frequency Chart.............................................................268
Figure D.5 Aesthetic Principle and Theme Selection .............................................268
Figure D.6 The Mate Solver....................................................................................269
Figure F.1 Survey 1: Control Question 1................................................................307
Figure F.2 Survey 1: Control Question 2................................................................307
Figure F.3 Survey 2: Control Question 1................................................................308
Figure F.4 Survey 2: Control Question 2................................................................308
Figure F.5 Survey 3: Control Question 1................................................................309
Figure F.6 Survey 3: Control Question 2................................................................309
Figure F.7 Survey 4: Control Question 1................................................................310
Figure F.8 Survey 4: Control Question 2................................................................310
Figure F.9 Survey 3: Screen Capture 1...................................................................320
Figure F.10 Survey 3: Screen Capture 2...................................................................320
xiii
LIST of TABLES
Table 3.1 General Aesthetic Principles, Conventions and Brilliancy Compared....55
Table 3.2 Refined Aesthetic Principles and Themes...............................................60
Table 3.3 Metrics and Properties Used....................................................................73
Table 3.4 Points of Evaluation in a Combination....................................................80
Table 4.1 Points of Evaluation for the Aesthetic Principles..................................125
Table 5.1 X-ray Defensive Capabilities ................................................................141
Table 5.2 Points of Evaluation for the Themes .....................................................156
Table 6.1 Average Scores for Aesthetic Principles ...............................................165
Table 6.2 Standard Deviations of Average Aesthetic Principle Scores ................166
Table 6.3 Significance of Diff. between Mean Aesthetic Principle Scores ..........167
Table 6.4 Average Scores for the Themes.............................................................168
Table 6.5 Standard Deviations of Average Scores for Themes.............................169
Table 6.6 Significance of Mean Differences of Theme Scores.............................170
Table 6.7 Average Cumulative Aesthetic Scores for the Combinations...............173
Table 6.8 Average Cumulative Aesthetic Scores for Aesthetic Principles Only ..178
Table 6.9 Average Cumulative Aesthetic Scores for Themes Only......................180
Table 6.10 Human vs. Computer Assessment (COMP+TG Combinations) ..........190
Table 6.11 Human Assessment vs. Computer (Discrete Evaluations)....................193
Table 6.12 Level of Human Agreement with Computer Assessment.....................194
Table 6.13 Human vs. Computer Assessment (TG Only).......................................196
Table 6.14 Human vs. Computer Assessment (COMP Only).................................198
Table 6.15 Summary of Human-Computer Assessment Correlations....................199
Table 6.16 Summary of Positive Correlations ........................................................201
Table A.1 The Chessmen .......................................................................................233
Table A.2 Shorthand Notation................................................................................246
xiv
ABBREVIATIONS
1T One-tailed
2T Two-tailed
AI Artificial Intelligence
APP Use all of the Piece’s Power
COMP Chess Composition Combinations
DDA Discovered/Double Attack
FIDE Fédération Internationale des Échecs
FEN Forsyth-Edwards Notation
FM FIDE Master
GM Grandmaster
ICP Improver of Chess Problems, The
IM International Master
LOA Level of (Human) Agreement
LOD Level of (Computational) Distinction (between Scores)
PGN Portable Game Notation
SD Standard Deviation
SL Significance Level (of)
TG Tournament Game Combinations
TTUV Two-sample t-test assuming Unequal Variances
VH Violate Heuristics (Successfully)
WPP Use the Weakest Piece Possible
WWLM Win with Less Material
1
CHAPTER 1: INTRODUCTION
1.0 Preliminary
Research into games is important, especially in the field of AI. The following paragraph
articulates the main reasons quite well.
“There are two principal reasons to continue to do research on games. . .
First, human fascination with game playing is longstanding and pervasive.
Anthropologists have catalogued popular games in almost every culture. . .
Games intrigue us because they address important cognitive functions. . . The
second reason to continue game-playing research is that some difficult games
remain to be won, games that people play very well but computers do not.
These games clarify what our current approach lacks. They set challenges for
us to meet, and they promise ample rewards.” (Epstein, 1999)
A zero-sum perfect information game (sometimes with a hyphen between ‘perfect’ and
‘information’) is one in which a player gains at the equal expense of others and where
every player knows the results of all the previous moves. Examples include noughts and
crosses, checkers, chess and Go (in scientific literature, there is some common
agreement that the game be referred to using a capital letter to differentiate it from the
English verb ‘go’). These are games where it is theoretically possible to build a
computational move ‘tree’ of all the positions that could occur and thus facilitate perfect
play. However, for games such as Go and chess the number of possible positions to
examine is too large even for computers. It is estimated that there are approximately
1046
legal positions in chess and around 10170
in Go (Chinchalkar, 1996; Tromp and
2
Farnebäck, 2006). Even so, good evaluation functions and efficient search techniques
allow computers to play such games, with the current and notable exception of Go, quite
well (Levy and Newborn, 1992; Campbell et al., 2002; Walczak, 2003; Hauptman and
Sipper, 2007; Hsu, 2007).
One of the most popular research domains in this respect is chess. The beginnings of
chess are obscure but it is thought to have originated in northern India around 600 AD
and spread mainly through traders to other parts of the world (Eales, 2002; Shenk,
2006). The most widely played version today is Western or international chess and is
regulated by the Fédération Internationale des Échecs (FIDE) or World Chess
Federation. The rules of international chess have remained essentially the same since
1475 (Hooper and Whyld, 1996). Ever since Claude Shannon (1950) wrote his seminal
paper on how a computer could be programmed to play chess; researchers,
programmers and especially the public have been fascinated at the prospect of
computers playing the game at the same level of human experts or better (Grier, 2006).
The approach suggested is often also credited to Alan Turing (1953). The hope was that
whatever methods achieved this might shed some light onto the mechanics of human
thought processes because one must be thinking in order to play the game (Newborn,
1997). Computer chess programs today play at the grandmaster (GM) level and have
even beaten the world champion by relying mainly on brute-force (i.e. exhaustive or
nearly exhaustive searching of relevant parts of the game tree) which is different from
how humans play (Hsu, 2004). Even though this is not exactly what AI researchers were
hoping for (Hendler, 2006), research into the game has provided benefits and insights
into other areas (see section 2.0).
3
However, there is an important aspect of chess that computers are quite poor at. This is
aesthetics and it is one of the main reasons humans play (Kasparov, 1987; Damsky,
2002; Dossi, 2005). Computers cannot tell a beautiful move combination or game from
a regular or unattractive one the way humans can. Chess was chosen as a suitable
domain of research because its aesthetic aspect (especially prominent in chess
compositions) is well established in the literature, more so than Go or any other zero-
sum perfect information game.
Real games (e.g. in tournaments) are also known to exhibit aesthetics, and ‘brilliancy’
prizes are sometimes awarded to such games. With chess programs playing on a level
equal to - and in some cases greater than - the best human players, the time seems ripe
for focusing on the aesthetics of the game. Since humans strive for, and appreciate
beauty in chess, it would be valuable if computers could recognize it in a way that is
comparable to humans given that machines are able to analyze many more positions in
the game tree than humans.
1.1 Motivation
A zero-sum perfect information game is a good place where complex ideas can be
experimented with because in theory, such games are finite and particularly amenable to
computation. This is the reason chess has for many decades been the subject of much
research in various fields (see section 2.0). However, the main focus has always been on
how to make computers play the game on a level equal to, or exceeding that of the best
human players. This has, since the late 1990s, been demonstrated (see subsection 3.5.1).
Even commercially available computer programs today play at the grandmaster level.
Researchers have therefore, in this respect, now generally shifted to more complex
4
games like Go (Wu and Baldi, 2007). The following six reasons served as motivation
for this research.
• Aesthetics in chess has received little attention in AI despite it being an
important part of the game that matters to players. Humans, unlike
computers, do not play solely to win. They also want their games and
compositions to be beautiful and fascinating. A computational model for
aesthetics in the game would therefore benefit humans and enhance the
capabilities of existing chess programs.
• Research into automatic chess problem composition has not accounted for
aesthetics in a meaningful way or perhaps at all (see sections 2.2 and 2.4). It
neither separates aesthetics from composition convention (see Appendix B)
nor takes into account much of the knowledge that is available in chess
literature on the subject of aesthetics.
• Existing formalizations (usually in the form of an evaluation function
represented using a mathematical formula) on chess ‘quality’ typically use
fixed values attributed to aesthetic principles and chess themes. These do not
reflect the variations possible in such principles and themes (e.g. a different
piece configuration of the same theme) in a way that is both flexible yet
consistent. As a result, aesthetics is not accounted for reasonably in
compositions (see section 2.7), and even less in actual games.
• Other similarly complex zero-sum perfect information games such as Go and
up to a thousand other chess variants also have an aesthetic dimension that
has not benefited from computational analysis (Pritchard, 2000b). An
aesthetics model for chess could, in principle, be extended or adapted to
these games as well for the benefit of humans. Chess variants for example,
5
usually vary in only one respect such as the board size or additional piece
types.
• Aesthetic models have been developed with some success in less discrete
domains such as art (e.g. photographic images, paintings) and music
(Machado and Cardoso, 1998; Golub, 2000; Manaris et al., 2002a, 2002b;
Datta et al., 2006). A more reliable model could perhaps be developed for a
theoretically finite domain like chess. This in turn could inspire the
development of better models in those domains and others since chess is
often used or referenced in many areas of research (see section 2.0).
• A personal interest in the game of chess and over 20 years of active playing
experience, combined with an equal interest and level of experience with
computer programming. The prospect of developing a computer program –
probably the first of its kind - capable of recognizing beauty in chess based
on a viable model was therefore also a motivator.
Due to all the reasons mentioned above, a discrete computational aesthetics model for a
zero-sum perfect information game like chess was deemed worthy of investigation. The
term ‘discrete’ signifies the distinct yet synergetic components of the proposed model
(see section 3.1).
1.2 Thesis Objectives
The objectives of this thesis are as follows.
1. To study chess (as a zero-sum perfect information game) and its relevant
literature on aesthetics to identify the pertinent issues.
6
2. To propose a model that makes aesthetic evaluation in the game
computationally feasible.
3. To derive formalizations for a selection of aesthetic principles.
4. To derive formalizations for a selection of chess themes.
5. To develop a computer program incorporating those formalizations for the
purpose of performing relevant experiments.
6. To test the viability of the model through experimentation in terms of
aesthetic recognition in the game and positive correlation with human
aesthetic assessment.
1.3 Thesis Scope
The scope of this thesis is as follows.
1. Review the relevant literature on chess with emphasis on its aesthetic aspect.
2. Review and evaluate existing methodologies that have attempted to address
aesthetics in the game computationally. Include also research that did not
actually address aesthetics where it would have been pertinent. In the interest
of a general context, briefly review methodologies of aesthetic evaluation in
other domains such as art and music.
3. Propose a conceptual framework for aesthetics in the game which is a way of
thinking about it that can guide proper investigation. Contrast with the
current practice of conflating composition convention with aesthetics.
4. Investigate composition conventions and brilliancy in real games. Identify
the areas in which they overlap with established aesthetic principles, as also
described in chess literature.
7
5. Propose a selection of aesthetic principles and themes for evaluation. These
include those that apply, as far as possible, equally to both domains.
6. Propose a formula for cumulative aesthetic assessment in a move
combination. Explain the choice of metrics and properties to be used.
7. Present a general methodology for developing formalizations for aesthetic
principles and themes in the game.
8. Define and explain the chosen scope of mate-in-3 combinations and the
points of evaluation for each selected aesthetic principle and theme. This is
to facilitate experimentation.
9. Propose formalizations for the selected aesthetic principles and themes in the
game with explanations about the logic behind their design. Include
discussions about their strengths and limitations.
10. Develop a computer program that incorporates these formalizations to make
experimentation feasible. It should possess features which make a variety of
experiments involving compositions and real games possible.
11. Validate the aesthetics model through experimentation in terms of its ability
to recognize aesthetics in the game computationally.
12. Demonstrate that the computational assessment of aesthetics in the game,
within the chosen scope of mate-in-3 combinations, correlates positively
with human chess player aesthetic assessment.
This thesis explores aesthetic principles that pertain to the game of international chess in
general but limits experimental studies to mate-in-3 combinations. Aesthetic principles
that apply mainly to other domains such as art and music are beyond the scope of this
thesis.
8
1.4 Main Contributions of this Work
The key contributions of this research include the following.
1. To review and examine aesthetic principles (and themes) in the zero-sum
perfect information game of international chess as described in its relevant
literature.
2. To propose a conceptual framework for aesthetics as a way of thinking about
aesthetics in the game. This framework isolates aesthetics as a component
not exclusive to compositions or real games. It makes aesthetics more
computationally amenable and easier to apply to both domains in a way that
does not conflate with composition convention or brilliancy (in real games).
3. To propose a formula for cumulative aesthetic assessment in a move
sequence or combination. It is based on the idea that dynamic formalizations
for aesthetic principles and themes, in summation, can represent the aesthetic
content of a combination. These are in turn based on metrics and properties
inherent to the game. This permits the use of aesthetic evaluation in addition
to other forms of computational assessment in the game such as composition
convention and standard game-playing heuristics.
4. To present a general methodology for developing aesthetics formalizations
in the game. Using this approach (and the concept of benchmarks),
formalizations for other aesthetic principles and themes can be developed in
a similar way to those developed for this research.
5. To propose a set of dynamic formalizations (and explain the logic behind
their individual designs) for a selection of aesthetic principles and themes.
9
These represent the common ground of aesthetics between the domains of
chess compositions and real games.
6. To devise a few novel experiments for validating aesthetic recognition in the
game based on the proposed computational aesthetics model.
7. To develop a computer program incorporating the aesthetics model (and all
the formalizations) for experimental purposes. Manual evaluation is
complicated and prone to error, especially for bulk analysis. This program
can be used by other researchers to save time in evaluating aesthetics based
on the model.
8. To evaluate the proposed aesthetics model in terms of its ability, when
implemented, to recognize aesthetics in the game.
9. To test the computational aesthetic recognition capability of the model for
positive correlation with human chess player assessment.
The results of a variety of experiments suggest that the aesthetics model can be used to
recognize aesthetics in the game of chess within (at least) the scope of mate-in-3
combinations. The aesthetic scores produced by a computer program based on the
model also correlate well with human chess player aesthetic assessment.
1.5 Thesis Organization
The detailed structure of this thesis is as follows. Chapter 2 reviews the relevant chess
and scientific literature pertaining to aesthetics in the game. It generally illustrates the
importance of aesthetics in chess over the last century, and the attempts that have been
made to bring that concept into the computational domain. The chapter also briefly
10
reviews methodologies applied to gauge aesthetics in other domains such as art and
music.
Chapter 3 introduces the proposed model of aesthetics. The components of the model
include an examination of aesthetics from the perspective of problem composers and
players, as described in the relevant chess literature. A common ground of aesthetics is
identified as the focus of this research. A selection is made of aesthetic principles and
themes that fall within that common ground. The chapter also presents a formula for
cumulative aesthetic assessment and an explanation of the metrics and properties used.
The methodologies behind standard evaluation functions in the game are reviewed
before one is proposed for developing aesthetic evaluation functions (i.e. related to the
selected principles and themes). The scope of analysis (for experimental purposes) is
then explained, followed by a description of the points of evaluation in a combination.
Chapter 4 details the actual evaluation functions for the seven selected aesthetic
principles. A detailed description of each principle and the logic behind the design of its
function are presented. Diagrams, examples, and experimental validation are provided,
where appropriate. Chapter 5 details the formalizations for the ten selected themes,
similar to the previous chapter. Chapter 6 presents and explains all the experiments
performed to validate the proposed model. Included are analytical discussions of the
results. Chapter 7 concludes with a summary of the thesis, its contributions, a section on
the research implications, and directions for further work in the area.
Appendix A explains the rules of international chess and how to read its algebraic
notation. Appendix B is a glossary of chess-related terms found in this thesis. Appendix
C contains diagrams of example positions referenced primarily in the main text.
11
Appendix D features specifications and information about the computer program (i.e.
CHESTHETICA) developed for this research. Appendix E shows the essential
pseudocode for implementing many of the proposed aesthetic formalizations. Appendix
F contains the survey questionnaires used and the relevant raw data that was collected.
Unless inclusive of the word, ‘Appendix’, references to specific parts of this document
are given according to chapter, section or subsection; e.g. chapter 3, section 3.5,
subsection 3.5.2 and subsection 3.5.2(d). General formulas (in the form of equations)
are numbered sequentially according to section but instantiations of those equations
(such as sample calculations) are not numbered. Chess move notation and board
coordinates in line with other text in the main document are given in bold (e.g. a5).
Example positions are sometimes given in FEN (Forsyth-Edwards Notation) within the
main text (with a reference to a corresponding diagram in Appendix C). The words
‘thesis’ and ‘research’ are sometimes used interchangeably to refer to the work
presented in this document.
1.6 Summary of Research Questions
In principle, this thesis attempts to answer two research questions.
1) Can aesthetics in chess (within a specific scope) be recognized
computationally?
2) If so, do the computational evaluations correlate positively with human chess
player aesthetic assessment?
12
Six experiments were performed to answer both these questions (see chapter 6) with
promising results. Question 1 is confirmed to the extent of mate-in-3 combinations (a
reasonable scope of analysis in the game) and question 2 to the extent involving
competent (not necessarily expert) human chess players; consistent with what is
necessary for aesthetic appreciation in the game.
13
CHAPTER 2: LITERATURE REVIEW
2.0 Computational Research into Chess Aesthetics
Computational research into the aesthetics of chess is relatively scarce. This may be due
to the emphasis over the last few decades on getting computers to play the game ever
more proficiently (Adelson-Velskiy et al., 1970; Hartmann, 1987a, 1987b; Heinz, 1997;
Walczak, 2003). It may also be due to the assumption that there is no reliable way of
quantifying beauty in the game (le Grand, 1986). In the first case, computers have today
advanced to the level of world-class players and are even used by most of them for
training purposes (Muller, 2002; Ross, 2006; Sukhin, 2007); this likely includes the use
of game databases and not just chess-playing programs (Campitelli and Gobet, 2007).
Therefore, rather than just moving to more complex games like Go (Hsu, 2007;
McCarthy, 2007), more emphasis can now be placed on aesthetics in chess. In the
second case, there exists substantial material on the subject in chess literature (see the
following sections) to base a computational model on. Since human players and
problem composers value beauty in the game, the idea of computational recognition of
beauty is worthy of investigation. There is also room for its application in existing
research which, currently address chess aesthetics superficially (see sections 2.6 and
2.7). Computational approaches to art forms are not unfeasible and are likely to become
more common in the future (Boden, 2007).
It is said that there are more books written on chess than books on all other games
combined (Jonsson, 2006). With over 700 million players worldwide (Polgar, 2005), it
is arguably the most popular game in the world (Wolff, 2001). It is also recognized as a
14
sport by the International Olympic Committee (IOC, 2008). Benjamin Franklin wrote
about the benefits of chess as far back as 1779 in his article, ‘On the Morals of Chess’
(Shenk, 2006). Investigations into chess have had many applications within and outside
of AI including molecular computing (Cukras et al., 1999; Faulhammer et al., 2000),
automated theorem proving (Newborn, 2000), computer music composition (Friedel,
2006), machine reading (Etzioni et al., 2007), cognitive development (O’Neil and Perez,
2007), treatment of psychiatric illness (Cavezian et al., 2008) and children education
(Ferreira and Palhares, 2008; AF4C, 2008). Such applications are not always predictable
so it is conceivable that this research could also be of interest or reference to researchers
in other fields or related ones.
This chapter reviews the more important and relevant contributions to computational
aesthetics in chess and scientific literature over the last century. It is a relatively recent
account, given for example, that documents featuring chess compositions date back over
1,000 years (Al-Adli, 9th
century). Whole books have been written on chess since the
15th
century (Axon, 1474). A review spanning the last 85 years or so is necessary to
illustrate how aesthetic principles have been described by experts and researchers prior
to and since the computer age. The reviews are arranged in chronological order for
proper perspective with a summary in section 2.9. A glossary of chess terms is provided
in Appendix B for reference. Even though it may not be directly applicable, in the
interest of a general context, section 2.8 presents a brief discussion about methodologies
relating to aesthetics used in other domains.
15
2.1 Emanuel Lasker and Aesthetics
Former world chess champion and mathematician Emanuel Lasker was one of the first
to write about aesthetics in chess explicitly. He maintained the world title for 27 years
starting in 1894, the longest ever held by a world champion. In his book, “Lasker’s
Manual of Chess” – originally written in 1925 - he devoted a chapter to the subject
entitled, ‘The Aesthetic Effect in Chess’ and stressed on the concept of ‘achievement’
and ‘correctness’ (Lasker, 1960). ‘Achievement’ means that beauty in the game had to
have some kind of positive result such as winning material, controlling more space on
the board, or checkmating the opponent, whereas ‘correctness’ implies that the method
of achievement be absolutely necessary and unequivocal. In other words, there had to be
no possible escape or defence by the opponent and no better way of attaining the same
achievement (e.g. in fewer moves). He also stated that in order to appreciate aesthetics
in chess, one need only to understand the game and not be a master himself.
Hence, the average player can just as easily derive pleasure from beautiful games and
compositions. He termed the pleasure spectators derived from the game – due to
witnessing moves they would call ‘brilliant’ or ‘beautiful’ - their ‘aesthetic valuation’.
This valuation was based on their immediate perception of a move’s brilliance. As a
result, some manoeuvres that were not, in fact, ‘correct’ (as would be revealed in the
post-mortem analysis of the game) elicited a high aesthetic valuation until their
incorrectness was discovered. In such cases, the valuation might diminish a little unless
it was suspected that the players had done so intentionally to fool the audience; in which
case it would diminish entirely. In tournament games, time constraints place a
considerable burden on players so all the variations of an attractive move combination
16
may not have been worked out properly (Harreveld et al., 2007). In compositions there
is no excuse.
So aesthetically, the occurrence of somewhat ‘incorrect’ brilliant moves in real games is
condoned whereas in compositions, they must withstand the most rigorous analysis.
Modern computer programs as a result have revealed weaknesses and flaws in many old
games and compositions that were once thought to be spectacular. Lasker showed many
examples of beautiful combinations from both tournament games and compositions.
Most of them were forced mates between 2 and 4 moves but others were longer and
more complex. One example in his book by an unknown composer featured a ‘forced
draw’ by White (despite having a significantly inferior army) that took 17 moves to
complete. In it, a pair of knights chased the enemy king around the board before the
initial position finally repeated itself. A game is considered drawn if the same position
recurs three times (see Appendix A, subsection 1.3.2).
Lasker was not specific about what he considered the tangible constituents of aesthetics
in chess and relied mainly on his experience with the game as opposed to
experimentation. His concepts of ‘achievement’ and ‘correctness’ are useful precepts
for a framework for aesthetics even though he proposed no formalizations himself. This
is understandable given the period in which his book was written, i.e. well before the
advent of computers. It is quite possible that even the idea of computing aesthetics in
the game was too controversial to be taken seriously. Lasker made no distinction
between the aesthetics of real games and compositions and thus did not take into
account composition conventions. This supports the idea that aesthetics transcends
either domain, at least in cases where the rules are the same (i.e. not including chess
17
variants). Even so, it possibly overlooks situations where some conventions could also
apply aesthetically to real games.
Lasker made the important observation that aesthetic appreciation is not an experience
limited to masters even though having an understanding of the game would imply a
certain level of competence as a player. While master players may be needed to identify
the principles of aesthetics, others can also appreciate them. Assessing computational
evaluation of aesthetics in terms of positive correlation with human perception would
therefore not necessitate the involvement of experts. In fact, it would probably be more
useful to exclude or not focus on them since they form only a small minority of the
chess community.
The psychological aspects of aesthetic perception Lasker suggested are interesting but
difficult to gauge computationally because they rely upon the intentions of players and
subjective valuation by spectators that potentially change based on those intentions.
These are neither computationally amenable nor within the scope of this thesis. In
summary, Lasker provides a good starting point on how to approach the question of
aesthetics in the game but his contribution lacks the building blocks (i.e. discrete
components) required for a computational model.
2.2 Automatic Judging of Compositions
Vaux Wilson - a chess composition judge and author - researched, proposed, and
refined over the course of 20 years, a method of evaluating the aesthetic and strategic
elements of chess problems through a scientific approach (Wilson, 1959, 1969, 1978).
The intention was to provide a logical basis for compositions to be judged in
18
tournaments because many composers felt that judges were too arbitrary or subjective
when choosing a winning composition. The method was supposedly similar to a much
earlier and obscure system proposed by Harley (1919) that was limited to two-move
problems, but no reference was made to that work.
Wilson identified exclusively nine basic ways or ‘strategic elements’ in which a moving
piece might influence the game. It could:
1. capture an opposing piece or sacrifice itself;
2. give check to the enemy king;
3. guard or abandon guarding a square;
4. move into a position where it could gain access to another square;
5. block or unblock a square;
6. castle;
7. move off, on or along a line;
8. open or close a line of check, or the guard of one square;
9. pin or unpin a piece.
These strategies were valued (typically between 2 and 10 points) based on the number
of pieces and squares involved. A ‘line’ was determined as consisting of 3 squares.
Since nothing else could possibly happen on the board when the pieces move in a chess
problem, the cumulative value of these strategies was considered to be inclusive of
aesthetics and any other impression one might obtain from a composition. Wilson’s
actual system incorporated several rules and exceptions that compensated for
composition conventions, e.g. with respect to ‘keys’ and ‘tries’ (see Appendix B). In
addition, a concept of economy was also evaluated and added for a final score.
19
Economy was calculated as the sum of strategic scores divided by the number of white
pieces. In general, the system was designed exclusively with compositions in mind, and
not real games, even though aesthetics is perceived in both (Humble, 1993, 1995;
Ravilious, 1994).
Wilson’s system was limited to chess problems but directly applicable to the many
different types such as orthodox mates, selfmates, helpmates, endgame studies, and
fairy problems (of any move length). He tested it on over 7,000 problems with
satisfactory results (i.e. compositions he perceived to be better scored higher) and the
system was used in a few composition tournaments. A significant positive correlation
with human judge evaluations was never demonstrated and probably because the system
was developed to address that very problem.
However, composers soon stopped using it mainly because human judges could not be
entirely replaced, as Wilson intended (le Grand, 1986). For example, compositions often
feature characteristic themes that could not properly be accounted for using the
strategies. At the time, Wilson was in the process of having a computer program
developed that incorporated his method and made calculations for composers even
easier. It is not known if this program was ever completed.
Wilson’s system conflated aesthetics with composition convention and this failed to
account for either one sufficiently, especially the former. His identification of chess
strategies was perhaps one of the earliest and most systematic approaches to the
problem of evaluating compositions (which nevertheless include an aesthetic
dimension) but suffered from oversimplification. There are two essential points that
illustrate this. First, the values attributed to each strategy were not adequately justified
20
and seemed to have stemmed from his experience as a composition tournament judge,
thereby limiting their applicability to little beyond compositions. These values also
failed to account for the variety of piece configurations possible within each strategy.
Second, metrics inherent to the game such as the number of pieces and distance (in
terms of squares on the board) were employed as the basis of some of the strategies but
were not incorporated in their universal form, e.g. defining a line as just 3 squares long
and not using the standard Shannon (1950) value of each piece (see subsection 3.5.2(a)).
These were apparently done to simplify calculations that, at the time, had to be
performed largely without the aid of computers.
Wilson tested his system experimentally on many contest-winning and generic problems
but his results were not very reliable because the intention was to replace the existing
paradigm of composition evaluation with a new, unbiased, and systematic one. What
seemed reasonable to him may not, in fact, have been so to the wider composition
community despite the best intentions to eliminate subjectivity. The scope of application
was also too large because it may be unreasonable to assume that human aesthetic
perception or appreciation of compositions remains constant despite the length of moves
or type of problem involved.
The rejection of his system by the composition community, however, is not necessarily
an indication of a failed approach. A more limited scope and flexible set of established
values (attributed to the strategies) would probably have improved it. In general, Wilson
introduced a scientific approach to aesthetics in the game even though not dealing with
it directly, and he showed that the evaluation of subjective aspects in chess is effective
to some degree using identified and quantifiable strategies or principles.
21
2.3 Principles of Beauty
The psychologist Stuart Margulies was perhaps the first person to study aesthetics in
chess experimentally. He derived eight principles of beauty in the game from the
judgement of experts (i.e. 30 players with an official Elo rating of over 2000) by
showing them pairs of positions and asking them to select the more beautiful solution
(Margulies, 1977). The Elo rating (see Appendix B), while widely used, is not
necessarily the best or most accurate measure of performance in the game (Donninger,
2003; Lopatka and Dzielinski, 2007; Elo, 2008). The eight identified ‘principles of
beauty’ derived by Margulies are as follows.
1. Successfully violate heuristics.
2. Use the weakest piece possible.
3. Use all of the piece’s power.
4. Give more aesthetic weight to critical squares.
5. Use one giant piece in place of several minor ones.
6. Employ themes.
7. Avoid bland stereotypy.
8. Neither strangeness nor difficulty produces beauty.
The 1st
principle involves making a move that goes against basic principles of ‘good
practice’ in chess. If the objective (e.g. checkmate, win material) is achieved despite
such a manoeuvre (e.g. leaving a piece exposed to capture), the move is considered a
successful heuristic violation. The 2nd
principle is related to economy. The queen and
rook for example, have similar capabilities along ranks and files on the board. If a rook
22
is sufficient for the task, the solution is considered more beautiful than using a queen
since the former is a weaker piece.
The 3rd
principle refers to the distance a particular piece travels. A piece’s mobility – the
number of squares it controls – is a good reflection of its power. Hence, a piece moving
a greater distance across the board is more beautiful because less of its power is wasted.
The 4th
principle places emphasis on the piece most involved in the objective. For
example, in a checkmate situation, the piece delivering mate would matter more,
aesthetically, than the one that moved; assuming they were not the same piece (like in a
‘discovered mate’, see section 5.5).
The 5th
principle was tested using imaginary pieces not in the original piece set. It was
found that experts preferred positions where all the necessary resources required for the
task were concentrated into one powerful piece, instead of several weaker ones. This
principle is therefore also related to economy or efficiency. The 6th
principle, i.e. using
chess themes (e.g. the pin, see section 5.2), is also important aesthetically. Margulies
determined that the more prominent a theme was in a solution, the more beautiful the
solution was considered to be. However, the themes had to be relevant or important to
chess.
The 7th
principle implies originality and favours rare positions over common ones, but
the 8th
principle seemingly contradicts it. Margulies found that highly unlikely positions
did not lead to judgements of beauty - the experts were actually equally divided between
them and common positions - and neither did solutions which were difficult to find. As
Margulies himself concluded, the 8th
principle is rather a restriction of the 7th
than its
contradiction. Rarity or originality is favoured aesthetically as long as it is not too
23
difficult to solve, or improbable, i.e. from the viewpoint of its likelihood of occurring in
a real game.
Margulies also questioned intermediate and novice players and found that the majority
of them (a higher proportion in the former) concurred with the experts as to which
solutions were more beautiful. This further supports Lasker’s contention that only
understanding - not mastery - is a prerequisite to appreciating beauty in the game
(Lasker, 1960; Belov et al., 1996). Margulies found that beautiful moves were often also
the most effective ones.
Margulies essentially identified through experimentation with experts many tangible
constituents or elements of aesthetics in the game of chess, and employed game metrics,
similar in some ways to Wilson. For example, pieces were evaluated according to their
relative values (see subsection 3.5.2(a)) and distance was measured in squares bound
only by the limits of the chessboard. The positions Margulies used in his experiments
were restricted to single moves to avoid ambiguity when interpreting the underlying
principle. However, he proposed no model or formalizations for aesthetics even though
the elements were clear. This is probably because his main intention was to investigate
‘traditional’ aesthetic principles (e.g. economy, elegance, novelty) outside the domain of
chess. The game was simply a convenient place to experiment. He found that chess only
confirmed, rather than provided more insight, into the traditional principles. His derived
principles of beauty in the game, though not necessarily a conclusive set (Fine, 1978),
are nevertheless valuable to the research presented in this thesis.
24
2.4 Computer Chess Problem Composition
Schlosser (1988, 1991), in his approach to computer chess problem composition, built
on related work (van den Herik and Herschberg, 1985; van den Herik et al., 1988) that
had been done with regard to chess endgame databases. He outlined three steps that
were required for the process. The model is as follows.
1.Construct a complete database.
2.Eliminate all ‘incorrect’ positions.
3.Select true chess problems.
Similar ideas were later used to compose problems in Tsume-Shogi, a Japanese game
not unlike chess (Hirose et al., 1997; Watanabe et al., 2000). The method was an
improvement over using a random algorithm (Noshita, 1996). A ‘reverse method’ has
recently been proposed (Horiyama et al., 2008) but is not directly applicable to chess
due to certain differences between the games. In Tsume-Shogi, each move of the
attacker must be a checking move; in a ‘shogimate’, only one solution exists; unlike
chess, where a mate might have more than one solution.
The 1st
step was restricted to (a database of) endgame positions with a few pieces
because the number of possible positions increases exponentially with the pieces,
making computation unfeasible (Stiller, 1995). Complete databases, tablebases or
‘oracles’ as they are known are designed through retrograde analysis. This involves
starting with say, a checkmate position (that has a specific game state, i.e. ‘won’) and
working one ply or half-move backwards (Thompson, 1986). The process is repeated
25
until a seemingly uncertain position can be shown to lead to a checkmate in the shortest
number of moves and against any defence.
A complete database would therefore include all possible positions of a certain set or
number of pieces, and their inevitable result (win, loss or draw) in a given number of
moves. Presently, a complete database of 6-piece endgames including the two kings has
been achieved (Thompson, 1996). Seven pieces is estimated to be possible by the year
2015 (Hurd and Haworth, 2006). Such databases are also possible in other variations of
the game (Fang, 2006). Efforts have been made to reduce the size of tablebases but they
are still generally quite large with sizes running into gigabytes for just 5 and 6 pieces
(Thompson, 1996; Heinz, 1999a; Nalimov et al., 2000). Given the ‘omniscience’ of
such databases, they are useful for developing learning approaches in the game
(Sadikov and Bratko, 2006).
The 2nd
step involves eliminating ‘incorrect’ positions from the standpoint of
composition conventions. Most conventions are not very difficult to formalize and this
step helps to reduce, significantly, the number of positions found that inevitably lead to
checkmate (given orthodox problems). The 3rd
step is where aesthetics is considered and
requires the intervention of human composers. Schlosser states the following.
“A computer, however, is not capable of composing like a human being. Creating a new
chess problem according to a given theme, which is the really creative part of a
composer's work, remains to be done by man.” (Schlosser, 1988)
26
“Formally, all positions left after step 2 are correct chess problems. To choose the
‘best’ ones from the potentially large set of correct positions, the imagination and
experience of a (human) expert is needed. According to the criteria of chess
composition, he selects what is new, artistically or aesthetically. There is still no way to
assign this task to a computer. An analogous situation exists in music composition or
painting.” (Schlosser, 1991)
Here, he acknowledges the importance of aesthetics and chess themes which typically
require the experience and expertise of a human composer. Schlosser implied that an
analogous situation exists in music and art, but these domains are more culturally
dependent, and have fewer discrete and computationally amenable components than
zero-sum perfect information games. Even so, computational models which address
aesthetics (in varying degrees) in those domains have since been developed with
reasonable success (Machado and Cardoso, 1998; Golub, 2000; Cope, 2001; Manaris et
al., 2002a, 2002b; Datta et al., 2006). These are beyond the scope of this thesis but their
methods are briefly discussed in section 2.8.
On its own, Schlosser’s first two steps were capable of finding forced checkmates that
were hard to solve by humans and occasionally featured interesting themes. This is to be
expected since themes or tactics are an integral part of how the game is won. The
problem, therefore, is in getting computers to recognize the aesthetics of a composition
or game for its own sake because somewhere in a massive tablebase certainly lie even
the most beautiful compositions that humans could conceive with those pieces and
would appreciate.
27
The commercially available program ‘ChessExplorer’ uses a similar two step process to
create chess problems of the mate-in-2 and 3 varieties. However, its second step does
not filter them using any criteria except checking for a forced mate with only one
solution. Hence, the ‘created’ problems are usually not attractive; this is still evident in
the latest version of the program i.e. v6.11 (Nowakowski, 2005, 2008).
Schlosser’s model provides a clever way to emulate creativity in composing through the
use of brute-force searching but still relies on human intervention for the aesthetics
component. He therefore separates aesthetics from composition convention and
concedes to the limitation of his approach. The author hopes that this research will
address the aesthetics component in a way that can be incorporated into models like the
one proposed by Schlosser.
The automation of problem composition can then be improved so it does not need to
rely on human intervention as much or at all (more recent work is discussed in section
2.7). Schlosser’s model limits the scope of automatic composition to orthodox problems
and what are possible using available endgame databases. Any reasonable aesthetics
model would also need to be limited in this way to be consistent with available
information, and feasible in terms of required computing power. In summary,
Schlosser’s approach clearly identifies the gap a computational aesthetics model would
fill in this context.
2.5 Elements of Beauty Classified
One of the recent books that address aesthetics in chess is, ‘Secrets of Spectacular
Chess’ (Levitt and Friedgood, 1995, 2008). The book is currently in its expanded 2nd
28
edition. In it, the authors – a chess grandmaster and international master of problem
solving, respectively – classify four elements of chess beauty namely paradox, depth,
geometry and flow. The book features a section entitled, ‘The Importance of Chess
Aesthetics’ and lists several reasons to support that contention. These include pleasure,
cultural or artistic value, educational and practical value.
Aesthetics in the game gives pleasure to a person and his life is considered to be more
meaningful than one who is unable to derive the same pleasure from it. Cultural or
artistic value is compared to paintings which exhibit the skill and genius of their artists.
In terms of education, good problems and pretty studies (a form of chess composition,
see ‘endgame study’ in Appendix B) are seen as an excellent teaching tool with
surprising solutions that can capture the imagination of those learning the game,
especially children. Finally, beautiful compositions and games have practical value in
actually improving a person’s – even a master’s - quality of play because they are full of
effective and original ideas.
Levitt and Friedgood write that virtually all world class players (e.g. Kasparov,
Botvinnik and Lasker) have an interest in the aesthetic aspect of chess and that it has
helped in their development. Returning to their elements of chess beauty, ‘paradox’
means a violation of heuristics or doing something that one is not usually supposed to
do, e.g. leaving a piece in a position to be captured. It is paradoxical because the move
wins despite going against general ‘good practice’. Successful heuristic violation (the
first principle of beauty derived by Margulies, see section 2.3) comes under this.
‘Depth’ refers to the point of the key move being obscured or unclear at the beginning
but realized later. It is the sort of foresight in a move that does not make much sense at
29
first and is not necessarily paradoxical, but makes perfect sense by the end of the
combination.
‘Geometry’ is the chance or planned formation of shapes on the chessboard that
resemble say, alphabets. While this is very rare in real games, some compositions
feature it. Geometry also includes other visual effects on the board such as symmetry
and the relevance of particular lines (i.e. ranks, files, diagonals) to a solution. ‘Flow’
describes a move sequence that is basically forced instead of complicated with many
side variations. Flow is therefore more common in real games than in compositions
where side variations may even be laudable. Themes – though not explicitly classified
as an element of beauty – are treated as a given rather than examined individually. This
is probably because not all implementations of chess themes are noteworthy from an
aesthetics standpoint even though most examples of exemplary beauty tend to feature
some theme or other.
Levitt and Friedgood succeed in presenting to a modern audience the aesthetic aspect of
chess using contemporary examples and styles of play. This is important because in the
computer age, it is sometimes thought that little is now left to the imagination,
especially for a zero-sum perfect information game. Their examples (of beauty in the
game) illustrate that there are still useful tactics and strategies that our current
computational approach to playing is unable or slow to recognize. This remains true
even today. In other words, we are still better at solving certain problems in the game
using our creativity than computers, despite their brute-force approach. Levitt and
Friedgood, however, do not themselves propose any models or formalizations for
aesthetics. Yet, their broad classification of the elements of beauty and well-chosen
30
examples of the finer aspects within them elucidate the principles of aesthetics proposed
by others (e.g. Margulies, though he is not cited) and extend them even further.
For instance, some of their examples suggest the importance of mobility (the number of
squares controlled by a piece in a particular position) as an additional property for
aesthetic computation (in addition to piece value and distance). Other examples
demonstrate the wide variety of possibilities within individual chess themes, which
Margulies identified as his 6th
principle but only briefly explained. Similar to Lasker,
their contributions stem from experience rather than experiment (although it is notable
they had the distinct advantage of computer analysis) and they make no significant
distinction between compositions and real games in terms of aesthetics. They also do
not suggest a way of thinking about aesthetics as an independent component that is not
necessarily exclusive to composition conventions or real games. Nevertheless, their
examination of aesthetics in the game contributes significantly to the literature on the
subject.
2.6 Beauty Heuristics in a Game Engine
Aesthetics in chess has also been applied as a viable alternative to traditional game-
playing heuristics. Walls (1997) proposed using some of the principles of beauty
derived by Margulies (see section 2.3) in a chess engine to see if it performed better
than one that used standard heuristics. It was found that the engine using beauty
heuristics was 25% faster and needed to analyze 33% fewer nodes (i.e. positions) than
the one using standard heuristics, for solving direct-mate chess problems between 2 and
5 moves long.
31
There are two important implications of Walls’ research. First, it supported his position
that humans make good moves in chess (at least in part) based on their ‘sense of
beauty’. Second, his findings also suggest a correlation between effectiveness and
aesthetics in the game. This is similar to using beauty as a ‘measurement of
performance’, and it has been suggested not only in chess but also in economics
(Katsenelinboigen, 1990, 1997). It is not known, however, if the results obtained by
Walls remain true in a full game. He did not apply all of the principles derived by
Margulies because not all of them were applicable to the scope of his research.
The first principle (see section 2.3), ‘successfully violate heuristics’ was adopted but
excluded standard heuristics that did not apply to mating problems. These included
those that (the violation of which) made it difficult to find the forced mate. The second,
third and fourth principles were summarized as ‘do not waste any power’. They
encapsulate traditional aesthetic principles such as economy, parsimony and simplicity.
Walls modified the fifth principle to ‘use all of the pieces’ because the original one used
imaginary pieces and could also be interpreted as wasting less power (or using all
available pieces). He eventually rejected this modified principle due to computational
overhead. Themes were not included for the same reason and because they were thought
to distract from finding the quickest solution to checkmate. The seventh and eighth
principles by Margulies were also not included.
The heuristics implemented in the standard game engine were limited to those
applicable to mating problems and included the following.
1. Place the enemy king in check.
2. Attack the squares surrounding the enemy king.
32
3. Sacrifice pieces if they lead to checkmate.
4. Gain enemy material.
The ‘beauty’ version of the engine included the first three standard game engine
heuristics and the following additional ones.
1. Violate the ‘gain enemy material’ heuristic.
2. Use the weakest piece possible (to check).
3. Use all of the piece’s power.
4. Give aesthetic weight to the critical piece.
The first additional heuristic was limited to violating just the 4th
standard heuristic
because violation of any of the others would impede finding the checkmate solution.
Walls implemented these beauty heuristics in a rather rudimentary manner. For
example, in order to encourage the engine into making sacrificial moves, the standard
evaluation function which calculates the material balance of a position (typical in all
chess programs) was disabled. Weaker pieces (pertaining to the second additional
heuristic) were determined using the standard Shannon values but limited to ‘checking’
moves. The third additional heuristic (i.e. use all of the piece’s power) involved
counting the number of squares made by the checking piece. There was no difference
therefore, between a queen moving across 5 squares and a bishop moving the same
distance. While this speeds computation, it may not correlate well with human aesthetic
perception of the manoeuvres since they involve pieces of different value.
The fourth additional heuristic awarded extra points to the move based on the number of
higher valued pieces in the piece set than the one performing check. Weaker pieces
33
therefore, were considered more critical than stronger ones. In general, Walls may have
compromised his experiments to a degree by oversimplifying the aesthetic principles he
used. The reason he did this was because the main focus was not aesthetics itself but an
improvement in game-playing heuristics which requires fast computation for efficient
searching.
A complex representation or formalization of the aesthetic principles, however
necessary, would have slowed down the beauty heuristics engine considerably. It is
difficult to say if any realistic measure or identification of aesthetics was attained
through his experiments. Initial tests with human players on the aesthetics component
alone would have established this. Even so, Walls demonstrated - with some degree of
success - a computational implementation of chess aesthetic evaluation that can
potentially improve game-playing heuristics.
2.7 Computational Improvement of Chess Problems
Some of the relatively recent research in the area has sought to improve the composing
ability of computers with regard to chess because unlike playing, computers are quite
poor in problem composition. The Improver of Chess Problems (ICP) was presented as
a model to improve the quality of two-move mate problems (HaCohen-Kerner et al.
1999). A significant proportion of the knowledge required to evaluate the quality of
compositions was formalized for this purpose through consultation with two
international masters of chess composition. Based on the model, a chess problem is
typically put through several ‘transformations’ in order to improve it. These
transformations include the following.
34
1. Deletion, addition or replacement of a piece on the board.
2. Transfer of a piece to another square within the same rank or file.
3. Transfer of a set of pieces using a particular movement (e.g. 3 files to
the right).
Each transformation is tried on a specific piece on the board (in a sequence of
importance) and applied only if the new position satisfies the three criteria mentioned
below.
1. It is legal.
2. It is a two-mover with only one key move.
3. It has a higher quality score.
The new position does not need to include the themes of the original problem or the best
quality score of the best transformation found so far. Thematic considerations were
considered restrictive to the number of improvements possible while weaker initial
transformations were seen as possibly leading to better overall improvement. The
quality evaluation function they used is shown below. V denotes the value function, Ti
the set of all themes in the position, Bj the set of all bonuses granted and Pk the set of all
penalties imposed.
( ) ( ) ( )
severe deficiency
otherwise
0
m
i j k
i j k
q
V T V B V P

=  + −∑ ∑ ∑
Ten themes common to compositions (e.g. direct battery, Grimshaw) were attributed
relative but fixed values ranging from 10 to 45. Bonuses included desirable practices in
35
composition such as placing the black king in the centre of the board (10 points) and
certain manoeuvres like sacrifices in the key move (5 × piece’s value). Penalties ranged
from severe deficiencies (e.g. illegal position, not a mate-in-2) to smaller things such as
a check (-50 points) or pinning a black piece (5 × piece’s value) in the key move.
The ICP was tested on 36 orthodox mate-in-2 chess problems taken from composition
books and managed to improve 10 or 27.7% of them. Eight of the ten were improved
after a single transformation and the remainder after two transformations. Mate-in-2
miniatures (no more than 7 pieces on the board) were used so that improvements could
be achieved within a reasonable amount of time. The low proportion of improvements
obtained from the 36 problems was attributed to the fact that these were known
compositions and mostly already optimized.
Aesthetics was not explicitly accounted for in the ICP model even though some of the
knowledge for evaluating the ‘quality’ of compositions included certain principles of
aesthetics such as themes and sacrifices. There are two significant issues. First, the
relative (fixed) values of themes, bonuses and penalties seemed to have been
determined arbitrarily by just two master composers, including the final determination
of perceived improvement over the original problems in the experiment. It is
noteworthy that the flow of information from expert to non-expert in complex domains
like chess often results in a bottleneck which affects the quality of the knowledge
formalized (Michie, 1986; Guid et al., 2008). Aesthetically, this approach does not
account for varying configurations of particular themes (e.g. using different pieces in
different places for a similar purpose) and the perception of composers in general; the
majority of whom are not masters.
36
Second, this model is not easily applicable to real chess games where aesthetics is also
perceived. The ICP was designed specifically with chess problems in mind.
Nevertheless, the ICP is an improvement over Schlosser’s model (see section 2.4)
because there is an attempt to deal with the aesthetics component, albeit in a way that
conflates it with convention (comparable to Wilson’s system, see section 2.2).
An improved model called, ‘Chess Composer’ used a similar approach to the ICP but
had fewer types of transformations (Fainshtein and HaCohen-Kerner, 2006a, 2006b).
This reduced the branching factor and increased the depth of applied transformations.
Chess Composer used brute-force searching to find a global maximum and did not
suffer from ICP’s limitations in terms of pruning the search tree, 1) wherever the
position was not legal, 2) not a two-mover with one key or, 3) with a lower quality score
than the original problem. Much of the domain knowledge was taken from the ICP
model with some additions, but the quality function remained the same.
Chess Composer was tested on 100 mate-in-2 chess problems and managed to improve
the quality of 97 of them. Despite its relative slowness, the model’s higher success rate
can be attributed to using a better search technique and greater depth of transformations
(3 levels instead of 2). Most of the improvements were, in fact, achieved after various
sequences of three transformations. The authors recognized Chess Composer’s
limitations in terms of aesthetics and state the following, before alluding to the use of
ICP’s formalized knowledge to compensate.
37
“The concept of a ‘high-quality mate problem’ in chess is hard to define, especially if
an automatic program is involved. It is not simple to define concepts such as beauty,
originality, uniqueness of the solution, and difficulty to solve.”
(Fainshtein and HaCohen-Kerner, 2006a)
Both the ICP and Chess Composer models are practical methods of ‘composing’ or at
least improving existing chess problems within a limited scope (e.g. mate-in-2) from the
standpoint of composition conventions. Longer problems are possible but would require
more effective search techniques in order to be computationally feasible (Fainshtein and
HaCohen-Kerner, 2006b). They admit that improving the quality function might
contribute to that (Fainshtein and HaCohen-Kerner, 2006a). In general, Chess
Composer improves more in terms of performance rather than technique, when
compared to the ICP, and does not look any deeper into the question of properly
accounting for aesthetics.
The conflation between composition convention, and aesthetics, still exists and as a
result the latter is improperly accounted for. The attribution of fixed but relative values
to themes and conventions with the aid of masters in composition (for both the ICP and
later supplemented in Chess Composer) is a step closer toward complete automation of
the process but nonetheless fails to account for aesthetic variety within each theme and
convention. Even though some conventions are described using simple formulas, e.g.
bonus for X number of pieces on the board = 3 × (18-X), the constants used are not
explained and therefore presumably have little basis in chess literature.
Given the brute-force searching required in both of these models, complexity with
regard to aesthetics was perhaps rightfully avoided. The research presented in this
38
thesis, however, deals exclusively with aesthetics and a model which should enable
computers to recognize it in the game like humans do. Since brute-force searching for
larger purposes (e.g. automatic composition) is beyond the scope of this thesis,
formalization of the available knowledge we have on chess aesthetics need not be
compromised. This means that the variety of configurations possible within the
established aesthetic principles and themes can be better accounted for.
2.8 A Look at Methodologies Used in Other Domains
Even though the methodologies used in other domains are not quite applicable to zero-
sum perfect information games (the domains are of different natures), this section
presents a brief discussion of a select few for a general context. One of the earliest
attempts to formalize aesthetics is the mathematician Birkhoff’s model of, M = O/C
where M = aesthetic value, O = order and C = complexity (Birkhoff, 1933; Scha and
Bod, 1993). ‘Order’ was identified with factors like symmetry and repetition, and
‘complexity’ with the amount of effort required to attend to a pattern and assimilate it.
These enabled similarities and relations between elements to be discerned using
numerical values. Even though Birkhoff specified procedures for attributing such values
to certain things such as polygons, vase outlines, melodies and lines of verse, his model
was not successful mainly due to oversimplification. Maximum aesthetic satisfaction
was simply not obtained using the most order and least complexity in patterns, as his
model suggested. Experimental results proved this (Berlyne, 1972).
Later attempts have limited such models to just one domain and identified the measures
used to factors strictly within that domain. Machado and Cardoso (1998) for example,
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan
phd_thesis_azlan

More Related Content

Viewers also liked

FuGenX Corporate Presentation
FuGenX Corporate PresentationFuGenX Corporate Presentation
FuGenX Corporate Presentation
Ashutosh R
 
FuGenX-App-Portfolio-updated
FuGenX-App-Portfolio-updatedFuGenX-App-Portfolio-updated
FuGenX-App-Portfolio-updated
Ashutosh R
 
Pp slide set 5 whole work teams and human scale
Pp slide set 5   whole work teams and human scalePp slide set 5   whole work teams and human scale
Pp slide set 5 whole work teams and human scale
Tricordant
 
2010 Perubahan penyertaan modal penetapan provinsi
2010 Perubahan penyertaan modal penetapan provinsi2010 Perubahan penyertaan modal penetapan provinsi
2010 Perubahan penyertaan modal penetapan provinsiPA_Klaten
 
2011 Pajak daerah final setuju menkeu+prov
2011 Pajak daerah final setuju menkeu+prov2011 Pajak daerah final setuju menkeu+prov
2011 Pajak daerah final setuju menkeu+provPA_Klaten
 
Pp slide set 10 tricordant change management
Pp slide set 10   tricordant change managementPp slide set 10   tricordant change management
Pp slide set 10 tricordant change management
Tricordant
 
가천대학교 학생들을 위한 서비스 기획서
가천대학교 학생들을 위한 서비스 기획서가천대학교 학생들을 위한 서비스 기획서
가천대학교 학생들을 위한 서비스 기획서
Inhyeok Song
 

Viewers also liked (7)

FuGenX Corporate Presentation
FuGenX Corporate PresentationFuGenX Corporate Presentation
FuGenX Corporate Presentation
 
FuGenX-App-Portfolio-updated
FuGenX-App-Portfolio-updatedFuGenX-App-Portfolio-updated
FuGenX-App-Portfolio-updated
 
Pp slide set 5 whole work teams and human scale
Pp slide set 5   whole work teams and human scalePp slide set 5   whole work teams and human scale
Pp slide set 5 whole work teams and human scale
 
2010 Perubahan penyertaan modal penetapan provinsi
2010 Perubahan penyertaan modal penetapan provinsi2010 Perubahan penyertaan modal penetapan provinsi
2010 Perubahan penyertaan modal penetapan provinsi
 
2011 Pajak daerah final setuju menkeu+prov
2011 Pajak daerah final setuju menkeu+prov2011 Pajak daerah final setuju menkeu+prov
2011 Pajak daerah final setuju menkeu+prov
 
Pp slide set 10 tricordant change management
Pp slide set 10   tricordant change managementPp slide set 10   tricordant change management
Pp slide set 10 tricordant change management
 
가천대학교 학생들을 위한 서비스 기획서
가천대학교 학생들을 위한 서비스 기획서가천대학교 학생들을 위한 서비스 기획서
가천대학교 학생들을 위한 서비스 기획서
 

Similar to phd_thesis_azlan

Final Thesis
Final ThesisFinal Thesis
Final Thesis
Dr Rupesh Shet
 
Final Thesis
Final ThesisFinal Thesis
Final Thesis
Dr Rupesh Shet
 
AUTOMATIC ANALYSIS OF DOCUMENT SENTIMENT
AUTOMATIC ANALYSIS OF DOCUMENT SENTIMENTAUTOMATIC ANALYSIS OF DOCUMENT SENTIMENT
AUTOMATIC ANALYSIS OF DOCUMENT SENTIMENT
Stephen Faucher
 
A DISSERTATION SUBMITTED IN PARTIAL FULFILLMENT OF THE REQUIREMENTS FOR THE D...
A DISSERTATION SUBMITTED IN PARTIAL FULFILLMENT OF THE REQUIREMENTS FOR THE D...A DISSERTATION SUBMITTED IN PARTIAL FULFILLMENT OF THE REQUIREMENTS FOR THE D...
A DISSERTATION SUBMITTED IN PARTIAL FULFILLMENT OF THE REQUIREMENTS FOR THE D...
Jim Jimenez
 
dissertation
dissertationdissertation
How To Do A Compare And Contrast Essay. How T
How To Do A Compare And Contrast Essay. How THow To Do A Compare And Contrast Essay. How T
How To Do A Compare And Contrast Essay. How T
Alyssa Jefferson
 
Designing for people, effective innovation and sustainability
Designing for people, effective innovation and sustainabilityDesigning for people, effective innovation and sustainability
Designing for people, effective innovation and sustainability
Musstanser Tinauli
 
Video Games, Virtual Environments & Education
Video Games, Virtual Environments & EducationVideo Games, Virtual Environments & Education
Video Games, Virtual Environments & Education
Joanna Robinson
 
Quiana Bradshaw Final Dissertation
Quiana Bradshaw Final DissertationQuiana Bradshaw Final Dissertation
Quiana Bradshaw Final Dissertation
Campbellsville University
 
Financial modelling with forward looking information.pdf
Financial modelling with forward looking information.pdfFinancial modelling with forward looking information.pdf
Financial modelling with forward looking information.pdf
FinanzasEmpresariale
 
Expository Essay Writing Prompts For High School
Expository Essay Writing Prompts For High SchoolExpository Essay Writing Prompts For High School
Expository Essay Writing Prompts For High School
Julie Jones
 
470
470470
Spontaneous Communities Of Learning 0
Spontaneous Communities Of Learning 0Spontaneous Communities Of Learning 0
Spontaneous Communities Of Learning 0
Lisa L Galarneau
 
Technology for liberal education: the state of the art
Technology for liberal education: the state of the artTechnology for liberal education: the state of the art
Technology for liberal education: the state of the art
Bryan Alexander
 
Luận Văn The Impact Of Social Network To Student’s Choice An Education Consul...
Luận Văn The Impact Of Social Network To Student’s Choice An Education Consul...Luận Văn The Impact Of Social Network To Student’s Choice An Education Consul...
Luận Văn The Impact Of Social Network To Student’s Choice An Education Consul...
Nhận Viết Đề Tài Thuê trangluanvan.com
 
Tesi
TesiTesi
An Introduction to Mathematical Cryptography-Springer-.pdf
An Introduction to Mathematical Cryptography-Springer-.pdfAn Introduction to Mathematical Cryptography-Springer-.pdf
An Introduction to Mathematical Cryptography-Springer-.pdf
TomasevicBojana
 
Final Joined
Final JoinedFinal Joined
Final Joined
Aung Linn
 
Embossed Letter Sheets Set Of 50 Stationery Shee
Embossed Letter Sheets Set Of 50 Stationery SheeEmbossed Letter Sheets Set Of 50 Stationery Shee
Embossed Letter Sheets Set Of 50 Stationery Shee
Cynthia Velynne
 
Application of ICT for Effective performance in Teachin and Learning
Application of ICT for Effective performance in Teachin and LearningApplication of ICT for Effective performance in Teachin and Learning
Application of ICT for Effective performance in Teachin and Learning
shehu ringim
 

Similar to phd_thesis_azlan (20)

Final Thesis
Final ThesisFinal Thesis
Final Thesis
 
Final Thesis
Final ThesisFinal Thesis
Final Thesis
 
AUTOMATIC ANALYSIS OF DOCUMENT SENTIMENT
AUTOMATIC ANALYSIS OF DOCUMENT SENTIMENTAUTOMATIC ANALYSIS OF DOCUMENT SENTIMENT
AUTOMATIC ANALYSIS OF DOCUMENT SENTIMENT
 
A DISSERTATION SUBMITTED IN PARTIAL FULFILLMENT OF THE REQUIREMENTS FOR THE D...
A DISSERTATION SUBMITTED IN PARTIAL FULFILLMENT OF THE REQUIREMENTS FOR THE D...A DISSERTATION SUBMITTED IN PARTIAL FULFILLMENT OF THE REQUIREMENTS FOR THE D...
A DISSERTATION SUBMITTED IN PARTIAL FULFILLMENT OF THE REQUIREMENTS FOR THE D...
 
dissertation
dissertationdissertation
dissertation
 
How To Do A Compare And Contrast Essay. How T
How To Do A Compare And Contrast Essay. How THow To Do A Compare And Contrast Essay. How T
How To Do A Compare And Contrast Essay. How T
 
Designing for people, effective innovation and sustainability
Designing for people, effective innovation and sustainabilityDesigning for people, effective innovation and sustainability
Designing for people, effective innovation and sustainability
 
Video Games, Virtual Environments & Education
Video Games, Virtual Environments & EducationVideo Games, Virtual Environments & Education
Video Games, Virtual Environments & Education
 
Quiana Bradshaw Final Dissertation
Quiana Bradshaw Final DissertationQuiana Bradshaw Final Dissertation
Quiana Bradshaw Final Dissertation
 
Financial modelling with forward looking information.pdf
Financial modelling with forward looking information.pdfFinancial modelling with forward looking information.pdf
Financial modelling with forward looking information.pdf
 
Expository Essay Writing Prompts For High School
Expository Essay Writing Prompts For High SchoolExpository Essay Writing Prompts For High School
Expository Essay Writing Prompts For High School
 
470
470470
470
 
Spontaneous Communities Of Learning 0
Spontaneous Communities Of Learning 0Spontaneous Communities Of Learning 0
Spontaneous Communities Of Learning 0
 
Technology for liberal education: the state of the art
Technology for liberal education: the state of the artTechnology for liberal education: the state of the art
Technology for liberal education: the state of the art
 
Luận Văn The Impact Of Social Network To Student’s Choice An Education Consul...
Luận Văn The Impact Of Social Network To Student’s Choice An Education Consul...Luận Văn The Impact Of Social Network To Student’s Choice An Education Consul...
Luận Văn The Impact Of Social Network To Student’s Choice An Education Consul...
 
Tesi
TesiTesi
Tesi
 
An Introduction to Mathematical Cryptography-Springer-.pdf
An Introduction to Mathematical Cryptography-Springer-.pdfAn Introduction to Mathematical Cryptography-Springer-.pdf
An Introduction to Mathematical Cryptography-Springer-.pdf
 
Final Joined
Final JoinedFinal Joined
Final Joined
 
Embossed Letter Sheets Set Of 50 Stationery Shee
Embossed Letter Sheets Set Of 50 Stationery SheeEmbossed Letter Sheets Set Of 50 Stationery Shee
Embossed Letter Sheets Set Of 50 Stationery Shee
 
Application of ICT for Effective performance in Teachin and Learning
Application of ICT for Effective performance in Teachin and LearningApplication of ICT for Effective performance in Teachin and Learning
Application of ICT for Effective performance in Teachin and Learning
 

phd_thesis_azlan

  • 1. A DISCRETE COMPUTATIONAL AESTHETICS MODEL FOR A ZERO-SUM PERFECT INFORMATION GAME MOHAMMED AZLAN BIN MOHAMED IQBAL THESIS SUBMITTED IN FULFILMENT OF THE REQUIREMENTS FOR THE DEGREE OF DOCTOR OF PHILOSOPHY FACULTY OF COMPUTER SCIENCE & INFORMATION TECHNOLOGY UNIVERSITY OF MALAYA KUALA LUMPUR SEPTEMBER 2008
  • 2. ii ABSTRACT One of the best examples of a zero-sum perfect information game is chess. Aesthetics is an important part of it that is greatly appreciated by players. Computers are currently able to play chess at the grandmaster level thanks to efficient search techniques and sheer processing power. However, they are not able to tell a beautiful combination from a bland one. This has left a research gap that, if addressed, would be of benefit to humans, especially chess players. The problem is therefore the inability of computers to recognize aesthetics in the game. Existing models or computational approaches towards aesthetics in chess tend to conflate beauty with composition convention without taking into account the significance of the former in real games. These approaches also typically use fixed values for aesthetic criteria that are rather inadequate given the variety of possibilities on the board. The goal was therefore to develop a computational model for recognizing aesthetics in the game in a way that correlates positively with human assessment. This research began by identifying aesthetics as an independent component applicable to both domains (i.e. compositions and real games). A common ground of aesthetic principles was identified based on the relevant chess literature. The available knowledge on those principles was then formalized as a collection of evaluation functions for computational purposes based on established chess metrics. Several experiments comparing compositions and real games showed that the proposed model was able to identify differences of statistical significance between domains but not within them. Overall, compositions also scored higher than real games. Based on the
  • 3. iii scope of analysis (i.e. mate-in-3 combinations), any such differences are therefore most likely aesthetic in nature and suggest that the model can recognize beauty in the game. Further experimentation showed a positive correlation between the computational evaluations and those of human chess players. This suggests that the proposed model not only enables computers to recognize aesthetics in the game but also in a way that generally concurs with human assessment.
  • 4. iv ACKNOWLEDGEMENTS I would like to express my appreciation to my supervisor, Prof. Dato’ Ir. Dr. Mashkuri Hj. Yaacob, who had the foresight to accept me as his doctoral student. I have benefited from his experience, advice and the intellectual freedom he afforded to me during the research period. I would also like to thank John McCarthy (Stanford University, USA) for essentially suggesting to me what I think is possibly the best approach to this research topic; Michael Negnevitsky (University of Tasmania, Australia) for the meaningful discussions we had about my research; Jonathan Levitt (Grandmaster of chess, UK) for continuously and tirelessly accommodating my questions; David Friedgood (FIDE Master and International Master of chess solving, UK) for his feedback and willingness to share his connections to resourceful people; Peter Lamarque (University of York, UK) who motivated me to improve my writing; and Malcolm McDowell (British Chess Problem Society) for supplying me with several rare manuscripts on the royal game. I also want to thank Brian Stephenson (UK) for his collection of chess compositions which has become integral to this work; Daniel Freeman (Chessgames.com, Florida, USA) for his support and commitment with regard to my online surveys; and the ICGA Journal editorial board and reviewers, for their detailed and fruitful comments over the years on various aspects of my research. I was simultaneously impressed and humbled by their expertise. Other people to whom I would like to express my gratitude for their comments and feedback include Hans Gruber (Germany), Isaac Linder (who wrote back in pen and ink
  • 5. v from Russia), Michael Schlosser (University of Vienna, Austria), John Troyer (University of Connecticut, USA), Matej Guid (FIDE Master, University of Ljubljana, Slovenia), Muhidin Mulalic (International University of Sarajevo, Bosnia and Herzegovina), A. C. Sukla (Sambalpur University, India) and the many unnamed computer programmers, mathematicians and statisticians I have consulted with (and learned from) over the Internet. Special thanks to my colleagues, Uwe Dippel and Manjit Singh. The former for being my (unofficial) academic mentor for several years and for his translation services (German/French to English), and the latter for having shared with me many of his experiences as a doctoral student. I would also like to thank the University of Malaya staff (especially in the main library) for providing impeccable assistance and academic resources. Even though they may never hear of it, my appreciation also goes to AT&T Inc. for their ‘Natural Voices™’ technology, which enabled a computer to read this entire thesis back to me in an almost human voice when it would have perhaps been too much to ask of any human. Very special thanks to Jaap van den Herik in the Netherlands for proofreading the final draft of this thesis, and for his insightful comments. I wish you all the best, sir, on your move from Universiteit Maastricht to Tilburg University, and sincerely appreciate the time and effort you have spent on my behalf. Finally, I would like to thank my family for their support and encouragement. This research is supported by the University Tenaga Nasional research grant J510050123.
  • 6. vi For Gamers of the Future
  • 7. vii CONTENTS ABSTRACT.....................................................................................................................ii ACKNOWLEDGEMENTS...........................................................................................iv LIST of FIGURES .........................................................................................................xi LIST of TABLES .........................................................................................................xiii ABBREVIATIONS ......................................................................................................xiv CHAPTER 1: INTRODUCTION..................................................................................1 1.0 Preliminary......................................................................................................1 1.1 Motivation........................................................................................................3 1.2 Thesis Objectives.............................................................................................5 1.3 Thesis Scope.....................................................................................................6 1.4 Main Contributions of this Work..................................................................8 1.5 Thesis Organization ........................................................................................9 1.6 Summary of Research Questions.................................................................11 CHAPTER 2: LITERATURE REVIEW....................................................................13 2.0 Computational Research into Chess Aesthetics .........................................13 2.1 Emanuel Lasker and Aesthetics...................................................................15 2.2 Automatic Judging of Compositions ...........................................................17 2.3 Principles of Beauty ......................................................................................21 2.4 Computer Chess Problem Composition......................................................24 2.5 Elements of Beauty Classified......................................................................27 2.6 Beauty Heuristics in a Game Engine...........................................................30 2.7 Computational Improvement of Chess Problems......................................33 2.8 A Look at Methodologies Used in Other Domains.....................................38 2.9 Chapter Summary.........................................................................................42 CHAPTER 3: METHODOLOGY – Aesthetics in the Game ...................................45 3.0 Components of the Research........................................................................45 3.1 The Proposed Model of Aesthetics...............................................................45 3.2 A Conceptual Framework for Aesthetics in the Game..............................46 3.3 An Examination of Aesthetics......................................................................49 3.3.1 Composition Conventions...........................................................................50 3.3.2 Brilliancy in Real Games ............................................................................52 3.3.3 Principles of Aesthetics...............................................................................54 3.4 A Selection of Aesthetic Principles and Themes.........................................58 3.5 A Formula for Cumulative Aesthetic Assessment .....................................61 3.5.1 The Development of Standard Evaluation Functions .................................62 3.5.2 Metrics and Properties Used in the Aesthetic Assessment .........................67 3.5.2(a) Piece Value and Piece Count ..........................................................69 3.5.2(b) Distance, Piece Power, Mobility and Piece Field ...........................71 3.5.2(c) Summary of Metrics and Properties................................................73 3.5.3 A Note on Benchmarks...............................................................................74 3.6 A General Methodology for Developing Aesthetics Formalizations ........74 3.7 The Scope of Analysis Explained.................................................................78 3.8 Points of Evaluation (POE) ..........................................................................80 3.8.1 The Moving Piece .......................................................................................81 3.9 Chapter Summary.........................................................................................82
  • 8. viii CHAPTER 4: METHODOLOGY – Aesthetic Principle Formalizations................83 4.0 Formalizing the Seven Aesthetic Principles................................................83 4.1 Violate Heuristics Successfully ....................................................................85 4.1.1 Keep Your King Safe..................................................................................86 4.1.2 Capture Enemy Material .............................................................................87 4.1.3 Do Not Leave Your Own Pieces ‘En prise’................................................89 4.1.4 Increase Mobility of Your Pieces................................................................90 4.2 Use the Weakest Piece Possible....................................................................91 4.3 Use All of the Piece’s Power.........................................................................92 4.4 Win with less Material..................................................................................93 4.5 Checkmate Economically .............................................................................94 4.5.1 Explanation of the Concept.........................................................................95 4.5.2 Features of Economy...................................................................................96 4.5.3 The Economy Evaluation Function.............................................................97 4.5.4 The Process of Evaluation.........................................................................100 4.5.5 Validation..................................................................................................102 4.5.5(a) Compositions vs. Tournament Games ..........................................102 4.5.5(b) Compositions vs. Tournament Games (Improved).......................104 4.5.5(c) Testing against Human Assessment..............................................105 4.5.6 Minor Economical Differences.................................................................106 4.5.7 Paradoxical Economy................................................................................108 4.5.8 Perfect Economy.......................................................................................109 4.6 Sacrifice Material........................................................................................110 4.7 Spread Out the Pieces (Sparsity) ...............................................................112 4.7.1 Explanation of the Concept.......................................................................112 4.7.2 A Look at Possible Approaches ................................................................115 4.7.3 The Sparsity Evaluation Function.............................................................116 4.7.4 Validation..................................................................................................119 4.7.4(a) Sparsity and Piece Count ..............................................................120 4.7.4(b) Sparsity and Piece Count (Alternative Method) ...........................121 4.7.4(c) Sparsity and Piece Configuration..................................................122 4.7.5 Discussion .................................................................................................124 4.8 Points of Evaluation for the Aesthetic Principles.....................................125 4.9 Chapter Summary.......................................................................................125 CHAPTER 5: METHODOLOGY – Theme Formalizations ..................................127 5.0 Formalizing the Ten Themes .....................................................................127 5.1 Fork ..............................................................................................................128 5.2 Pin.................................................................................................................132 5.3 Skewer..........................................................................................................137 5.4 X-Ray............................................................................................................139 5.5 Discovered/Double Attack..........................................................................142 5.6 Zugzwang.....................................................................................................146 5.7 Smothered Mate ..........................................................................................149 5.8 Cross-check..................................................................................................150 5.9 Promotion ....................................................................................................152 5.10 Switchback...................................................................................................154 5.11 Points of Evaluation for the Themes .........................................................155 5.12 Chapter Summary.......................................................................................156
  • 9. ix CHAPTER 6: EXPERIMENTAL RESULTS and DISCUSSIONS.......................158 6.0 The Six Experiments Performed ...............................................................158 6.1 Experiment 1: Frequencies.........................................................................160 6.1.1 Frequencies of the Themes........................................................................161 6.1.2 Frequencies of the Aesthetic Principles....................................................163 6.1.3 Discussion .................................................................................................164 6.2 Experiment 2: Evaluation of the Aesthetic Principles.............................165 6.3 Experiment 3: Evaluation of the Themes .................................................167 6.4 Experiment 4: Cumulative Evaluation .....................................................173 6.4.1 Aesthetic Principles Only..........................................................................178 6.4.2 Themes Only.............................................................................................180 6.4.3 Discussion .................................................................................................182 6.5 Experiment 5: Conformity to Authoritative Human Assessment ..........183 6.6 Experiment 6: Correlation with Human Assessment ..............................186 6.6.1 Survey 1 (Mixed) ......................................................................................190 6.6.2 Survey 2 (Mixed, Discrete Evaluations)...................................................192 6.6.2(a) Levels of Agreement.....................................................................194 6.6.3 Survey 3 (Tournament Games).................................................................195 6.6.4 Survey 4 (Compositions) ..........................................................................197 6.6.5 Survey Conclusions...................................................................................198 6.7 Chapter Summary.......................................................................................202 CHAPTER 7: CONCLUSION...................................................................................205 7.0 Preliminary..................................................................................................205 7.1 Thesis Summary..........................................................................................205 7.2 Thesis Contributions...................................................................................208 7.3 Implications of the Research......................................................................209 7.4 Directions for Further Work......................................................................212 REFERENCES............................................................................................................217 APPENDIX A: CHESS RULES ................................................................................233 1.0 Introduction to the Game...........................................................................233 1.1 Movement of the Pieces ..............................................................................234 1.1.1 Rook..........................................................................................................235 1.1.2 Bishop .......................................................................................................235 1.1.3 Queen ........................................................................................................236 1.1.4 Knight........................................................................................................236 1.1.5 King...........................................................................................................237 1.1.5(a) Castling .........................................................................................237 1.1.6 Pawn..........................................................................................................239 1.2 Check, Checkmate and Stalemate .............................................................240 1.3 Other Rules..................................................................................................242 1.3.1 Resignation and Draws .............................................................................242 1.3.2 Repetition of Positions..............................................................................243 1.3.3 50-Move Rule ...........................................................................................243 1.3.4 Touching Pieces ........................................................................................244 1.4 Chess Notation.............................................................................................244 1.4.1 Board Notation..........................................................................................246 APPENDIX B: GLOSSARY of CHESS TERMS ....................................................248
  • 10. x APPENDIX C: EXAMPLE POSITIONS.................................................................253 Subsection 3.3.1 .......................................................................................................253 Subsection 3.3.3 .......................................................................................................254 Subsection 3.5.1 .......................................................................................................255 Section 4.2 ................................................................................................................256 Subsection 4.5.4 .......................................................................................................257 Section 5.1 ................................................................................................................257 Section 5.2 ................................................................................................................259 Section 5.4 ................................................................................................................260 Section 5.5 ................................................................................................................261 D (Refer Appendix).................................................................................................263 APPENDIX D: CHESTHETICA ..............................................................................264 APPENDIX E: PSEUDOCODE ................................................................................271 Subsection 4.1.2 .......................................................................................................271 Subsection 4.1.3 .......................................................................................................272 Section 4.3 ................................................................................................................272 Section 4.5 ................................................................................................................273 Section 4.7 ................................................................................................................274 Section 5.1 ................................................................................................................274 Section 5.2 ................................................................................................................276 Section 5.4 ................................................................................................................278 Section 5.5 ................................................................................................................279 Section 5.6 ................................................................................................................281 APPENDIX F: SURVEY DATA ...............................................................................282 1.0 Overview of the Surveys.............................................................................282 1.1 Instruction Set (Surveys 1, 3 and 4)...........................................................283 1.1.1 Instruction Set (Survey 2) .........................................................................285 1.2 The Combinations Rated............................................................................288 1.3 The Combinations Rated (PGN Compatible)...........................................300 1.4 Control Questions .......................................................................................305 1.4.1 Survey 1 ....................................................................................................307 1.4.2 Survey 2 ....................................................................................................308 1.4.3 Survey 3 ....................................................................................................309 1.4.4 Survey 4 ....................................................................................................310 1.5 Respondent Ratings ....................................................................................311 1.6 Screen Captures ..........................................................................................319 SELECTED PUBLICATIONS..................................................................................321
  • 11. xi LIST of FIGURES Figure 3.1 Concept of Aesthetics in Chess...............................................................48 Figure 3.2 Layers of an Aesthetic Evaluation Function...........................................67 Figure 4.1 Scores for Violation of ‘Keep Your King Safe’ .....................................86 Figure 4.2 Maximum ‘Control Fields’ for the Chessmen ........................................98 Figure 4.3 Economy Scores of Checkmate Positions.............................................102 Figure 4.4 Economy Scores for Compositions and Tournament Games ...............103 Figure 4.5 Economy Scores for ‘Improved’ Positions ...........................................105 Figure 4.6 Minor Economic Improvements to a Position ......................................107 Figure 4.7 Economy Paradox .................................................................................108 Figure 4.8 Highly Economical Checkmates...........................................................110 Figure 4.9 Sparsity in Chess Compositions............................................................113 Figure 4.10 Sufficient Sparsity (Constructed Positions) ..........................................114 Figure 4.11 Sparsity Scores of Chess Positions from Tournament Games..............118 Figure 4.12 Sparsity Scores of Go Positions............................................................119 Figure 4.13 Sparsity Values of 1,000 Random Game Positions ..............................120 Figure 4.14 Sparsity Values of 1,000 Random Game Positions (Alternate)............122 Figure 5.1 The Fork................................................................................................129 Figure 5.2 The Pin ..................................................................................................133 Figure 5.3 Aesthetic Assessment of the Pin ...........................................................136 Figure 5.4 The Skewer............................................................................................137 Figure 5.5 Aesthetic Assessment of the Skewer.....................................................138 Figure 5.6 The X-ray..............................................................................................139 Figure 5.7 Aesthetic Assessment of the X-Ray......................................................142 Figure 5.8 The Discovered/Double Attack.............................................................143 Figure 5.9 Aesthetic Assessment of the Discovered Attack...................................144 Figure 5.10 The Zugzwang.......................................................................................148 Figure 5.11 The Smothered Mate.............................................................................149 Figure 5.12 Aesthetic Assessment of the Cross-check.............................................151 Figure 5.13 The Saavedra Position...........................................................................153 Figure 6.1 Frequencies of Themes in the Combinations........................................161 Figure 6.2 Frequencies of Aesthetic Principles in the Combinations.....................163 Figure 6.3 Cumulative Aesthetic Scores for Combinations ...................................174 Figure 6.4 Highest Scoring Combinations (a) COMP, (b) TG...............................175 Figure 6.5 Lowest Scoring Combinations (a) COMP, (b) TG ...............................177 Figure 6.6 Cumulative Scores Based on Aesthetic Principles Only ......................179 Figure 6.7 Cumulative Scores Based on Themes Only..........................................181 Figure A.1 The Initial Position of the Pieces ..........................................................234 Figure A.2 Movement of the Rook..........................................................................235 Figure A.3 Movement of the Bishop.......................................................................235 Figure A.4 Movement of the Queen........................................................................236 Figure A.5 Movement of the Knight.......................................................................236 Figure A.6 Movement of the King ..........................................................................237 Figure A.7 Before and after Castling ......................................................................238 Figure A.8 Castling Illegal for Both White and Black............................................238
  • 12. xii Figure A.9 Movement of the Pawn .........................................................................239 Figure A.10 En passant .............................................................................................240 Figure A.11 Check.....................................................................................................241 Figure A.12 Checkmate and Stalemate .....................................................................242 Figure A.13 The Chessboard and its Coordinates.....................................................244 Figure C.1 A Typical ‘Logical’ School Composition.............................................253 Figure C.2 J. Mintz, The Problemist, 1982, Helpmate in 3 (Black to Play) ...........254 Figure C.3 The ‘Immortal Game’ (after 17. … Qxb2)............................................254 Figure C.4 Kasparov vs. Deep Junior, Game 5, New York, 2003..........................255 Figure C.5 Deep Blue vs. Kasparov, Game 6, New York, 1997.............................255 Figure C.6 Two-way Discovered Checkmate .........................................................256 Figure C.7 Two-Phase Piece Removal (Economy).................................................257 Figure C.8 Activated Fork.......................................................................................257 Figure C.9 Repeated Fork .......................................................................................258 Figure C.10 Immobilizing the Queen with a Two-way Pin......................................259 Figure C.11 A Three-way Pin (Bxd5).......................................................................259 Figure C.12 Negative Evaluation for the Pin after 1. Qg2........................................260 Figure C.13 A Double X-ray with 1. Bxd4...............................................................260 Figure C.14 Castling as a Discovered Attack Manoeuvre (0-0#) .............................261 Figure C.15 Double-Discovered Attack (after 1. Ndf4+) .........................................261 Figure C.16 Stalemate in 3........................................................................................263 Figure D.1 The Main Interface to CHESTHETICA ...............................................265 Figure D.2 The ‘About Box’ ...................................................................................266 Figure D.3 The Aesthetics Evaluation Panel...........................................................267 Figure D.4 The Thematic Frequency Chart.............................................................268 Figure D.5 Aesthetic Principle and Theme Selection .............................................268 Figure D.6 The Mate Solver....................................................................................269 Figure F.1 Survey 1: Control Question 1................................................................307 Figure F.2 Survey 1: Control Question 2................................................................307 Figure F.3 Survey 2: Control Question 1................................................................308 Figure F.4 Survey 2: Control Question 2................................................................308 Figure F.5 Survey 3: Control Question 1................................................................309 Figure F.6 Survey 3: Control Question 2................................................................309 Figure F.7 Survey 4: Control Question 1................................................................310 Figure F.8 Survey 4: Control Question 2................................................................310 Figure F.9 Survey 3: Screen Capture 1...................................................................320 Figure F.10 Survey 3: Screen Capture 2...................................................................320
  • 13. xiii LIST of TABLES Table 3.1 General Aesthetic Principles, Conventions and Brilliancy Compared....55 Table 3.2 Refined Aesthetic Principles and Themes...............................................60 Table 3.3 Metrics and Properties Used....................................................................73 Table 3.4 Points of Evaluation in a Combination....................................................80 Table 4.1 Points of Evaluation for the Aesthetic Principles..................................125 Table 5.1 X-ray Defensive Capabilities ................................................................141 Table 5.2 Points of Evaluation for the Themes .....................................................156 Table 6.1 Average Scores for Aesthetic Principles ...............................................165 Table 6.2 Standard Deviations of Average Aesthetic Principle Scores ................166 Table 6.3 Significance of Diff. between Mean Aesthetic Principle Scores ..........167 Table 6.4 Average Scores for the Themes.............................................................168 Table 6.5 Standard Deviations of Average Scores for Themes.............................169 Table 6.6 Significance of Mean Differences of Theme Scores.............................170 Table 6.7 Average Cumulative Aesthetic Scores for the Combinations...............173 Table 6.8 Average Cumulative Aesthetic Scores for Aesthetic Principles Only ..178 Table 6.9 Average Cumulative Aesthetic Scores for Themes Only......................180 Table 6.10 Human vs. Computer Assessment (COMP+TG Combinations) ..........190 Table 6.11 Human Assessment vs. Computer (Discrete Evaluations)....................193 Table 6.12 Level of Human Agreement with Computer Assessment.....................194 Table 6.13 Human vs. Computer Assessment (TG Only).......................................196 Table 6.14 Human vs. Computer Assessment (COMP Only).................................198 Table 6.15 Summary of Human-Computer Assessment Correlations....................199 Table 6.16 Summary of Positive Correlations ........................................................201 Table A.1 The Chessmen .......................................................................................233 Table A.2 Shorthand Notation................................................................................246
  • 14. xiv ABBREVIATIONS 1T One-tailed 2T Two-tailed AI Artificial Intelligence APP Use all of the Piece’s Power COMP Chess Composition Combinations DDA Discovered/Double Attack FIDE Fédération Internationale des Échecs FEN Forsyth-Edwards Notation FM FIDE Master GM Grandmaster ICP Improver of Chess Problems, The IM International Master LOA Level of (Human) Agreement LOD Level of (Computational) Distinction (between Scores) PGN Portable Game Notation SD Standard Deviation SL Significance Level (of) TG Tournament Game Combinations TTUV Two-sample t-test assuming Unequal Variances VH Violate Heuristics (Successfully) WPP Use the Weakest Piece Possible WWLM Win with Less Material
  • 15. 1 CHAPTER 1: INTRODUCTION 1.0 Preliminary Research into games is important, especially in the field of AI. The following paragraph articulates the main reasons quite well. “There are two principal reasons to continue to do research on games. . . First, human fascination with game playing is longstanding and pervasive. Anthropologists have catalogued popular games in almost every culture. . . Games intrigue us because they address important cognitive functions. . . The second reason to continue game-playing research is that some difficult games remain to be won, games that people play very well but computers do not. These games clarify what our current approach lacks. They set challenges for us to meet, and they promise ample rewards.” (Epstein, 1999) A zero-sum perfect information game (sometimes with a hyphen between ‘perfect’ and ‘information’) is one in which a player gains at the equal expense of others and where every player knows the results of all the previous moves. Examples include noughts and crosses, checkers, chess and Go (in scientific literature, there is some common agreement that the game be referred to using a capital letter to differentiate it from the English verb ‘go’). These are games where it is theoretically possible to build a computational move ‘tree’ of all the positions that could occur and thus facilitate perfect play. However, for games such as Go and chess the number of possible positions to examine is too large even for computers. It is estimated that there are approximately 1046 legal positions in chess and around 10170 in Go (Chinchalkar, 1996; Tromp and
  • 16. 2 Farnebäck, 2006). Even so, good evaluation functions and efficient search techniques allow computers to play such games, with the current and notable exception of Go, quite well (Levy and Newborn, 1992; Campbell et al., 2002; Walczak, 2003; Hauptman and Sipper, 2007; Hsu, 2007). One of the most popular research domains in this respect is chess. The beginnings of chess are obscure but it is thought to have originated in northern India around 600 AD and spread mainly through traders to other parts of the world (Eales, 2002; Shenk, 2006). The most widely played version today is Western or international chess and is regulated by the Fédération Internationale des Échecs (FIDE) or World Chess Federation. The rules of international chess have remained essentially the same since 1475 (Hooper and Whyld, 1996). Ever since Claude Shannon (1950) wrote his seminal paper on how a computer could be programmed to play chess; researchers, programmers and especially the public have been fascinated at the prospect of computers playing the game at the same level of human experts or better (Grier, 2006). The approach suggested is often also credited to Alan Turing (1953). The hope was that whatever methods achieved this might shed some light onto the mechanics of human thought processes because one must be thinking in order to play the game (Newborn, 1997). Computer chess programs today play at the grandmaster (GM) level and have even beaten the world champion by relying mainly on brute-force (i.e. exhaustive or nearly exhaustive searching of relevant parts of the game tree) which is different from how humans play (Hsu, 2004). Even though this is not exactly what AI researchers were hoping for (Hendler, 2006), research into the game has provided benefits and insights into other areas (see section 2.0).
  • 17. 3 However, there is an important aspect of chess that computers are quite poor at. This is aesthetics and it is one of the main reasons humans play (Kasparov, 1987; Damsky, 2002; Dossi, 2005). Computers cannot tell a beautiful move combination or game from a regular or unattractive one the way humans can. Chess was chosen as a suitable domain of research because its aesthetic aspect (especially prominent in chess compositions) is well established in the literature, more so than Go or any other zero- sum perfect information game. Real games (e.g. in tournaments) are also known to exhibit aesthetics, and ‘brilliancy’ prizes are sometimes awarded to such games. With chess programs playing on a level equal to - and in some cases greater than - the best human players, the time seems ripe for focusing on the aesthetics of the game. Since humans strive for, and appreciate beauty in chess, it would be valuable if computers could recognize it in a way that is comparable to humans given that machines are able to analyze many more positions in the game tree than humans. 1.1 Motivation A zero-sum perfect information game is a good place where complex ideas can be experimented with because in theory, such games are finite and particularly amenable to computation. This is the reason chess has for many decades been the subject of much research in various fields (see section 2.0). However, the main focus has always been on how to make computers play the game on a level equal to, or exceeding that of the best human players. This has, since the late 1990s, been demonstrated (see subsection 3.5.1). Even commercially available computer programs today play at the grandmaster level. Researchers have therefore, in this respect, now generally shifted to more complex
  • 18. 4 games like Go (Wu and Baldi, 2007). The following six reasons served as motivation for this research. • Aesthetics in chess has received little attention in AI despite it being an important part of the game that matters to players. Humans, unlike computers, do not play solely to win. They also want their games and compositions to be beautiful and fascinating. A computational model for aesthetics in the game would therefore benefit humans and enhance the capabilities of existing chess programs. • Research into automatic chess problem composition has not accounted for aesthetics in a meaningful way or perhaps at all (see sections 2.2 and 2.4). It neither separates aesthetics from composition convention (see Appendix B) nor takes into account much of the knowledge that is available in chess literature on the subject of aesthetics. • Existing formalizations (usually in the form of an evaluation function represented using a mathematical formula) on chess ‘quality’ typically use fixed values attributed to aesthetic principles and chess themes. These do not reflect the variations possible in such principles and themes (e.g. a different piece configuration of the same theme) in a way that is both flexible yet consistent. As a result, aesthetics is not accounted for reasonably in compositions (see section 2.7), and even less in actual games. • Other similarly complex zero-sum perfect information games such as Go and up to a thousand other chess variants also have an aesthetic dimension that has not benefited from computational analysis (Pritchard, 2000b). An aesthetics model for chess could, in principle, be extended or adapted to these games as well for the benefit of humans. Chess variants for example,
  • 19. 5 usually vary in only one respect such as the board size or additional piece types. • Aesthetic models have been developed with some success in less discrete domains such as art (e.g. photographic images, paintings) and music (Machado and Cardoso, 1998; Golub, 2000; Manaris et al., 2002a, 2002b; Datta et al., 2006). A more reliable model could perhaps be developed for a theoretically finite domain like chess. This in turn could inspire the development of better models in those domains and others since chess is often used or referenced in many areas of research (see section 2.0). • A personal interest in the game of chess and over 20 years of active playing experience, combined with an equal interest and level of experience with computer programming. The prospect of developing a computer program – probably the first of its kind - capable of recognizing beauty in chess based on a viable model was therefore also a motivator. Due to all the reasons mentioned above, a discrete computational aesthetics model for a zero-sum perfect information game like chess was deemed worthy of investigation. The term ‘discrete’ signifies the distinct yet synergetic components of the proposed model (see section 3.1). 1.2 Thesis Objectives The objectives of this thesis are as follows. 1. To study chess (as a zero-sum perfect information game) and its relevant literature on aesthetics to identify the pertinent issues.
  • 20. 6 2. To propose a model that makes aesthetic evaluation in the game computationally feasible. 3. To derive formalizations for a selection of aesthetic principles. 4. To derive formalizations for a selection of chess themes. 5. To develop a computer program incorporating those formalizations for the purpose of performing relevant experiments. 6. To test the viability of the model through experimentation in terms of aesthetic recognition in the game and positive correlation with human aesthetic assessment. 1.3 Thesis Scope The scope of this thesis is as follows. 1. Review the relevant literature on chess with emphasis on its aesthetic aspect. 2. Review and evaluate existing methodologies that have attempted to address aesthetics in the game computationally. Include also research that did not actually address aesthetics where it would have been pertinent. In the interest of a general context, briefly review methodologies of aesthetic evaluation in other domains such as art and music. 3. Propose a conceptual framework for aesthetics in the game which is a way of thinking about it that can guide proper investigation. Contrast with the current practice of conflating composition convention with aesthetics. 4. Investigate composition conventions and brilliancy in real games. Identify the areas in which they overlap with established aesthetic principles, as also described in chess literature.
  • 21. 7 5. Propose a selection of aesthetic principles and themes for evaluation. These include those that apply, as far as possible, equally to both domains. 6. Propose a formula for cumulative aesthetic assessment in a move combination. Explain the choice of metrics and properties to be used. 7. Present a general methodology for developing formalizations for aesthetic principles and themes in the game. 8. Define and explain the chosen scope of mate-in-3 combinations and the points of evaluation for each selected aesthetic principle and theme. This is to facilitate experimentation. 9. Propose formalizations for the selected aesthetic principles and themes in the game with explanations about the logic behind their design. Include discussions about their strengths and limitations. 10. Develop a computer program that incorporates these formalizations to make experimentation feasible. It should possess features which make a variety of experiments involving compositions and real games possible. 11. Validate the aesthetics model through experimentation in terms of its ability to recognize aesthetics in the game computationally. 12. Demonstrate that the computational assessment of aesthetics in the game, within the chosen scope of mate-in-3 combinations, correlates positively with human chess player aesthetic assessment. This thesis explores aesthetic principles that pertain to the game of international chess in general but limits experimental studies to mate-in-3 combinations. Aesthetic principles that apply mainly to other domains such as art and music are beyond the scope of this thesis.
  • 22. 8 1.4 Main Contributions of this Work The key contributions of this research include the following. 1. To review and examine aesthetic principles (and themes) in the zero-sum perfect information game of international chess as described in its relevant literature. 2. To propose a conceptual framework for aesthetics as a way of thinking about aesthetics in the game. This framework isolates aesthetics as a component not exclusive to compositions or real games. It makes aesthetics more computationally amenable and easier to apply to both domains in a way that does not conflate with composition convention or brilliancy (in real games). 3. To propose a formula for cumulative aesthetic assessment in a move sequence or combination. It is based on the idea that dynamic formalizations for aesthetic principles and themes, in summation, can represent the aesthetic content of a combination. These are in turn based on metrics and properties inherent to the game. This permits the use of aesthetic evaluation in addition to other forms of computational assessment in the game such as composition convention and standard game-playing heuristics. 4. To present a general methodology for developing aesthetics formalizations in the game. Using this approach (and the concept of benchmarks), formalizations for other aesthetic principles and themes can be developed in a similar way to those developed for this research. 5. To propose a set of dynamic formalizations (and explain the logic behind their individual designs) for a selection of aesthetic principles and themes.
  • 23. 9 These represent the common ground of aesthetics between the domains of chess compositions and real games. 6. To devise a few novel experiments for validating aesthetic recognition in the game based on the proposed computational aesthetics model. 7. To develop a computer program incorporating the aesthetics model (and all the formalizations) for experimental purposes. Manual evaluation is complicated and prone to error, especially for bulk analysis. This program can be used by other researchers to save time in evaluating aesthetics based on the model. 8. To evaluate the proposed aesthetics model in terms of its ability, when implemented, to recognize aesthetics in the game. 9. To test the computational aesthetic recognition capability of the model for positive correlation with human chess player assessment. The results of a variety of experiments suggest that the aesthetics model can be used to recognize aesthetics in the game of chess within (at least) the scope of mate-in-3 combinations. The aesthetic scores produced by a computer program based on the model also correlate well with human chess player aesthetic assessment. 1.5 Thesis Organization The detailed structure of this thesis is as follows. Chapter 2 reviews the relevant chess and scientific literature pertaining to aesthetics in the game. It generally illustrates the importance of aesthetics in chess over the last century, and the attempts that have been made to bring that concept into the computational domain. The chapter also briefly
  • 24. 10 reviews methodologies applied to gauge aesthetics in other domains such as art and music. Chapter 3 introduces the proposed model of aesthetics. The components of the model include an examination of aesthetics from the perspective of problem composers and players, as described in the relevant chess literature. A common ground of aesthetics is identified as the focus of this research. A selection is made of aesthetic principles and themes that fall within that common ground. The chapter also presents a formula for cumulative aesthetic assessment and an explanation of the metrics and properties used. The methodologies behind standard evaluation functions in the game are reviewed before one is proposed for developing aesthetic evaluation functions (i.e. related to the selected principles and themes). The scope of analysis (for experimental purposes) is then explained, followed by a description of the points of evaluation in a combination. Chapter 4 details the actual evaluation functions for the seven selected aesthetic principles. A detailed description of each principle and the logic behind the design of its function are presented. Diagrams, examples, and experimental validation are provided, where appropriate. Chapter 5 details the formalizations for the ten selected themes, similar to the previous chapter. Chapter 6 presents and explains all the experiments performed to validate the proposed model. Included are analytical discussions of the results. Chapter 7 concludes with a summary of the thesis, its contributions, a section on the research implications, and directions for further work in the area. Appendix A explains the rules of international chess and how to read its algebraic notation. Appendix B is a glossary of chess-related terms found in this thesis. Appendix C contains diagrams of example positions referenced primarily in the main text.
  • 25. 11 Appendix D features specifications and information about the computer program (i.e. CHESTHETICA) developed for this research. Appendix E shows the essential pseudocode for implementing many of the proposed aesthetic formalizations. Appendix F contains the survey questionnaires used and the relevant raw data that was collected. Unless inclusive of the word, ‘Appendix’, references to specific parts of this document are given according to chapter, section or subsection; e.g. chapter 3, section 3.5, subsection 3.5.2 and subsection 3.5.2(d). General formulas (in the form of equations) are numbered sequentially according to section but instantiations of those equations (such as sample calculations) are not numbered. Chess move notation and board coordinates in line with other text in the main document are given in bold (e.g. a5). Example positions are sometimes given in FEN (Forsyth-Edwards Notation) within the main text (with a reference to a corresponding diagram in Appendix C). The words ‘thesis’ and ‘research’ are sometimes used interchangeably to refer to the work presented in this document. 1.6 Summary of Research Questions In principle, this thesis attempts to answer two research questions. 1) Can aesthetics in chess (within a specific scope) be recognized computationally? 2) If so, do the computational evaluations correlate positively with human chess player aesthetic assessment?
  • 26. 12 Six experiments were performed to answer both these questions (see chapter 6) with promising results. Question 1 is confirmed to the extent of mate-in-3 combinations (a reasonable scope of analysis in the game) and question 2 to the extent involving competent (not necessarily expert) human chess players; consistent with what is necessary for aesthetic appreciation in the game.
  • 27. 13 CHAPTER 2: LITERATURE REVIEW 2.0 Computational Research into Chess Aesthetics Computational research into the aesthetics of chess is relatively scarce. This may be due to the emphasis over the last few decades on getting computers to play the game ever more proficiently (Adelson-Velskiy et al., 1970; Hartmann, 1987a, 1987b; Heinz, 1997; Walczak, 2003). It may also be due to the assumption that there is no reliable way of quantifying beauty in the game (le Grand, 1986). In the first case, computers have today advanced to the level of world-class players and are even used by most of them for training purposes (Muller, 2002; Ross, 2006; Sukhin, 2007); this likely includes the use of game databases and not just chess-playing programs (Campitelli and Gobet, 2007). Therefore, rather than just moving to more complex games like Go (Hsu, 2007; McCarthy, 2007), more emphasis can now be placed on aesthetics in chess. In the second case, there exists substantial material on the subject in chess literature (see the following sections) to base a computational model on. Since human players and problem composers value beauty in the game, the idea of computational recognition of beauty is worthy of investigation. There is also room for its application in existing research which, currently address chess aesthetics superficially (see sections 2.6 and 2.7). Computational approaches to art forms are not unfeasible and are likely to become more common in the future (Boden, 2007). It is said that there are more books written on chess than books on all other games combined (Jonsson, 2006). With over 700 million players worldwide (Polgar, 2005), it is arguably the most popular game in the world (Wolff, 2001). It is also recognized as a
  • 28. 14 sport by the International Olympic Committee (IOC, 2008). Benjamin Franklin wrote about the benefits of chess as far back as 1779 in his article, ‘On the Morals of Chess’ (Shenk, 2006). Investigations into chess have had many applications within and outside of AI including molecular computing (Cukras et al., 1999; Faulhammer et al., 2000), automated theorem proving (Newborn, 2000), computer music composition (Friedel, 2006), machine reading (Etzioni et al., 2007), cognitive development (O’Neil and Perez, 2007), treatment of psychiatric illness (Cavezian et al., 2008) and children education (Ferreira and Palhares, 2008; AF4C, 2008). Such applications are not always predictable so it is conceivable that this research could also be of interest or reference to researchers in other fields or related ones. This chapter reviews the more important and relevant contributions to computational aesthetics in chess and scientific literature over the last century. It is a relatively recent account, given for example, that documents featuring chess compositions date back over 1,000 years (Al-Adli, 9th century). Whole books have been written on chess since the 15th century (Axon, 1474). A review spanning the last 85 years or so is necessary to illustrate how aesthetic principles have been described by experts and researchers prior to and since the computer age. The reviews are arranged in chronological order for proper perspective with a summary in section 2.9. A glossary of chess terms is provided in Appendix B for reference. Even though it may not be directly applicable, in the interest of a general context, section 2.8 presents a brief discussion about methodologies relating to aesthetics used in other domains.
  • 29. 15 2.1 Emanuel Lasker and Aesthetics Former world chess champion and mathematician Emanuel Lasker was one of the first to write about aesthetics in chess explicitly. He maintained the world title for 27 years starting in 1894, the longest ever held by a world champion. In his book, “Lasker’s Manual of Chess” – originally written in 1925 - he devoted a chapter to the subject entitled, ‘The Aesthetic Effect in Chess’ and stressed on the concept of ‘achievement’ and ‘correctness’ (Lasker, 1960). ‘Achievement’ means that beauty in the game had to have some kind of positive result such as winning material, controlling more space on the board, or checkmating the opponent, whereas ‘correctness’ implies that the method of achievement be absolutely necessary and unequivocal. In other words, there had to be no possible escape or defence by the opponent and no better way of attaining the same achievement (e.g. in fewer moves). He also stated that in order to appreciate aesthetics in chess, one need only to understand the game and not be a master himself. Hence, the average player can just as easily derive pleasure from beautiful games and compositions. He termed the pleasure spectators derived from the game – due to witnessing moves they would call ‘brilliant’ or ‘beautiful’ - their ‘aesthetic valuation’. This valuation was based on their immediate perception of a move’s brilliance. As a result, some manoeuvres that were not, in fact, ‘correct’ (as would be revealed in the post-mortem analysis of the game) elicited a high aesthetic valuation until their incorrectness was discovered. In such cases, the valuation might diminish a little unless it was suspected that the players had done so intentionally to fool the audience; in which case it would diminish entirely. In tournament games, time constraints place a considerable burden on players so all the variations of an attractive move combination
  • 30. 16 may not have been worked out properly (Harreveld et al., 2007). In compositions there is no excuse. So aesthetically, the occurrence of somewhat ‘incorrect’ brilliant moves in real games is condoned whereas in compositions, they must withstand the most rigorous analysis. Modern computer programs as a result have revealed weaknesses and flaws in many old games and compositions that were once thought to be spectacular. Lasker showed many examples of beautiful combinations from both tournament games and compositions. Most of them were forced mates between 2 and 4 moves but others were longer and more complex. One example in his book by an unknown composer featured a ‘forced draw’ by White (despite having a significantly inferior army) that took 17 moves to complete. In it, a pair of knights chased the enemy king around the board before the initial position finally repeated itself. A game is considered drawn if the same position recurs three times (see Appendix A, subsection 1.3.2). Lasker was not specific about what he considered the tangible constituents of aesthetics in chess and relied mainly on his experience with the game as opposed to experimentation. His concepts of ‘achievement’ and ‘correctness’ are useful precepts for a framework for aesthetics even though he proposed no formalizations himself. This is understandable given the period in which his book was written, i.e. well before the advent of computers. It is quite possible that even the idea of computing aesthetics in the game was too controversial to be taken seriously. Lasker made no distinction between the aesthetics of real games and compositions and thus did not take into account composition conventions. This supports the idea that aesthetics transcends either domain, at least in cases where the rules are the same (i.e. not including chess
  • 31. 17 variants). Even so, it possibly overlooks situations where some conventions could also apply aesthetically to real games. Lasker made the important observation that aesthetic appreciation is not an experience limited to masters even though having an understanding of the game would imply a certain level of competence as a player. While master players may be needed to identify the principles of aesthetics, others can also appreciate them. Assessing computational evaluation of aesthetics in terms of positive correlation with human perception would therefore not necessitate the involvement of experts. In fact, it would probably be more useful to exclude or not focus on them since they form only a small minority of the chess community. The psychological aspects of aesthetic perception Lasker suggested are interesting but difficult to gauge computationally because they rely upon the intentions of players and subjective valuation by spectators that potentially change based on those intentions. These are neither computationally amenable nor within the scope of this thesis. In summary, Lasker provides a good starting point on how to approach the question of aesthetics in the game but his contribution lacks the building blocks (i.e. discrete components) required for a computational model. 2.2 Automatic Judging of Compositions Vaux Wilson - a chess composition judge and author - researched, proposed, and refined over the course of 20 years, a method of evaluating the aesthetic and strategic elements of chess problems through a scientific approach (Wilson, 1959, 1969, 1978). The intention was to provide a logical basis for compositions to be judged in
  • 32. 18 tournaments because many composers felt that judges were too arbitrary or subjective when choosing a winning composition. The method was supposedly similar to a much earlier and obscure system proposed by Harley (1919) that was limited to two-move problems, but no reference was made to that work. Wilson identified exclusively nine basic ways or ‘strategic elements’ in which a moving piece might influence the game. It could: 1. capture an opposing piece or sacrifice itself; 2. give check to the enemy king; 3. guard or abandon guarding a square; 4. move into a position where it could gain access to another square; 5. block or unblock a square; 6. castle; 7. move off, on or along a line; 8. open or close a line of check, or the guard of one square; 9. pin or unpin a piece. These strategies were valued (typically between 2 and 10 points) based on the number of pieces and squares involved. A ‘line’ was determined as consisting of 3 squares. Since nothing else could possibly happen on the board when the pieces move in a chess problem, the cumulative value of these strategies was considered to be inclusive of aesthetics and any other impression one might obtain from a composition. Wilson’s actual system incorporated several rules and exceptions that compensated for composition conventions, e.g. with respect to ‘keys’ and ‘tries’ (see Appendix B). In addition, a concept of economy was also evaluated and added for a final score.
  • 33. 19 Economy was calculated as the sum of strategic scores divided by the number of white pieces. In general, the system was designed exclusively with compositions in mind, and not real games, even though aesthetics is perceived in both (Humble, 1993, 1995; Ravilious, 1994). Wilson’s system was limited to chess problems but directly applicable to the many different types such as orthodox mates, selfmates, helpmates, endgame studies, and fairy problems (of any move length). He tested it on over 7,000 problems with satisfactory results (i.e. compositions he perceived to be better scored higher) and the system was used in a few composition tournaments. A significant positive correlation with human judge evaluations was never demonstrated and probably because the system was developed to address that very problem. However, composers soon stopped using it mainly because human judges could not be entirely replaced, as Wilson intended (le Grand, 1986). For example, compositions often feature characteristic themes that could not properly be accounted for using the strategies. At the time, Wilson was in the process of having a computer program developed that incorporated his method and made calculations for composers even easier. It is not known if this program was ever completed. Wilson’s system conflated aesthetics with composition convention and this failed to account for either one sufficiently, especially the former. His identification of chess strategies was perhaps one of the earliest and most systematic approaches to the problem of evaluating compositions (which nevertheless include an aesthetic dimension) but suffered from oversimplification. There are two essential points that illustrate this. First, the values attributed to each strategy were not adequately justified
  • 34. 20 and seemed to have stemmed from his experience as a composition tournament judge, thereby limiting their applicability to little beyond compositions. These values also failed to account for the variety of piece configurations possible within each strategy. Second, metrics inherent to the game such as the number of pieces and distance (in terms of squares on the board) were employed as the basis of some of the strategies but were not incorporated in their universal form, e.g. defining a line as just 3 squares long and not using the standard Shannon (1950) value of each piece (see subsection 3.5.2(a)). These were apparently done to simplify calculations that, at the time, had to be performed largely without the aid of computers. Wilson tested his system experimentally on many contest-winning and generic problems but his results were not very reliable because the intention was to replace the existing paradigm of composition evaluation with a new, unbiased, and systematic one. What seemed reasonable to him may not, in fact, have been so to the wider composition community despite the best intentions to eliminate subjectivity. The scope of application was also too large because it may be unreasonable to assume that human aesthetic perception or appreciation of compositions remains constant despite the length of moves or type of problem involved. The rejection of his system by the composition community, however, is not necessarily an indication of a failed approach. A more limited scope and flexible set of established values (attributed to the strategies) would probably have improved it. In general, Wilson introduced a scientific approach to aesthetics in the game even though not dealing with it directly, and he showed that the evaluation of subjective aspects in chess is effective to some degree using identified and quantifiable strategies or principles.
  • 35. 21 2.3 Principles of Beauty The psychologist Stuart Margulies was perhaps the first person to study aesthetics in chess experimentally. He derived eight principles of beauty in the game from the judgement of experts (i.e. 30 players with an official Elo rating of over 2000) by showing them pairs of positions and asking them to select the more beautiful solution (Margulies, 1977). The Elo rating (see Appendix B), while widely used, is not necessarily the best or most accurate measure of performance in the game (Donninger, 2003; Lopatka and Dzielinski, 2007; Elo, 2008). The eight identified ‘principles of beauty’ derived by Margulies are as follows. 1. Successfully violate heuristics. 2. Use the weakest piece possible. 3. Use all of the piece’s power. 4. Give more aesthetic weight to critical squares. 5. Use one giant piece in place of several minor ones. 6. Employ themes. 7. Avoid bland stereotypy. 8. Neither strangeness nor difficulty produces beauty. The 1st principle involves making a move that goes against basic principles of ‘good practice’ in chess. If the objective (e.g. checkmate, win material) is achieved despite such a manoeuvre (e.g. leaving a piece exposed to capture), the move is considered a successful heuristic violation. The 2nd principle is related to economy. The queen and rook for example, have similar capabilities along ranks and files on the board. If a rook
  • 36. 22 is sufficient for the task, the solution is considered more beautiful than using a queen since the former is a weaker piece. The 3rd principle refers to the distance a particular piece travels. A piece’s mobility – the number of squares it controls – is a good reflection of its power. Hence, a piece moving a greater distance across the board is more beautiful because less of its power is wasted. The 4th principle places emphasis on the piece most involved in the objective. For example, in a checkmate situation, the piece delivering mate would matter more, aesthetically, than the one that moved; assuming they were not the same piece (like in a ‘discovered mate’, see section 5.5). The 5th principle was tested using imaginary pieces not in the original piece set. It was found that experts preferred positions where all the necessary resources required for the task were concentrated into one powerful piece, instead of several weaker ones. This principle is therefore also related to economy or efficiency. The 6th principle, i.e. using chess themes (e.g. the pin, see section 5.2), is also important aesthetically. Margulies determined that the more prominent a theme was in a solution, the more beautiful the solution was considered to be. However, the themes had to be relevant or important to chess. The 7th principle implies originality and favours rare positions over common ones, but the 8th principle seemingly contradicts it. Margulies found that highly unlikely positions did not lead to judgements of beauty - the experts were actually equally divided between them and common positions - and neither did solutions which were difficult to find. As Margulies himself concluded, the 8th principle is rather a restriction of the 7th than its contradiction. Rarity or originality is favoured aesthetically as long as it is not too
  • 37. 23 difficult to solve, or improbable, i.e. from the viewpoint of its likelihood of occurring in a real game. Margulies also questioned intermediate and novice players and found that the majority of them (a higher proportion in the former) concurred with the experts as to which solutions were more beautiful. This further supports Lasker’s contention that only understanding - not mastery - is a prerequisite to appreciating beauty in the game (Lasker, 1960; Belov et al., 1996). Margulies found that beautiful moves were often also the most effective ones. Margulies essentially identified through experimentation with experts many tangible constituents or elements of aesthetics in the game of chess, and employed game metrics, similar in some ways to Wilson. For example, pieces were evaluated according to their relative values (see subsection 3.5.2(a)) and distance was measured in squares bound only by the limits of the chessboard. The positions Margulies used in his experiments were restricted to single moves to avoid ambiguity when interpreting the underlying principle. However, he proposed no model or formalizations for aesthetics even though the elements were clear. This is probably because his main intention was to investigate ‘traditional’ aesthetic principles (e.g. economy, elegance, novelty) outside the domain of chess. The game was simply a convenient place to experiment. He found that chess only confirmed, rather than provided more insight, into the traditional principles. His derived principles of beauty in the game, though not necessarily a conclusive set (Fine, 1978), are nevertheless valuable to the research presented in this thesis.
  • 38. 24 2.4 Computer Chess Problem Composition Schlosser (1988, 1991), in his approach to computer chess problem composition, built on related work (van den Herik and Herschberg, 1985; van den Herik et al., 1988) that had been done with regard to chess endgame databases. He outlined three steps that were required for the process. The model is as follows. 1.Construct a complete database. 2.Eliminate all ‘incorrect’ positions. 3.Select true chess problems. Similar ideas were later used to compose problems in Tsume-Shogi, a Japanese game not unlike chess (Hirose et al., 1997; Watanabe et al., 2000). The method was an improvement over using a random algorithm (Noshita, 1996). A ‘reverse method’ has recently been proposed (Horiyama et al., 2008) but is not directly applicable to chess due to certain differences between the games. In Tsume-Shogi, each move of the attacker must be a checking move; in a ‘shogimate’, only one solution exists; unlike chess, where a mate might have more than one solution. The 1st step was restricted to (a database of) endgame positions with a few pieces because the number of possible positions increases exponentially with the pieces, making computation unfeasible (Stiller, 1995). Complete databases, tablebases or ‘oracles’ as they are known are designed through retrograde analysis. This involves starting with say, a checkmate position (that has a specific game state, i.e. ‘won’) and working one ply or half-move backwards (Thompson, 1986). The process is repeated
  • 39. 25 until a seemingly uncertain position can be shown to lead to a checkmate in the shortest number of moves and against any defence. A complete database would therefore include all possible positions of a certain set or number of pieces, and their inevitable result (win, loss or draw) in a given number of moves. Presently, a complete database of 6-piece endgames including the two kings has been achieved (Thompson, 1996). Seven pieces is estimated to be possible by the year 2015 (Hurd and Haworth, 2006). Such databases are also possible in other variations of the game (Fang, 2006). Efforts have been made to reduce the size of tablebases but they are still generally quite large with sizes running into gigabytes for just 5 and 6 pieces (Thompson, 1996; Heinz, 1999a; Nalimov et al., 2000). Given the ‘omniscience’ of such databases, they are useful for developing learning approaches in the game (Sadikov and Bratko, 2006). The 2nd step involves eliminating ‘incorrect’ positions from the standpoint of composition conventions. Most conventions are not very difficult to formalize and this step helps to reduce, significantly, the number of positions found that inevitably lead to checkmate (given orthodox problems). The 3rd step is where aesthetics is considered and requires the intervention of human composers. Schlosser states the following. “A computer, however, is not capable of composing like a human being. Creating a new chess problem according to a given theme, which is the really creative part of a composer's work, remains to be done by man.” (Schlosser, 1988)
  • 40. 26 “Formally, all positions left after step 2 are correct chess problems. To choose the ‘best’ ones from the potentially large set of correct positions, the imagination and experience of a (human) expert is needed. According to the criteria of chess composition, he selects what is new, artistically or aesthetically. There is still no way to assign this task to a computer. An analogous situation exists in music composition or painting.” (Schlosser, 1991) Here, he acknowledges the importance of aesthetics and chess themes which typically require the experience and expertise of a human composer. Schlosser implied that an analogous situation exists in music and art, but these domains are more culturally dependent, and have fewer discrete and computationally amenable components than zero-sum perfect information games. Even so, computational models which address aesthetics (in varying degrees) in those domains have since been developed with reasonable success (Machado and Cardoso, 1998; Golub, 2000; Cope, 2001; Manaris et al., 2002a, 2002b; Datta et al., 2006). These are beyond the scope of this thesis but their methods are briefly discussed in section 2.8. On its own, Schlosser’s first two steps were capable of finding forced checkmates that were hard to solve by humans and occasionally featured interesting themes. This is to be expected since themes or tactics are an integral part of how the game is won. The problem, therefore, is in getting computers to recognize the aesthetics of a composition or game for its own sake because somewhere in a massive tablebase certainly lie even the most beautiful compositions that humans could conceive with those pieces and would appreciate.
  • 41. 27 The commercially available program ‘ChessExplorer’ uses a similar two step process to create chess problems of the mate-in-2 and 3 varieties. However, its second step does not filter them using any criteria except checking for a forced mate with only one solution. Hence, the ‘created’ problems are usually not attractive; this is still evident in the latest version of the program i.e. v6.11 (Nowakowski, 2005, 2008). Schlosser’s model provides a clever way to emulate creativity in composing through the use of brute-force searching but still relies on human intervention for the aesthetics component. He therefore separates aesthetics from composition convention and concedes to the limitation of his approach. The author hopes that this research will address the aesthetics component in a way that can be incorporated into models like the one proposed by Schlosser. The automation of problem composition can then be improved so it does not need to rely on human intervention as much or at all (more recent work is discussed in section 2.7). Schlosser’s model limits the scope of automatic composition to orthodox problems and what are possible using available endgame databases. Any reasonable aesthetics model would also need to be limited in this way to be consistent with available information, and feasible in terms of required computing power. In summary, Schlosser’s approach clearly identifies the gap a computational aesthetics model would fill in this context. 2.5 Elements of Beauty Classified One of the recent books that address aesthetics in chess is, ‘Secrets of Spectacular Chess’ (Levitt and Friedgood, 1995, 2008). The book is currently in its expanded 2nd
  • 42. 28 edition. In it, the authors – a chess grandmaster and international master of problem solving, respectively – classify four elements of chess beauty namely paradox, depth, geometry and flow. The book features a section entitled, ‘The Importance of Chess Aesthetics’ and lists several reasons to support that contention. These include pleasure, cultural or artistic value, educational and practical value. Aesthetics in the game gives pleasure to a person and his life is considered to be more meaningful than one who is unable to derive the same pleasure from it. Cultural or artistic value is compared to paintings which exhibit the skill and genius of their artists. In terms of education, good problems and pretty studies (a form of chess composition, see ‘endgame study’ in Appendix B) are seen as an excellent teaching tool with surprising solutions that can capture the imagination of those learning the game, especially children. Finally, beautiful compositions and games have practical value in actually improving a person’s – even a master’s - quality of play because they are full of effective and original ideas. Levitt and Friedgood write that virtually all world class players (e.g. Kasparov, Botvinnik and Lasker) have an interest in the aesthetic aspect of chess and that it has helped in their development. Returning to their elements of chess beauty, ‘paradox’ means a violation of heuristics or doing something that one is not usually supposed to do, e.g. leaving a piece in a position to be captured. It is paradoxical because the move wins despite going against general ‘good practice’. Successful heuristic violation (the first principle of beauty derived by Margulies, see section 2.3) comes under this. ‘Depth’ refers to the point of the key move being obscured or unclear at the beginning but realized later. It is the sort of foresight in a move that does not make much sense at
  • 43. 29 first and is not necessarily paradoxical, but makes perfect sense by the end of the combination. ‘Geometry’ is the chance or planned formation of shapes on the chessboard that resemble say, alphabets. While this is very rare in real games, some compositions feature it. Geometry also includes other visual effects on the board such as symmetry and the relevance of particular lines (i.e. ranks, files, diagonals) to a solution. ‘Flow’ describes a move sequence that is basically forced instead of complicated with many side variations. Flow is therefore more common in real games than in compositions where side variations may even be laudable. Themes – though not explicitly classified as an element of beauty – are treated as a given rather than examined individually. This is probably because not all implementations of chess themes are noteworthy from an aesthetics standpoint even though most examples of exemplary beauty tend to feature some theme or other. Levitt and Friedgood succeed in presenting to a modern audience the aesthetic aspect of chess using contemporary examples and styles of play. This is important because in the computer age, it is sometimes thought that little is now left to the imagination, especially for a zero-sum perfect information game. Their examples (of beauty in the game) illustrate that there are still useful tactics and strategies that our current computational approach to playing is unable or slow to recognize. This remains true even today. In other words, we are still better at solving certain problems in the game using our creativity than computers, despite their brute-force approach. Levitt and Friedgood, however, do not themselves propose any models or formalizations for aesthetics. Yet, their broad classification of the elements of beauty and well-chosen
  • 44. 30 examples of the finer aspects within them elucidate the principles of aesthetics proposed by others (e.g. Margulies, though he is not cited) and extend them even further. For instance, some of their examples suggest the importance of mobility (the number of squares controlled by a piece in a particular position) as an additional property for aesthetic computation (in addition to piece value and distance). Other examples demonstrate the wide variety of possibilities within individual chess themes, which Margulies identified as his 6th principle but only briefly explained. Similar to Lasker, their contributions stem from experience rather than experiment (although it is notable they had the distinct advantage of computer analysis) and they make no significant distinction between compositions and real games in terms of aesthetics. They also do not suggest a way of thinking about aesthetics as an independent component that is not necessarily exclusive to composition conventions or real games. Nevertheless, their examination of aesthetics in the game contributes significantly to the literature on the subject. 2.6 Beauty Heuristics in a Game Engine Aesthetics in chess has also been applied as a viable alternative to traditional game- playing heuristics. Walls (1997) proposed using some of the principles of beauty derived by Margulies (see section 2.3) in a chess engine to see if it performed better than one that used standard heuristics. It was found that the engine using beauty heuristics was 25% faster and needed to analyze 33% fewer nodes (i.e. positions) than the one using standard heuristics, for solving direct-mate chess problems between 2 and 5 moves long.
  • 45. 31 There are two important implications of Walls’ research. First, it supported his position that humans make good moves in chess (at least in part) based on their ‘sense of beauty’. Second, his findings also suggest a correlation between effectiveness and aesthetics in the game. This is similar to using beauty as a ‘measurement of performance’, and it has been suggested not only in chess but also in economics (Katsenelinboigen, 1990, 1997). It is not known, however, if the results obtained by Walls remain true in a full game. He did not apply all of the principles derived by Margulies because not all of them were applicable to the scope of his research. The first principle (see section 2.3), ‘successfully violate heuristics’ was adopted but excluded standard heuristics that did not apply to mating problems. These included those that (the violation of which) made it difficult to find the forced mate. The second, third and fourth principles were summarized as ‘do not waste any power’. They encapsulate traditional aesthetic principles such as economy, parsimony and simplicity. Walls modified the fifth principle to ‘use all of the pieces’ because the original one used imaginary pieces and could also be interpreted as wasting less power (or using all available pieces). He eventually rejected this modified principle due to computational overhead. Themes were not included for the same reason and because they were thought to distract from finding the quickest solution to checkmate. The seventh and eighth principles by Margulies were also not included. The heuristics implemented in the standard game engine were limited to those applicable to mating problems and included the following. 1. Place the enemy king in check. 2. Attack the squares surrounding the enemy king.
  • 46. 32 3. Sacrifice pieces if they lead to checkmate. 4. Gain enemy material. The ‘beauty’ version of the engine included the first three standard game engine heuristics and the following additional ones. 1. Violate the ‘gain enemy material’ heuristic. 2. Use the weakest piece possible (to check). 3. Use all of the piece’s power. 4. Give aesthetic weight to the critical piece. The first additional heuristic was limited to violating just the 4th standard heuristic because violation of any of the others would impede finding the checkmate solution. Walls implemented these beauty heuristics in a rather rudimentary manner. For example, in order to encourage the engine into making sacrificial moves, the standard evaluation function which calculates the material balance of a position (typical in all chess programs) was disabled. Weaker pieces (pertaining to the second additional heuristic) were determined using the standard Shannon values but limited to ‘checking’ moves. The third additional heuristic (i.e. use all of the piece’s power) involved counting the number of squares made by the checking piece. There was no difference therefore, between a queen moving across 5 squares and a bishop moving the same distance. While this speeds computation, it may not correlate well with human aesthetic perception of the manoeuvres since they involve pieces of different value. The fourth additional heuristic awarded extra points to the move based on the number of higher valued pieces in the piece set than the one performing check. Weaker pieces
  • 47. 33 therefore, were considered more critical than stronger ones. In general, Walls may have compromised his experiments to a degree by oversimplifying the aesthetic principles he used. The reason he did this was because the main focus was not aesthetics itself but an improvement in game-playing heuristics which requires fast computation for efficient searching. A complex representation or formalization of the aesthetic principles, however necessary, would have slowed down the beauty heuristics engine considerably. It is difficult to say if any realistic measure or identification of aesthetics was attained through his experiments. Initial tests with human players on the aesthetics component alone would have established this. Even so, Walls demonstrated - with some degree of success - a computational implementation of chess aesthetic evaluation that can potentially improve game-playing heuristics. 2.7 Computational Improvement of Chess Problems Some of the relatively recent research in the area has sought to improve the composing ability of computers with regard to chess because unlike playing, computers are quite poor in problem composition. The Improver of Chess Problems (ICP) was presented as a model to improve the quality of two-move mate problems (HaCohen-Kerner et al. 1999). A significant proportion of the knowledge required to evaluate the quality of compositions was formalized for this purpose through consultation with two international masters of chess composition. Based on the model, a chess problem is typically put through several ‘transformations’ in order to improve it. These transformations include the following.
  • 48. 34 1. Deletion, addition or replacement of a piece on the board. 2. Transfer of a piece to another square within the same rank or file. 3. Transfer of a set of pieces using a particular movement (e.g. 3 files to the right). Each transformation is tried on a specific piece on the board (in a sequence of importance) and applied only if the new position satisfies the three criteria mentioned below. 1. It is legal. 2. It is a two-mover with only one key move. 3. It has a higher quality score. The new position does not need to include the themes of the original problem or the best quality score of the best transformation found so far. Thematic considerations were considered restrictive to the number of improvements possible while weaker initial transformations were seen as possibly leading to better overall improvement. The quality evaluation function they used is shown below. V denotes the value function, Ti the set of all themes in the position, Bj the set of all bonuses granted and Pk the set of all penalties imposed. ( ) ( ) ( ) severe deficiency otherwise 0 m i j k i j k q V T V B V P  =  + −∑ ∑ ∑ Ten themes common to compositions (e.g. direct battery, Grimshaw) were attributed relative but fixed values ranging from 10 to 45. Bonuses included desirable practices in
  • 49. 35 composition such as placing the black king in the centre of the board (10 points) and certain manoeuvres like sacrifices in the key move (5 × piece’s value). Penalties ranged from severe deficiencies (e.g. illegal position, not a mate-in-2) to smaller things such as a check (-50 points) or pinning a black piece (5 × piece’s value) in the key move. The ICP was tested on 36 orthodox mate-in-2 chess problems taken from composition books and managed to improve 10 or 27.7% of them. Eight of the ten were improved after a single transformation and the remainder after two transformations. Mate-in-2 miniatures (no more than 7 pieces on the board) were used so that improvements could be achieved within a reasonable amount of time. The low proportion of improvements obtained from the 36 problems was attributed to the fact that these were known compositions and mostly already optimized. Aesthetics was not explicitly accounted for in the ICP model even though some of the knowledge for evaluating the ‘quality’ of compositions included certain principles of aesthetics such as themes and sacrifices. There are two significant issues. First, the relative (fixed) values of themes, bonuses and penalties seemed to have been determined arbitrarily by just two master composers, including the final determination of perceived improvement over the original problems in the experiment. It is noteworthy that the flow of information from expert to non-expert in complex domains like chess often results in a bottleneck which affects the quality of the knowledge formalized (Michie, 1986; Guid et al., 2008). Aesthetically, this approach does not account for varying configurations of particular themes (e.g. using different pieces in different places for a similar purpose) and the perception of composers in general; the majority of whom are not masters.
  • 50. 36 Second, this model is not easily applicable to real chess games where aesthetics is also perceived. The ICP was designed specifically with chess problems in mind. Nevertheless, the ICP is an improvement over Schlosser’s model (see section 2.4) because there is an attempt to deal with the aesthetics component, albeit in a way that conflates it with convention (comparable to Wilson’s system, see section 2.2). An improved model called, ‘Chess Composer’ used a similar approach to the ICP but had fewer types of transformations (Fainshtein and HaCohen-Kerner, 2006a, 2006b). This reduced the branching factor and increased the depth of applied transformations. Chess Composer used brute-force searching to find a global maximum and did not suffer from ICP’s limitations in terms of pruning the search tree, 1) wherever the position was not legal, 2) not a two-mover with one key or, 3) with a lower quality score than the original problem. Much of the domain knowledge was taken from the ICP model with some additions, but the quality function remained the same. Chess Composer was tested on 100 mate-in-2 chess problems and managed to improve the quality of 97 of them. Despite its relative slowness, the model’s higher success rate can be attributed to using a better search technique and greater depth of transformations (3 levels instead of 2). Most of the improvements were, in fact, achieved after various sequences of three transformations. The authors recognized Chess Composer’s limitations in terms of aesthetics and state the following, before alluding to the use of ICP’s formalized knowledge to compensate.
  • 51. 37 “The concept of a ‘high-quality mate problem’ in chess is hard to define, especially if an automatic program is involved. It is not simple to define concepts such as beauty, originality, uniqueness of the solution, and difficulty to solve.” (Fainshtein and HaCohen-Kerner, 2006a) Both the ICP and Chess Composer models are practical methods of ‘composing’ or at least improving existing chess problems within a limited scope (e.g. mate-in-2) from the standpoint of composition conventions. Longer problems are possible but would require more effective search techniques in order to be computationally feasible (Fainshtein and HaCohen-Kerner, 2006b). They admit that improving the quality function might contribute to that (Fainshtein and HaCohen-Kerner, 2006a). In general, Chess Composer improves more in terms of performance rather than technique, when compared to the ICP, and does not look any deeper into the question of properly accounting for aesthetics. The conflation between composition convention, and aesthetics, still exists and as a result the latter is improperly accounted for. The attribution of fixed but relative values to themes and conventions with the aid of masters in composition (for both the ICP and later supplemented in Chess Composer) is a step closer toward complete automation of the process but nonetheless fails to account for aesthetic variety within each theme and convention. Even though some conventions are described using simple formulas, e.g. bonus for X number of pieces on the board = 3 × (18-X), the constants used are not explained and therefore presumably have little basis in chess literature. Given the brute-force searching required in both of these models, complexity with regard to aesthetics was perhaps rightfully avoided. The research presented in this
  • 52. 38 thesis, however, deals exclusively with aesthetics and a model which should enable computers to recognize it in the game like humans do. Since brute-force searching for larger purposes (e.g. automatic composition) is beyond the scope of this thesis, formalization of the available knowledge we have on chess aesthetics need not be compromised. This means that the variety of configurations possible within the established aesthetic principles and themes can be better accounted for. 2.8 A Look at Methodologies Used in Other Domains Even though the methodologies used in other domains are not quite applicable to zero- sum perfect information games (the domains are of different natures), this section presents a brief discussion of a select few for a general context. One of the earliest attempts to formalize aesthetics is the mathematician Birkhoff’s model of, M = O/C where M = aesthetic value, O = order and C = complexity (Birkhoff, 1933; Scha and Bod, 1993). ‘Order’ was identified with factors like symmetry and repetition, and ‘complexity’ with the amount of effort required to attend to a pattern and assimilate it. These enabled similarities and relations between elements to be discerned using numerical values. Even though Birkhoff specified procedures for attributing such values to certain things such as polygons, vase outlines, melodies and lines of verse, his model was not successful mainly due to oversimplification. Maximum aesthetic satisfaction was simply not obtained using the most order and least complexity in patterns, as his model suggested. Experimental results proved this (Berlyne, 1972). Later attempts have limited such models to just one domain and identified the measures used to factors strictly within that domain. Machado and Cardoso (1998) for example,