Generating the Expression of the Move of Go by Classifier Learning

. The ancient Chinese board game, Go, with its simple rules yet highly complex strategies, requires players to encircle more territory than their opponent. However, owing to the rise in the capabilities of Go-playing software and a lack of Go instructors in Japan, there is a need for a software that actively assists human players in learning the high-level strategies required to win the game. This study focuses on generating a review for each consecutive player’s move. This paper studies how to generate an expression for each move based on the distribution of the stones on the board. To this task of generating the expression for each move in a game of Go, we apply a classiﬁer learning technique.


Introduction
With the recent, well-known success of the computer Go program AlphaGo [4] that beat a high-level professional without handicaps, computer-based Go programs now represent a serious challenge to professional human players. Therefore, from an entertainment and educational perspective, developing software particularly designed to teach human players high-level techniques is an important task. This is an especially pressing task because, at present, Japan has only a small number of professional Go players who are capable of teaching amateurs. Furthermore, there is a need to develop high-level software that can play so-called "customer" Go, where the software analyzes a human player's habits and predicts their next moves, allowing them to win on purpose while concealing the fact that they won with the aid of the software.
Based on those arguments, this paper aims at developing a software which assist human players to learn high level techniques on the move of Go. Within various functions of such a software of assisting human players to learn the techniques of the game of Go, this paper focuses on the task of generating a review for each move in a game of Go 1 . It is strongly required to develop such a software of generating a review for each move in a game of Go mainly because it can assist amateur human players to learn high level techniques on the move of Go. Then, according to such a requirement on developing a software of generating a review for each move in a game of Go, this paper more specifically proposes to generate the expression for each move in a game of Go from the pattern of the stones on the Go board. Furthermore, to this task of generating the expression for each move in a game of Go, we apply a classifier learning technique.
In related research, Ikeda et al. [2] propose generating expressions of the shape of a particular move based on the pattern of the stones on the board by applying a classifier-learning technique. Out of the overall types of expressions of a move, Ikeda et al. [2] concentrated on generating those based on the shape of a move but failed to analyze strategic moves. Thus, one of the major contributions of the present study compared to Ikeda et al.'s [2] research is that it investigates expressions based on the shapes of moves while also taking strategic moves into account. Furthermore, in terms of the features of the classifiers used to generate an expression for each move, in addition to lower-level features, most of which have been studied by Ikeda et al [2] (see section 3.1), the current study illustrates the effects of higher-level features (examined in detail in section 3.2). Finally, in section 4, we show the optimal combination of features for each expression required to achieve the best-possible performance in a game, an aspect that was overlooked by Ikeda et al. [2].

Expressions Based on the Shape of the Move
Expressions based on the shape of a particular move are typically identified by considering the static local pattern of the stones on the board. As illustrated in section 2.3, we focus on the 10 most frequent expressions for the shapes of moves listed in Table 2. For each of these 10 expressions, Fig. 1 shows a typical example of a move; the black stone with a white triangle within it represents the last move with the expression of its shape.

Expression for the Strategic Move
As we mentioned in the previous section, the expressions for the shape of a move are typically identified by considering the static local pattern of the stones on the board. On the other hand, expressions for strategic moves are typically identified by considering a much broader view of the patterns of the stones. Each of these expressions of strategic moves represents fairly characteristic situations encountered throughout the whole-state transition within a game. Moreover, from the perspective of the overall time-series state transition of the moves within a game, a move's time-series sequences can be approximately segmented by strategic moves. Therefore, each strategic move is typically played separately from the previous moves. As mentioned in section 2.3, we focus on the three most frequent expressions for the strategic moves listed in Table 2. A detailed description of each of these three expressions is given below.
-Protect-represents that the move by the current player is intended to protect one's own stones from the opponent using various strategies. -Approach move-represents that the move by the current player is intended to start approaching the opponent's stone. -Invasion-represents that the move by the current player is intended to invade an area occupied by the opponent. Fig.2 illustrates examples of two of these three expressions for strategic moves as well as typical situations in which ambiguities against those for the shape of the move are present. In short, a particular move and the pattern of the stones on the board can be interpreted as strategic when considering it more seriously and trying to react to it as much as possible; conversely, it can also be interpreted as simply representing the shape of a particular move when it is considered less seriously, for example, by ignoring the opponent's move and attempting not to react to it. However, in both of the cases shown in Fig.2 considering the pattern of the stones on the board more seriously and interpreting these moves as strategic is the correct approach.
(a) approach move v.s. extension

The Dataset
The dataset used to evaluate the classifier for generating the expressions of the moves from the pattern of the stones was constructed from the SGF-move coordinates file as well as the game review text. We first collected these data from reviews of Go games available in newspaper articles over a period of 5 years. This included 60 game reviews played on a 19 × 19 size board and comprising 9,209 moves in total. Then, as shown in Table 1, from each SGF-move coordinate file and the game review text for each move, its order, coordinates (x, y), as well as expression were manually extracted. However, from the total number of moves, the expression for each move is available to a certain extent. This amounts to 1,207 moves out of a total of 9,209 moves. Of these 1,207 moves, 238 types of expressions were manually extracted and within this set, only 34 types were (16,17) · · · · · · 4 (4,16) · · · · · · 5 (6,17) · · · In the lower right, only with the single approach move of the 6th white stone, 6 (16,15) approach move φ 7 (16,12) φ it is unusual to change into the pincer move of the 8th white stone.

(8,17) pincer
Yamada's move of the 9th black stone is also a careful one-space jump.

