Skip to main content

Generating the Expression of the Move of Go by Classifier Learning

  • 1695 Accesses

Part of the Lecture Notes in Computer Science book series (LNISA,volume 10507)

Abstract

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 classifier learning technique.

Keywords

  • Entertainment computing
  • Go
  • Classifier learning
  • Move
  • Expression

1 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 GoFootnote 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 Sect. 3.1), the current study illustrates the effects of higher-level features (examined in detail in Sect. 3.2). Finally, in Sect. 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].

2 Expressions of Go Moves

2.1 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 Sect. 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.

Fig. 1.
figure 1

The most frequent 10 expressions for the shape of a move (expression for each last move)

2.2 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.

Fig. 2.
figure 2

Examples of the ambiguity of the expressions for shape and strategic moves (Color figure online)

As mentioned in Sect. 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.

Figure 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.

Table 1. Generating the training/test dataset of the expression of the Go move from the SGF-move coordinates file and the game review text

2.3 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\times 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 (xy), 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 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.

Table 2. Numbers of positive samples in the dataset for each expression of the 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.

3 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.

3.1 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.

\(\varvec{FL_1}\) : Coordinates of a Move

The x and y coordinates of a move are used as two features, which are denoted as \(FL_1\).

\(\varvec{FL_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 \(FL_2\).

\(\varvec{FL_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 \(FL_3\).

Fig. 3.
figure 3

\(FL_3\): distance to the closest board edge

\(\varvec{FL_4/FL_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 \(FL_4\) or \(FL_5\) respectively. In terms of the distance measurement used for these features, that used by previous research [1, 2] is employed. Thus \(\delta x\) and \(\delta y\) denote the differences of the x and y coordinates of the two stones, respectively:

$$\begin{aligned} \mathrm{distance}(\delta x, \delta y)= & {} \bigl |\delta x\bigr | + \bigl |\delta y\bigr | + \max (\bigl |\delta x\bigr |, \bigl |\delta y\bigr |) \end{aligned}$$
(1)
Fig. 4.
figure 4

\(FL_4\)/\(FL_5\): distance to the closest current player’s/opponent’s stone

Fig. 5.
figure 5

\(FL_6\)/\(FL_7\): distance from the closest current player’s/opponent’s stone to the board edge

In our implementation of these features, feature values over six are ignored.

\(\varvec{FL_6/FL_7}\) : Distance From the Closest Current Player’s/Opponent’s Stone to the Board Edge

As shown in 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 \(FL_6\) or \(FL_7\), respectively.

3.2 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.

\(\varvec{FH_1/FH_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 \(FH_1\) or \(FH_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 Eq. (1) in the previous section, the following definition of the distance is employed, where \(\delta x\) and \(\delta y\) denote the differences between the x and y coordinates of the two stones, respectively:

$$\begin{aligned} \mathrm{distance}(\delta x, \delta y)= & {} \bigl |\delta x\bigr | + \bigl |\delta y\bigr | \end{aligned}$$
(2)
Fig. 6.
figure 6

\(FH_1\)/\(FH_2\): distance to the stone of the previous/move before the previous move

This is because these features are required to be sensitive to a much broader area on the board compared to those of \(FL_4\) and \(FL_5\), aiming at identifying the shape of a move, but not a strategic move.

4 Evaluation

4.1 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’sFootnote 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.

4.2 Evaluation Results

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 \(FL_4\)/\(FL_5\) (the distance to the closest current player’s/opponent’s stone). \(FL_6\) (the distance from the closest current player’s stone to the board edge), and \(FH_1\)/\(FH_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 \(FL_1\) (the coordinates of a move), \(FL_2\) (the number of stones on the board), and \(FL_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.

Table 3. Evaluation results (%)

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.

5 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.

Notes

  1. 1.

    Yoshikawa et al. [5] studied the protocols of the game of Go with respect to the relations between the player’s skill and the use of Go terms.

  2. 2.

    In this study, we applied decision trees as the classifier for identifying and generating the expression of moves as it was employed successfully by Ikeda et al. [2].

References

  1. Coulom, R.: Computing elo ratings of move patterns in the game of Go. In: Proceedings of Computer Games Workshop (2007)

    Google Scholar 

  2. Ikeda, K., Shishido, T., Viennot, S.: Machine-learning of shape names for the game of Go. In: Plaat, A., Herik, J., Kosters, W. (eds.) ACG 2015. LNCS, vol. 9525, pp. 247–259. Springer, Cham (2015). doi:10.1007/978-3-319-27992-3_22

    CrossRef  Google Scholar 

  3. Pedregosa, F., Varoquaux, G., Gramfort, A., Michel, V., Thirion, B., Grisel, O., Blondel, M., Prettenhofer, P., Weiss, R., Dubourg, V., Vanderplas, J., Passos, A., Cournapeau, D., Brucher, M., Perrot, M., Duchesnay, E.: Scikit-learn: machine learning in python. J. Mach. Learn. Res. 12, 2825–2830 (2011)

    MathSciNet  MATH  Google Scholar 

  4. Silver, D., Huang, A., Maddison, C.J., Guez, A., Sifre, L., van den Driessche, G., Schrittwieser, J., Antonoglou, I., Panneershelvam, V., Lanctot, M., Dieleman, S., Grewe, D., Nham, J., Kalchbrenner, N., Sutskever, I., Lillicrap, T., Leach, M., Kavukcuoglu, K., Graepel, T., Hassabis, D.: Mastering the game of Go with deep neural networks and tree search. Nature 529, 484–503 (2006)

    CrossRef  Google Scholar 

  5. Yoshikawa, A., Kojima, T., Saito, Y.: Relations between skill and the use of terms. In: Herik, H.J., Iida, H. (eds.) CG 1998. LNCS, vol. 1558, pp. 282–299. Springer, Heidelberg (1999). doi:10.1007/3-540-48957-6_19

    CrossRef  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Takehito Utsuro .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and Permissions

Copyright information

© 2017 IFIP International Federation for Information Processing

About this paper

Cite this paper

Mori, N., Utsuro, T. (2017). Generating the Expression of the Move of Go by Classifier Learning. In: Munekata, N., Kunita, I., Hoshino, J. (eds) Entertainment Computing – ICEC 2017. ICEC 2017. Lecture Notes in Computer Science(), vol 10507. Springer, Cham. https://doi.org/10.1007/978-3-319-66715-7_33

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-66715-7_33

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-66714-0

  • Online ISBN: 978-3-319-66715-7

  • eBook Packages: Computer ScienceComputer Science (R0)