Solving 7x7 Killall-Go
Solving 7x7 Killall-Go
2
Kochi University of Technology, Kami City, Japan
3
Academia Sinica, Taipei, Taiwan
tirongwu@iis.sinica.edu.tw
1 Introduction
Games solving [14], particularly for the complex game of Go, is one of the most
challenging pursuits in artificial intelligence. While AlphaZero [13] has mastered
19x19 Go in game playing, only up to 5x6 Go has been fully solved [15]. One
interesting variant of Go is Killall-Go, which follows similar rules but with Black
aiming to capture all White’s stones to win. The game can also be viewed as a
whole board life-and-death problem in Go, which is a fundamental concept for
Go learners. Killall-Go is therefore a valuable test bed for solving larger board
sizes in Go, with many attempts to solve the 7x7 version of the game [12, 21, 22].
In 7x7 Killall-Go, Black plays two consecutive moves first, followed by al-
ternating turns between White and Black, as shown in Fig. 1a. There are two
2 Tsai et al.
ways for White to win: by achieving unconditional life (identifiable via the Ben-
son algorithm [3]), shown in Fig. 1b, or by reaching mutual life with Black,
known as seki, shown in Fig. 1c. In comparison to knowledge-based analysis
for Benson safety, seki requires an exhaustive search to identify. Knowing when
to attempt detecting seki to minimize overhead costs is an issue that has yet
to be addressed. Additionally, by pre-computing seki information, we can save
significant time during the game solving process. For this reason, we propose
constructing a seki database, using the detection method proposed by Niu et
al. [9], to aid with solving 7x7 Killall-Go. In the best case, when using this seki
database, positions that cannot be solved in a day can be solved in just 482 sec-
onds. Our experiments also show that the addition of the database also improves
the overall solving time for general cases, with a 10%-20% reduction in search
time.
3
1 7 21 1 11 17 7 1 5
2 2 8 10 13 3 2 6 4 12
1 1 6 14 9 15 1 10 15 18
5 4 12 16 9 8 14 13 11
19 18 22 20 19 17 20 16
2 Background
A game is considered solved when its game-theoretic value is found, i.e. we know
the outcome under optimal play. Since the search space is often extremely large,
heuristics are often used to guide the search, minimizing the number of winning
moves explored, while simultaneously searching through the shortest game length
that leads to a solution. AlphaZero-like algorithms are known for producing
strong agents that do not necessarily attempt to finish games as quickly as
possible [22], which make them less ideal for game solving. Proof-number search
(PNS) [2], depth-first proof number search (DFPN) [7], and threat-space search
[1] are some common search algorithms that prune unnecessary branches when
solving games, potentially leading to more efficient solutions.
A notable example of a game solved is checkers. Schaeffer et al. [10] used
a distributed solving system comprised of a proof-tree manager and numerous
Solving 7x7 Killall-Go with Seki Database 3
workers. The manager breaks the problem down into tasks, consisting of inter-
esting game positions, which are sent to workers. The workers were each an
instance of a solver with a strong checkers playing program providing heuristic
value. Once a worker finds a solution for a game position, it returns the result
to the manager, which uses that information to construct a solution tree. In
addition to this process – referred to as the forward search – they also computed
a large collection of endgame databases.
We use the online fine-tuning distributed solver [21] in this paper. This sys-
tem follows the manager-worker paradigm. Each solver is a Monte-Carlo tree
search (MCTS) solver [17] that uses a Proof Cost Network (PCN) [22] to provide
heuristics, the Benson [3] algorithm to determine terminal conditions, and the
Relevance-Zone based search [11, 12] to prune irrelevant nodes. During the solv-
ing process, the online trainer continuously fine-tunes the deep learning-based
heuristic to maintain its accuracy. Additionally, the seki database proposed in
this paper can also be thought of as endgame information that can reduce the
search space significantly.
2.3 Seki
In Killall-Go, seki often involves 1) White securing an area; 2) Black occupying
the boundary of the White area, while also attempting to capture white stones
inside it, as shown in Fig. 1c. In the seki area, neither Black nor White can
capture all opponent stones, nor achieve UCA. In fact, whichever player plays
inside the seki area renders their stones vulnerable for capture. Thus, players
can only move outside the seki area or pass when playing optimally.
4 Tsai et al.
A seki situation signifies secure territory, which in turn means White has won.
However, if the search cannot recognize seki, White must satisfy the stronger
condition of UCA to win. Therefore, the only way to arrive at this conclusion is
for Black to play inside the seki area, which might not occur until much deeper
in the search because it is a suboptimal move.
In addition to the local seki described above, there are also global seki, where
the shared liberty is not enclosed. We focus on local seki in this paper, because
global seki are difficult to detect and are much rarer in 7x7 Killall-Go.
Previously, Niu et al. [9] describe the issue of recognizing seki thoroughly
and propose algorithms for recognizing global and local seki. Niu’s local seki
algorithm takes a region as input and generates all legal moves in the region,
including passes. The region is searched twice using DFPN, where Black or
White play first. Where Black plays first, if the result is a win for Black, the
situation is not a seki. Otherwise, if the result is a loss for Black, the situation
can either be seki or a White win. The second search assumes White goes first. If
the result is a White win, the situation is determined to not be seki. Otherwise,
the situation is confirmed to be seki. We omit the more complicated global seki
detection method in this paper.
Gol’berg et al. [5] propose projecting the positional information onto a ma-
trix, which is composed of the shared liberties in the seki. They then describe
mathematical conditions that need to be satisfied to confirm a seki. Wolf [19]
proposes a graph representation that forms a topological description of seki.
However, its usage is limited to situations where all blocks have two liberties.
Wolf [18] also introduces a computer program called GoTools, which includes life
or death analysis, and a large database of single eye patterns. However, to our
knowledge, the database and methods from GoTools have not been extended for
seki detection nor game solving.
Lastly, several efforts were made to classify safe patterns instead of search.
Vilá [16] proposes identifying single eye shapes to help with game solving, dis-
cussing how different eye shapes affect safety in detail. Cazenave [4] generates
a pattern database for Go, focusing on the pattern’s external condition. Adding
external conditions enables each pattern to capture a wider range of board states
without increasing the complexity of the search tree. The motivation is similar
to this paper, but the database in this paper does not consider the external
conditions of patterns.
Solving 7x7 Killall-Go with Seki Database 5
3 Method
In this section, we describe how the seki database is created and how it is used.
First, we enumerate all potential seki patterns for specific area sizes. Second,
each pattern is analyzed via exhaustive search to determine whether they are
seki, where valid entries are stored in the database. Lastly, we describe how the
seki database is integrated into the search algorithm during game solving.
For each generated pattern, we mostly follow Niu et al.’s local seki detection
method [9] to determine whether they are seki. As with Niu et al.’s method,
we search each pattern twice, where Black and White each play first. All can-
didate moves need to be within the seki area. Moves played outside of the area
have no impact, and therefore can be viewed as equivalent to passing; thus, two
consecutive passes no longer ends the game. Following the definition of a seki
(see subsection 2.3), whoever plays inside the area first loses. For this reason, we
prohibit passing as the first move of the search, i.e. the position must change as
a result of the first player’s first move. To avoid perpetual delays, if the position
remains the same due to continual passing from both sides, the first player must
play to change the situation. If the pattern inside the area is a seki, the first
player is guaranteed to lose. Following Niu et al.’s method, if both Black and
White loses as the first player, the area is a local seki. Since the seki database
is generated offline, with no time constraints, we simply implemented this ver-
ification and-or search with depth-first search, instead of the more efficient but
elaborate DFPN algorithm.
6 Tsai et al.
Next, patterns that are verified to be seki are stored into the database. Since
we focus on local seki, we assume that the enclosing white block has no external
liberties and eyes. This means we only have to store the contents of each grid
(empty or occupied by Black).
Hit
seki database
...
Miss
Fig. 2: Querying the seki database. The enclosed area is shaded in gray based on
the last played move (marked with a cross).
eye formed by the enclosing white block may form a seki. Nonetheless, for the
game of Killall-Go, we can guarantee that the edge cases cause negligible impact
to our search performance.
4 Experiments
We perform our experiments on the online fine-tuning solver presented in our
previous paper [21], for which the code is based on the MiniZero framework
[20], only changing the top-k configuration from 4 to 2. Subsection 4.1 provides
statistics related to the generation of the seki database. The online fine-tuning
solver is a distributed solver system that has workers analyzing different positions
in parallel. Subsections 4.2 and 4.3 both investigate how the seki database affects
performance, where the former looks at the whole solving system, from manager
to workers, and the latter looks at job statistics (i.e. only workers).
3 7 5 3 5 4 5
7 1 5 7 1 4 1 1 2 2
3 2 6 4 2 8 3 2 6 4 1 1 3
1 8 1 6 9 1 1 6
9 5 4 8 7
3
1 1 7 6 2 1 1
2 2 3 1 1 3 4 1
1 4 1 4 5 5 1
5 6
during self-play training for our deep learning-based heuristic. Lastly, openings
1 and 2 are frequently used opening moves in Killall-Go. In other words, they
are typical use cases when trying to solve Killall-Go.
Table 2 shows the results of solving each case. First, when not using the seki
database, cases A and B cannot be solved within a day. With the seki database,
they can be solved in 482 and 5,719 seconds, respectively. This demonstrates that
when seki is inevitable, it is significantly more costly, even infeasible, to analyze
without some kind of seki detection method. In a distributed game solver (see
subsection 2.1), the manager sends interesting positions (jobs) to workers to
analyze in parallel. In Table 2, the average job time indicates how much time
each worker spends analyzing these interesting positions. For case A, the average
job time is 246.86 seconds without seki, but 4.89 seconds after using the database.
Note that unsolved jobs will take roughly 420 seconds. This implies that workers
might be stuck in long sequences of capturing and re-capturing. We perform
additional experiments to analyze jobs in subsection 4.3.
Solving 7x7 Killall-Go with Seki Database 9
With the exception of case F, problems C to H are solvable even without the
seki database. However, using it yields a 20% to 50% discount on solving time,
solving nodes, and jobs average time. Only in case C were there a 24.4% increase
in total nodes searched. This was caused by the manager sending more jobs due
to a significant discount on the average job time. In addition, we examined the
search logs and discovered that a matching pattern could indicate either a seki
or the stronger UCA requirement, as explained in subsection 3.3. In Killall-Go,
both seki and UCA indicates a White win. This allows us to skip the Benson
algorithm completely, significantly reducing the time and nodes necessary to
solve the position. Similarly, utilizing the seki database for openings 1 and 2 also
gives a discount of 10.38% and 18.38% for time, respectively. This shows that
the seki database can still be useful when solving typical openings, where seki
may or may not be part of the solution.
In Table 3, jobs with 0 hit rate have a 94.13% solving rate, and the seki
database does not improve the solving rate. However, with only 10% hit rate,
the solving rate without using the seki database drops drastically to 33.87%.
Where the hit rate exceeds 10%, the solving rate without using the seki database
10 Tsai et al.
drops to less than 6.68%. In contrast, when using the database, the solving rate
is higher than 85% in all cases. This shows that when seki are possible, the
database can be tremendously helpful.
5 Conclusion
This paper clearly illustrates that attempting to solve 7x7 Killall-Go without
seki detection is prohibitively costly even for simple positions that may encounter
relatively few seki situations. When encountering positions where seki appears
more than 10% of the time, the solving rate drops to lower than 6.68%. In
the most extreme case, subsection 4.2 demonstrates that previously unsolvable
seki positions can now be solved in just 482 seconds, especially since it avoids
exhaustive seki detection algorithms during runtime.
Even for common openings in Killall-Go, seki knowledge also gives a 10-20%
discount on solving time and nodes. Other than local seki, we could also extend
the database for global seki, edge cases, or relevancy zones [12]. We believe that
the underlying concept of endgame databases such as the database presented in
this paper can also be applied to other applications.
References
1. Allis, L., Herik, H., Huntjens, M.: Go-Moku and Threat-Space Search. Com-
putational Intelligence 12 (Oct 1994)
2. Allis, L.V., van der Meulen, M., van den Herik, H.J.: Proof-number search.
Artificial Intelligence 66(1), 91–124 (Mar 1994)
3. Benson, D.B.: Life in the game of Go. Information Sciences 10(2), 17–29
(Jan 1976)
4. Cazenave, T.: Generation of Patterns With External Conditions for the
Game of Go. Advances in Computer Games (2001)
5. Gol’berg, A., Gurvich, V., Andrade, D., Borys, K., Rudolf, G.: Combina-
torial games modeling seki in GO. Discrete Mathematics 329, 19–32 (Aug
2014)
6. Kishimoto, A., Müller, M.: Search versus Knowledge for Solving Life and
Death Problems in Go. In: Proceedings of the AAAI Conference on Artificial
Intelligence (July 2025)
7. Kishimoto, A., Müller, M.: DF-PN in Go: An application to the one-eye
problem. In: IFIP Advances in Information and Communication Technology.
vol. 135, pp. 125–142 (Jan 2003)
8. Müller, M.: Playing it safe: Recognizing secure territories in computer Go
by using static rules and search. Game Programming Workshop in Japan
’97 25, 80–86 (1997)
Solving 7x7 Killall-Go with Seki Database 11
9. Niu, X., Kishimoto, A., Müller, M.: Recognizing Seki in Computer Go. In:
Advances in Computer Games. pp. 88–103. Lecture Notes in Computer Sci-
ence, Springer, Berlin, Heidelberg (2006)
10. Schaeffer, J., Burch, N., Björnsson, Y., Kishimoto, A., Müller, M., Lake, R.,
Lu, P., Sutphen, S.: Checkers Is Solved. Science 317(5844), 1518–1522 (Sep
2007)
11. Shih, C.C., Wei, T.H., Wu, T.R., Wu, I.C.: A Local-Pattern Related Look-
Up Table. IEEE Transactions on Games pp. 1–10 (2023)
12. Shih, C.C., Wu, T.R., Wei, T.H., Wu, I.C.: A Novel Approach to Solving
Goal-Achieving Problems for Board Games. In: Proceedings of the AAAI
Conference on Artificial Intelligence. vol. 36, pp. 10362–10369 (Jun 2022)
13. Silver, D., Hubert, T., Schrittwieser, J., Antonoglou, I., Lai, M., Guez, A.,
Lanctot, M., Sifre, L., Kumaran, D., Graepel, T., Lillicrap, T., Simonyan,
K., Hassabis, D.: A general reinforcement learning algorithm that masters
chess, shogi, and Go through self-play. Science 362(6419), 1140–1144 (Dec
2018)
14. van den Herik, H.J., Uiterwijk, J.W.H.M., van Rijswijck, J.: Games solved:
Now and in the future. Artificial Intelligence 134(1), 277–311 (Jan 2002)
15. van der Werf, E.C., Winands, M.H.: Solving Go for Rectangular Boards.
ICGA Journal 32(2), 77–88 (Jun 2009)
16. Vilà, R., Cazenave, T.: When One Eye is Sufficient: A Static Classification.
In: Advances in Computer Games: Many Games, Many Challenges, pp. 109–
124. Springer US, Boston, MA (2004)
17. Winands, M.H.M., Björnsson, Y., Saito, J.T.: Monte-Carlo Tree Search
Solver. In: Computers and Games. pp. 25–36. Lecture Notes in Computer
Science, Springer, Berlin, Heidelberg (2008)
18. Wolf, T.: Two Applications of a Life & Death Problem Solver in Go. Journal
of ÖGAI 26(2), 11–18 (Jun 2007)
19. Wolf, T.: Seki with 2 Liberties per Chain in the Game of Go. ICGA Journal
39, 1–20 (Feb 2017)
20. Wu, T.R., Guei, H., Peng, P.C., Huang, P.W., Wei, T.H., Shih, C.C., Tsai,
Y.J.: MiniZero: Comparative Analysis of AlphaZero and MuZero on Go,
Othello, and Atari Games. IEEE Transactions on Games pp. 1–13 (2024)
21. Wu, T.R., Guei, H., Wei, T.H., Shih, C.C., Chin, J.T., Wu, I.C.: Game Solv-
ing with Online Fine-Tuning. In: Advances in Neural Information Processing
Systems. vol. 36 (Feb 2024)
22. Wu, T.R., Shih, C.C., Wei, T.H., Tsai, M.Y., Hsu, W.Y., Wu, I.C.:
AlphaZero-based Proof Cost Network to Aid Game Solving. In: Interna-
tional Conference on Learning Representations (Oct 2021)