9
(14,17) one-space jump · · · · · · · · · · · · observed more than or equal to 10 times. Then, these 34 types of expressions (with 667 moves in total) were employed as the overall resource for evaluating the classifier for generating the expression of particular moves. These 34 expressions can be further classified into 21 expressions based on the shape of the move at 478 moves (71.7% of the 667 moves) and the remaining 13 expressions for strategic moves at 189 moves (28.3% of the 667 moves). Then, as shown in Table 2, the 10 most frequent expressions for the shape of the move as well as the 3 most frequent expressions for the strategic move were selected (422 in total) as the positive/negative samples of the training/test dataset.

Features
The features examined in this study comprise lower-level features aimed at identifying the shape of a particular move as well as higher-level features that seek to identify strategic moves specifically.

Lower Level Features of a Particular Move's Shape
Most of the lower-level features examined here have been studied in previous work [2] on generating expressions for the shape of a move.

F L 1 : Coordinates of a Move
The x and y coordinates of a move are used as two features, which are denoted as F L 1 .

F L 2 : Number of Stones
The number of stones on the board when a move is made is used as a feature that represents the order of the move from the beginning of the game. This feature is denoted as F L 2 .

F L 3 : Distance to the Closest Board Edge
As shown in Fig. 3, the distance from a stone used in a particular move to the closest board edge is used as a feature and is denoted as F L 3 .

F L 4 /F L 5 : Distance to the Closest Current Player's/Opponent's Stone
As shown in Fig. 4, the distance from the stone resulting from a move to the closest current player's or an opponent's stone is used as a feature and these are denoted as F L 4 or F L 5 respectively. In terms of the distance measurement used for these features, that used by previous research [1,2] is employed. Thus δx and δy denote the differences of the x and y coordinates of the two stones, respectively: distance(δx, δy) = δx + δy + max( δx , δy ) In our implementation of these features, feature values over six are ignored.  Fig. 5, the distance from the closest current player's or opponent's stone to the board edge is used as a feature. This denoted as F L 6 or F L 7 , respectively.

Higher-Level Features for Strategic Move
In addition to employing the features of lower levels to identify the shape of a particular move, this section presents features of higher levels that specifically aim to identify strategic moves. This study uses the following type of higher-level features.

F H 1 /F H 2 : Distance to the Stone from the Previous/Move Before the Previous Move
As shown in Fig. 6, the higher-level features is the distance to the stone of the previous move or the move before the previous move, which is denoted as F H 1 or F H 2 , respectively. Strategic moves are typically characterized in terms of the time-series sequences of the current player's moves. As illustrated in Fig. 2, the overall sequence of time-series state transitions of moves within a game can be approximately segmented by strategic moves, each of which is typically played apart from the previous move as well as the move before the previous move. Therefore, these features of the distance between the current and previous moves are typically intended to express such time-series factors within a game. Furthermore, in our implementation of these features, instead of the distance measurement presented by equation (1) in the previous section, the following definition of the distance is employed, where δx and δy denote the differences between the x and y coordinates of the two stones, respectively: This is because these features are required to be sensitive to a much broader area on the board compared to those of F L 4 and F L 5 , aiming at identifying the shape of a move, but not a strategic move.

The Procedure
In the evaluation of the classifier for generating the expression of a particular move from the pattern of stones on a Go board, for each of the 13 expressions listed in Table 1, we train a binary classifier with all of the samples of the expression (as listed in Table 2) as positive samples. An equal number of negative samples are randomly selected from the pool of negative samples that is constructed by removing all the positive samples from the 422 samples listed in Table 2. The classifier for each binary classification is implemented using the decision tree's 2 module of the scikit-learn toolkit [3]. The parameters of the lower bound of the number of training samples within each node of the decision tree (in the range from 1 to 7) as well as the upper bound of the depth of the decision tree (in the range from 2 to 8) are tuned through a preliminary round of a 10-fold cross-validation with a random split into the training and test sets. This is also implemented through a module of the scikit-learn toolkit. The final evaluation results are obtained through another round of 10-fold cross-validation with the two parameters optimally tuned as above. Table 3 shows the optimal combination of features as well as the optimal performance achieved by the combination of these particular features for each expression. Overall, for most expressions, including both those of the shape of a move as well as the strategic moves, optimal combinations of features tend to include F L 4 /F L 5 (the distance to the closest current player's/opponent's stone). F L 6 (the distance from the closest current player's stone to the board edge), and F H 1 /F H 2 (the distance to the stone from the previous/before the previous move). These features typically represent the characteristics of the patterns of stones on a Go board. Other features such as F L 1 (the coordinates of a move), F L 2 (the number of stones on the board), and F L 3 (the distance to the closest board edge) typically contribute little to achieving the optimal performance. This is mainly because such features represent the physical layout of the stones on the board that are not critically sensitive to detecting the expression of a move. Notably, the higher-level features are more effective in the identification of the shapes of moves rather than those of strategic moves. This is because even in the binary classification task of a single expression for the shape of the move and the others, negative samples comprise not only other expressions for the shape of a move but also all the expressions for a particular strategic move. These results provide important clues for devising new types of features in future work.

Conclusion
This study aims to develop a software that assists human players in learning high-level Go strategies by focusing on generating a review for each individual move in a game of Go. In particular, this study proposes generating an expression for each move based on the pattern of stones on the board. Furthermore, to this task of generating the expression for each move in a game of Go, we applied a classifier learning technique. In terms of future work, we aim to scale up the dataset to allow more accurate evaluation of the results and evaluate other types of classifiers such as support vector machines.