Computational Assessment of Sparsity in Board Games Azlan Iqbal and Mashkuri Yaacob 1 1 Tenaga Nasional University, Malaysia, email: azlan@uniten.edu.my, mashkuri@uniten.edu.my Abstract. Board games like chess, checkers and go all have squares or points on a matrix-like board and pieces that occupy them throughout the course of a game. The author proposes an evaluation function for the concept of sparsity in such games. Sparsity refers to the general lack of concentration of pieces on the board and is inversely proportional to the perceived density. Evaluating sparsity is important from a visual perspective and useful for computational aesthetics purposes since dense piece configurations can be confusing and less pleasing to the eye. The evaluation function was designed with aesthetics in mind and comparisons with possible alternatives were done, suggesting its advantages. Experiments involving over a thousand chess positions were carried out to validate the function with promising results. An alternative method was also tested using the same data and it was found that evaluating sparsity is not as straightforward as it may seem. The work presented in this paper could therefore be useful to other researchers interested in a viable computational approach to the concept in board games or other areas. Keywords: sparsity, aesthetics, board, game, heuristic, chess, go 1 INTRODUCTION Board games are a popular pastime and convenient domain of investigation in the field of artificial intelligence. A lot of progress in terms of game-playing ability has been made in zero- sum perfect information games like checkers and chess [1-5]. The game of go - which has a much larger game tree - is also being researched extensively [6-8]. It is hoped that through all this, we will learn more about the mechanics of human intelligence and be able to simulate it in machines [9]. Game playing engines usually rely on efficient search techniques and heuristics in the form of evaluation functions to guide move selection [6][10-12]. Board sparsity however, is generally not used as a heuristic for game- playing because its effectiveness in that regard has yet to be demonstrated. It is therefore virtually unmentioned in the relevant literature [13-15]. Nevertheless, it is an important factor in game aesthetics. On the surface, it might seem that there are many effective methods or approaches to evaluating sparsity on a matrix-like board. Yet seemingly intuitive methods of evaluation do not necessarily produce reliable results (refer section 4.1). The rest of this paper is organized as follows. Section 2 explains the concept of sparsity in more detail with reference to games; chess in particular. Section 3 continues with an overview of alternative approaches to the problem that we tested before arriving at the proposed evaluation function presented in section 4. The experiments performed are described in section 4.1. A discussion of the results follows in section 5. Section 6 is a general summary with possible directions for further work. 2 ILLUSTRATION OF THE CONCEPT Crowded or cluttered positions in games are generally considered less beautiful than sparse ones because the relationships between the pieces become more complex and difficult to see. In addition, as complexity increases the chances of finding the best moves are reduced, especially under time constraints [16][17]. It is also uneconomical to leave parts of the board unoccupied [18]. Two important factors when evaluating sparsity are therefore the number of pieces on the board and their proximities to each other. Ideally, a game position can have many pieces yet be considered just as sparse as a position with only a few, depending on its configuration. It can also have its pieces spread out far enough apart to be considered sufficiently sparse (i.e. no longer cluttered), regardless of any further efforts at improving it. XABCDEFGHY 8k+ + + +( 7+ + + + ' 6N+N+ + +& 5+ +L+ + % 4K+ + + +$ 3+ + + + # 2 + +p+r+" 1+ + + + ! xabcdefghy XABCDEFGHY 8 + + + +( 7+ + sN + ' 6 zp + + +& 5+ + + mK % 4 +nmk + +$ 3+ + + wQ # 2 sn +R+ +" 1+ + + +L! xabcdefghy (a) C.S. Kipping, Manchester City News, 1911 (b) Godfrey Heathcote, British Chess Magazine, 1906 XABCDEFGHY 8n+ltRN+L+( 7+Pzpp+p+r' 6pzp +k+N+& 5+r+ zp zP % 4n+P+P+Kzp$ 3+ + + + # 2 + + vl +" 1+ + + + ! xabcdefghy XABCDEFGHY 8n+l+N+ tr( 7zp + mk + ' 6 zP zp zpN+& 5+ zp zp zP % 4 zp + + +$ 3sn +RzP mKp# 2 +P+ + +" 1+r+ vL vl ! xabcdefghy (c) K. Fabel, Deutsche Schachzeitung, 1965 (d) K. Fabel, Deutsche Schachzeitung, 1965 (Modified) Figure 1. Sparsity in chess compositions This would permit a program using this heuristic to more meaningfully recognize sparsity at any point in the game. The intention was therefore to create an evaluation function that 1) can assess the sparsity of a board game position relative to its