• 沒有找到結果。

Drawn k-in-a-row games

N/A
N/A
Protected

Academic year: 2021

Share "Drawn k-in-a-row games"

Copied!
12
0
0

加載中.... (立即查看全文)

全文

(1)

journal homepage:www.elsevier.com/locate/tcs

Drawn k-in-a-row games

Sheng-Hao Chiang

a

, I-Chen Wu

b,∗

, Ping-Hung Lin

b

aNational Experimental High School at Hsinchu Science Park, Hsinchu, Taiwan bDepartment of Computer Science, National Chiao Tung University, Hsinchu, Taiwan

a r t i c l e i n f o Article history:

Received 12 July 2009

Received in revised form 20 January 2011 Accepted 21 April 2011 Communicated by G. Ausiello Keywords: k-in-a-row games Connect6 Hypergraphs

a b s t r a c t

Wu and Huang (2005) [12] and Wu et al. (2006) [13] presented a generalized family of k-in-a-row games, called Connect(m, n, k, p, q). Two players, Black and White, alternately place p stones on an m×n board in each turn. Black plays first, and places q stones initially. The player who first gets k consecutive stones of his/her own horizontally, vertically, or diagonally wins. Both tie the game when the board is filled up with neither player winning. A Connect(m, n, k, p, q) game is drawn if neither has any winning strategy. Given p, this paper derives the value kdraw(p), such that Connect(m, n, k, p, q) games are drawn for all kkdraw(p), m1, n ≥ 1, 0 ≤ qp, as follows. (1) kdraw(p) = 11. (2) For all

p3, kdraw(p) = 3p+3d1, where d is a logarithmic function of p. So, the ratio kdraw(p)/p is approximately 3 for sufficiently large p. The first result was derived with the

help of a program. To our knowledge, our kdraw(p)values are currently the smallest for all

2≤p<1000.

© 2011 Elsevier B.V. All rights reserved. 1. Introduction

A generalized family of k-in-a-row games, called Connect(m, n, k, p, q

)

, [12,13], was introduced and presented by Wu et al. Two players, Black and White, alternately place p stones on empty squares1of an m

×

n board in each turn. Black plays

first, and places q stones initially. The player who first gets k consecutive stones of his/her own horizontally, vertically, or diagonally wins. Both players tie the game when the board is filled up with neither player winning. For example, Tic-tac-toe is Connect(3, 3, 3, 1, 1

)

, Go-Moku in the free style (a traditional five-in-a-row game) is Connect(15, 15, 5, 1, 1

)

, and Connect6 [13], played on the traditional Go board, is Connect(19, 19, 6, 2, 1

)

.

In the past, many researchers have been engaged in solving Connect(m, n, k, p, q

)

games. One player, either Black or White, is said to win a game, if he/she has a winning strategy such that he/she wins for all the subsequent moves. Allis et al. [1,2] solved Go-Moku with Black winning. Herik et al. [9] and Wu et al. [12,13] also mentioned several k-in-a-row games with Black winning.

A game is said to be drawn if neither player has any winning strategy. For simplicity of discussion in this paper, Connect(k,

p

)

refers to the collection of Connect(m, n, k, p, q

)

games for all m

1, n

1, 0

q

p. Connect(k, p

)

is said to be

drawn if all Connect(m, n, k, p, q

)

games in Connect(k, p

)

are drawn. Given p, this paper derives the value kdraw

(

p

)

, such that

Connect(kdraw

(

p

)

, p

)

games are drawn. Since drawn Connect(k, p

)

games also imply drawn Connect(k

+

1, p

)

, the value kdraw

(

p

)

should be as small as possible.

In the past, Zetters [15] derived that Connect(8, 1

)

is drawn. Pluhar [11] derived tight bounds kdraw

(

p

) =

p

+

(

log2p

)

for all p

1000 (see Theorem 1 in [11]). However, the requirement that p

1000 is unrealistic in real games. Thus, it is

Corresponding author. Tel.: +886 3 5731855; fax: +886 3 5733777.

E-mail addresses:jiang555@ms37.hinet.net(S.-H. Chiang),icwu@csie.nctu.edu.tw,icwu@cs.nctu.edu.tw(I.-C. Wu),bhlin@csie.nctu.edu.tw(P.-H. Lin). 1 Practically, stones are placed on empty intersections of Renju or Go boards. In this paper, when we say squares, we mean intersections.

0304-3975/$ – see front matter©2011 Elsevier B.V. All rights reserved.

(2)

for kdraw

(

4

)

. The ratio R

=

kdraw

(

p

)/

p

=

3

+

(

3d

1

)/

p is approximately 3 for sufficiently large p. Section2modifies

the games slightly into those in a different version, named Maker–Breaker. Both Sections3and4will use this version to proveTheorems 1and2, respectively. When compared with a preliminary version [6], this paper derives a tighter bound for

kdraw

(

3

)

and a more general result, specifically as follows. For all the drawn games, Connect(

, ∞

, k, p, p

)

, derived in [6],

this paper also shows that all games in Connect(k, p

)

are also drawn, based on the Maker–Breaker argument. Theorem 1. Connect

(

11, 2

)

is drawn. 

Theorem 2. Consider all p

1. Let d be an integer and P

(

d

1

) <

p

P

(

d

)

, where P

(

d

) =

2d

d

2. Then, Connect

(

3p

+

3d

1,

p

)

games are drawn.  2. Maker–Breaker version

According to the strategy-stealing argument raised by Nash (see [5]), White has no winning strategy in Connect(m, n, k,

p, p

)

, that is, when q

=

p. Therefore, for Connect(m, n, k, p, p

)

, either Black wins or White ties. For simplicity of combinatorial analysis, many researchers [3,7,11] followed an asymmetric version of rules, called Maker–Breaker, where White does not win in all cases (e.g., even if White connects up to k consecutive stones). So, all White can do is to break, that is, to prevent Black from winning (connecting up to k consecutive stones). In contrast to Maker–Breaker, the version with the original rules is called Maker–Maker. Obviously, if White has a strategy to tie a Connect game in the Maker–Breaker version, White can tie the game in the original version (Maker–Maker) by simply following the same strategy. For simplicity of discussion in this paper, let MBConnect(k, p

)

denote the game Connect(

,

, k, p, p

)

in the Maker–Breaker version.Corollary 1shows an important property for MBConnect(k, p

)

.

Corollary 1. Assume that MBConnect

(

k, p

)

is drawn. Then, Connect(k, p

)

is drawn. That is, for all m

1, n

1, 0

q

p, Connect

(

m, n, k, p, q

)

games are drawn. 

The reasons whyCorollary 1is satisfied are as follows.

1. According to the strategy-stealing argument (also mentioned in [13]), if Black has a winning strategy in Connect(m, n, k,

p, q

)

, then Black simply follows the strategy to win in Connect(m, n, k, p, q

+

1

)

. On the other hand, if Black has no winning strategy in Connect(m, n, k, p, q

+

1

)

, then Black has no winning strategy in Connect(m, n, k, p, q

)

either. Similarly, if White has no winning strategy in Connect(m, n, k, p, q

)

, White has no winning strategy in Connect(m, n, k, p, q

+

1

)

.

Assume that Connect(m, n, k, p, p

)

is drawn. Then, Black has no winning strategy in Connect(m, n, k, p, p

)

. From the previous paragraph, we derive that, for all 0

q

p, Black has no winning strategy in Connect(m, n, k, p, q

)

. On the other hand, since White in Connect(m, n, k, p, 0

)

is equivalent to Black in Connect(m, n, k, p, p

)

, White does not win in Connect(m, n, k,

p, 0

)

either. From the previous paragraph, we derive that, for all 0

q

p, White has no winning strategy in Connect(m, n, k, p, q

)

. Thus, since neither has any winning strategy, Connect(m, n, k, p, q

)

games are drawn for all 0

q

p.

2. If Black has a winning strategy in Connect(m, n, k, p, q

)

in the Maker–Breaker version, then Black simply follows the strategy to win in Connect(m

+

1, n, k, p, q

)

, Connect(m, n

+

1, k, p, q

)

, or even Connect(

,

, k, p, q

)

in the Maker–Breaker version. On the other hand, if Black has no winning strategy in Connect(

,

, k, p, q

)

in the Maker–Breaker version, then Black does not win in Connect(m, n, k, p, q

)

in the Maker–Breaker version for all m

1, n

1, either.

Assume that MBConnect(k, p

)

is drawn. For the second reason, for all m

1, n

1, Connect(m, n, k, p, p

)

games are drawn in the Maker–Breaker version, as well as in the original version. For the first reason, Connect(m, n, k, p, q

)

games are drawn for all m

1, n

1

,

0

q

p. Thus, Connect(k, p

)

is drawn andCorollary 1is satisfied.

On the basis of Corollary 1, Sections3 and 4 both simply derive drawn MBConnect(k, p

)

fromTheorems 1 and 2, respectively, instead of deriving drawn Connect(k, p

)

directly. Moreover, to prove both theorems, we also need to define new Maker–Breaker games for smaller boards B, named MBBoard(B, p

)

, inDefinition 1.

Definition 1. MBBoard(B, p

)

is a Maker–Breaker game defined as follows.

1. The game board B is composed of a set of squares and a set of lines, each of which covers a subset of squares. For simplicity of discussion, all lines are (vertically, horizontally, or diagonally) straight and solid in all figures in the rest of this paper, as illustrated inFig. 1.

2. In Move 2i

1, where i

1, Black is allowed to place pstones on the game board B, where p

p. In Move 2i, White

places por fewer stones.

3. Black wins when occupying some line. Note that Black is said to occupy a line if all the squares covered by the line are occupied by black stones. 

(3)

Fig. 1. The game board B2.

Fig. 2. (a) Partitioning the infinite board into disjoint B2. (b) Covering one complete solid line for each segment of 11 consecutive squares. The game MBBoard(B, p

)

is said to be a drawn game if Black has no winning strategy, that is, White has some strategy to prevent Black from winning in all cases.

In the above game, the game board B can be viewed as a kind of hypergraph G [4,8]. All squares in B are vertices in G, while all (solid) lines in B are edges, or so-called hyperedges in G, covering a set of vertices. For example, the board inFig. 1includes 6

×

4 squares with 4 horizontal, 3 vertical, and 6 diagonal lines (from the lower left to the upper right). The corresponding hypergraph includes 24 vertices and 13 (i.e., 4

+

3

+

6) edges, accordingly. In the rest of this paper, we still use the terms game boards, lines, and squares, instead of graphs, edges, and vertices.

3. Proof ofTheorem 1

The infinite board is partitioned into an infinite number of disjoint B2(without overlap and vacancy) as shown inFig. 2(a), where B2is the game board shown inFig. 1. FromLemma 1(below), since MBBoard(B2, 2

)

is drawn, White has some strategy

S such that none of the solid lines are occupied by Black. Let White follow S to play inside each B2. Observed fromFig. 2(b), all segments of 11 consecutive squares vertically, horizontally, and diagonally must cover entirely one solid line among these

B2. Since none of these solid lines are occupied by Black fromLemma 1, none of the segments contain all 11 black stones. Thus, MBConnect(11, 2

)

is drawn. FromCorollary 1, Connect(11, 2

)

is drawn. 

Lemma 1. MBBoard

(

B2, 2

)

is drawn.

Proof. A program was written to verify that none of the solid lines in B2are occupied by Black. The program is briefly described in Section3.2. An intuition is given in Section3.1. 

3.1. Intuition forLemma 1

This subsection gives an intuition for the correctness ofLemma 1. Move 1 (by Black) is classified into the following cases. 1. Black only places one stone in the board, as illustrated inFig. 3(a).

2. Black places two stones.

2.1 Both are placed on the two squares marked ‘‘1’’ inFig. 3(b), called middle squares for this game board. 2.2 One of the two stones is placed on either of the two middle squares.

2.3 Neither of the two stones is placed on the two middle squares.

In Case 2.1, White replies by placing two stones, as shown inFig. 3(b); and in all the other cases, White replies by placing one stone on one of the two middle squares. Here, only Case 1 inFig. 3(a) and Case 2.1 inFig. 3(b) are illustrated. Intuitively, it is hard for Black to occupy a horizontal line, since the horizontal lines contain two more squares than the vertical and diagonal lines. Therefore, let us ignore and remove the horizontal lines for simplicity of analysis.

After Move 2 (by White),Fig. 4shows the boards with active vertical and diagonal lines only. Let an active line be a line that does not yet contain a white stone. Since Black is never able to cover all the squares of some inactive line (not active),

(4)

Fig. 3. The first two moves: (a) in Case 1, and (b) in Case 2.1.

Fig. 4. The active vertical and diagonal lines after Move 2 (by White) in (a) Case 1, and (b) Case 2.1.

inactive lines are irrelevant to the results of games. Hence, the inactive lines can be removed from a board. InFig. 4(a), the middle vertical line and the third diagonal line (from the left) become inactive and get removed after Move 2. InFig. 4(b), the rightmost two vertical lines and the second and fourth diagonal lines (from the left) also become inactive and get removed, similarly.

A game board is called a tree if all the lines form no cycles in the board, as illustrated in both cases inFig. 4.Lemma 2

(below) shows that a game is drawn if its game board is a tree which contains at most one black stone and in which each line covers at least four squares. Thus, fromLemma 2, the two games inFig. 4are drawn.

Lemma 2. In a tree BT, assume that there exists at most one black stone on BTand that each line in BTcovers at least four squares.

Then, MBBoard(BT, 2

)

is drawn.

Proof. Assume that there exists one black stone on some square s. Black cannot win in his/her next move for the following reason. Since Black can place at most two stones in a move, one line contains at most three stones (together with the one on s

)

. Since each line covers at least four squares, Black cannot win in the next move.

Let Black place one stone on another square s′in the next move. Since the game board is a tree, we find at most one path (a sequence of lines) from s to s, and then let White place one stone on one of these lines in the path, if any. (Note that, if

both sand sare on the same line, White simply places a stone on that line.) Thus, B

Tis broken into some trees, each of which

contains at most one black stone. If Black places two stones in the next move, simply use two stones to break the game board as above. Thus, this lemma holds by induction. 

To proveLemma 1rigidly, we also need to consider the case that some horizontal line may be occupied by Black. Thus, the proof for this unfortunately becomes tedious. In practice, we wrote a program to prove it by searching all cases exhaustively, as briefly described in the next subsection.

3.2. Program description forLemma 1

The program to proveLemma 1uses a recursive search routine to search the game space and to find a strategy for White to tie the game. When it is Black’s turn, the search routine searches all possible Black moves exhaustively, and verifies that Black does not win in any of the moves and any of their subsequent moves recursively. For each of these Black moves, the search routine chooses a White move to play such that Black does not win subsequently. The search routine does not search deeper moves when Black occupies some line, or when it is provable that Black has no winning way subsequently, e.g., there are no more active lines.

After running the above program, it was proved that White is able to tie the game. The program searched 1291,140,480 game positions in 17,104 s on a PC with AMD AthlonTM64

×

2 Dual Processor with 5200

+

2.70 GHz. However, for the purpose of publishing the search tree, a method described in [14] was employed to optimize the size of the search tree. Then, under the optimization, the program ran in 37 s and searched 844,618 game positions. The search tree was published in [14].

4. Proof ofTheorem 2

In this proof, similar to that ofTheorem 1, the infinite board is partitioned into an infinite number of disjoint game boards

BZ

(

L

)

and BZ

(

L

)

vertically interleaved without overlap and vacancy, as shown inFig. 6. The game board2BZ

(

L

)

is shown

2 The game board BN(L)is so named in this paper since the board shape consists of many Ns, while the game board BZ(L)is so named since the parts

(5)

(a) BZ(L).

(b) BN(L).

Fig. 5. Two game boards: (a) BZ(L)and (b) BN(L).

Fig. 6. Partitioning the infinite board into disjoint BZ(L).

inFig. 5(a), where each (solid) line covers L squares and the game board extends infinitely to both sides. The game BZ

(

L

)

is a horizontal mirror of BZ

(

L

)

.Fig. 5(b) also shows another similar game board BN

(

L

)

, which will be used in this section.

Let MBBoardZ

(

L

,

p

)

denote the game MBBoard(BZ

(

L

),

p

)

, and MBBoardN

(

L

,

p

)

denote MBBoard(BN

(

L

),

p

)

, for simplicity of

discussion. This proof will show that the following three properties are satisfied. Property 1. If MBBoardZ

(

L

,

p

)

is drawn, then MBConnect

(

3L

1, p

)

is drawn.

Property 2. If MBBoardN

(

L

,

p

)

is drawn, then MBConnect

(

3L

1, p

)

is drawn.

Property 3. Consider all p

1. Let P

(

d

1

) <

p

P

(

d

)

, where P

(

d

) =

2d

d

2. Then, MBBoardN

(

p

+

d

,

p

)

games are drawn.

First,Property 1is satisfied for the following reason. As observed inFig. 6, all segments of 3L

1 consecutive squares vertically, horizontally, and diagonally must contain one whole solid line among these BZ

(

L

)

and BZ

(

L

)

. Assume that the

game MBBoardZ

(

L

,

p

)

is drawn. Then, White has some strategy S such that Black cannot occupy any solid lines inside each

BZ

(

L

)

and BZ

(

L

)

. Thus, by following the strategy S inside each BZ

(

L

)

and BZ

(

L

)

, White prevents Black from occupying any

segment of 3L

1 consecutive squares completely. Thus, MBConnect

(

3L

1

,

p

)

is drawn.

Then, bothProperties 2and3are shown in Sections4.1and4.2, respectively. Section4.1shows that the game board

BZ

(

L

)

is isomorphic to BN

(

L

)

, in the sense of hypergraphs [4,8], and thatProperty 2is satisfied from the isomorphism and

Property 1. Section4.2proves thatProperty 3is satisfied for all MBBoardN games listed inProperty 3. Thus,Theorem 2is satisfied fromCorollary 1,Property 2andProperty 3. 

(6)

(a) BZ(4).

(b) BN(4).

Fig. 7. Coordinate mapping between BZ(4)and BN(4).

4.1. Isomorphism

Both game boards BZ

(

L

)

and BN

(

L

)

are hypergraph isomorphic [4,8] according to the following mapping. Let every L

neighboring vertical or horizontal solid lines be grouped into one zone in both BZ

(

L

)

and BN

(

L

)

, as shown respectively in

Fig. 7(a) and (b). In both game boards, each square has a coordinate (x, y, z

)

, where the square is in the xth column (from the left) and in the yth row (from the top) in zone z. Let each square at (x, y, z

)

on BZ

(

L

)

be mapped into the one at (x, y, z

)

on

BN

(

L

)

when z is even, and at (y, x, z

)

on BN

(

L

)

when z is odd. All solid lines (or hyperedges) on BZ

(

L

)

are mapped into those

on BN

(

L

)

accordingly, except that the ith horizontal line (from the top) of BZ

(

L

)

is mapped to the ith vertical line (from the

left) of BN

(

L

)

in zone z, where z is odd.

Lemma 3. Consider both MBBoardZ

(

L

,

p

)

and MBBoardN

(

L

,

p

)

games over all L and p. Then, MBBoardZ

(

L

,

p

)

is drawn if and only if MBBoardN

(

L

,

p

)

is drawn.

Proof. According to the above mapping from BZ

(

L

)

to BN

(

L

)

, placing one stone at (x, y, z

)

in BZ

(

L

)

is equivalent to placing

one stone at (x, y, z

)

in BN

(

L

)

when z is even, and at (y, x, z

)

when z is odd, and vice versa. Since both BZ

(

L

)

and BN

(

L

)

are

hypergraph isomorphic for the mapping, one solid line of BZ

(

L

)

is occupied by Black if and only if the mapped solid line of

BN

(

L

)

is. Therefore, MBBoardZ

(

L

,

p

)

is drawn if and only if MBBoardN

(

L

,

p

)

is drawn. 

FromLemma 3andProperty 1,Property 2is satisfied.

4.2. Drawn MBBoardN games

This section will prove thatProperty 3is satisfied. First, we introduce the concept of exclusive squares in Section4.2.1, which is used in the remaining subsections. In order to prove that all MBBoardN games are drawn inProperty 3, we derive some initial drawn MBBoardN games in Section4.2.2, and derive induction rules for MBBoardN games in Section4.2.3. Finally, Section4.2.4concludes thatProperty 3is satisfied.

4.2.1. Game boards with exclusive squares

In this subsection, we introduce the concept of exclusive squares, on which Black is not allowed to place stones. The game boards with exclusive squares are defined inDefinition 2(below).

Definition 2. MBBoardX(B, b

)

is a Maker–Breaker game defined as follows.

1. The game board B is the same as that inDefinition 1, except for the following. For each line, one extra square is added as an exclusive square, as illustrated with solid bullets inFig. 8(a)–(c).

2. In Move 2i

1, where i

1, Black is allowed to place any (positive) number of black stones, say p(

1

)

black stones, on

the game board B. However, Black is not allowed to place stones on these exclusive squares. In Move 2i, White is allowed to place por fewer white stones on any squares (including exclusive squares).

3. Black wins if the following condition holds. An active line contains more than b black stones at time t2i(when Black is to play), where i

0. Time tjindicates the moment after Move j and before Move j

+

1, and t0 indicates the initial moment. 

(7)

Fig. 8. Three game boards with exclusive squares (solid bullets). (a) BrecX(m, n). (b) BrecX−(m, n). (c) BNX(L).

Fig. 9. An illustration. (a) The original game board. (b) Partitioned game boards with exclusive squares.

The game MBBoardX(B, b

)

is said to be a drawn game if White has some strategy to prevent Black winning in all cases. The motivation of using exclusive squares is to partition a game board into two or more game boards with exclusive squares and then to useLemma 4(below) to derive some properties from the partitioned game boards. Let us illustrate it by a simple game MBBoard(B, 9

)

as follows. Let the board B contain disjoint lines each with 10 squares (which are not covered by any other lines), as shown inFig. 9(a). Then, partition the board B into two, one named Bleftcontaining 5 squares of each

line and the other Bright containing the other 5, and add exclusive squares to all lines as shown inFig. 9(b). Clearly, both

games MBBoardX(Bleft, 0

)

and MBBoardX(Bright, 0

)

are drawn, for the following reason. Whenever Black places one or more

stones on some line, White places one stone on the exclusive square of the line to defend. FromLemma 4, we obtain that

MBBoard(B, 10

(

0

+

0

) −

1

)

is drawn; that is, MBBoard(B, 9

)

is drawn. Obviously, it is true that MBBoard(B, 9

)

is drawn, from the following observation. Whenever Black places one or more stones on some active line, White places one stone on that line in the next move to make it inactive. Note that Black must leave one square unoccupied in an active line, so White is allowed to place a stone on that line.

Lemma 4. Consider a game board B, where each line covers at least L squares. Partition3the game board B into two disjoint game

boards, B1and B2. Assume that both games MBBoardX

(

B1

,

b1

)

and MBBoardX(B2, b2

)

are drawn and that L

(

b1

+

b2

) >

1.

Then, White has some strategy in MBBoard

(

B

,

L

(

b1

+

b2

) −

1

)

such that each active line in B contains at most b1

+

b2black

stones at all times t2i(when Black is to play), where i

0. Implicitly, MBBoard

(

B

,

L

(

b1

+

b2

) −

1

)

is drawn.

Proof. It suffices to prove by induction that White has some strategy such that each active line in B contains at most b1

+

b2 black stones at all times t2i, where i

0. This implies that MBBoard(B, L

(

b1

+

b2

) −

1

)

is drawn, since Black cannot occupy any active line (at most b1

+

b2black stones) in the next move (at most L

(

b1

+

b2

) −

1 black stones), and each line covers at least L (

(b1

+

b2

) +

L

(

b1

+

b2

) −

1

=

L

1

)

squares.

It is trivial that the induction hypothesis is true initially.

Assume that the induction hypothesis is true at t2i, when Black is to move. Consider Black’s next move. Since Black can place at most L

b1

b2

1 stones in a move, each active line must leave one square unoccupied. Now, investigate the black stones of this move in B1. Since MBBoardX(B1, b1

)

is drawn according to the assumption, White must has some strategy for the game such that each active line contains at most b1black stones in B1at t2i+2. Thus, White simply follows the strategy to place stones at the edge of B1. In the case that White needs to place a stone on the exclusive square in one active line in B1, White uses the following strategy. If the corresponding line in B is inactive (e.g., the line contains a white stone at the edge of B2

)

, simply ignore this line. Otherwise, if it is active, White simply places one stone on the unoccupied square of the line

3 In the partitioning, we assume that each square belongs to either B1or B2and that each pair of squares in either B1or B2is covered by one line if they are also covered by the same line in B.

(8)

Fig. 10. Two cases for BrecX(m, n).

as described above. Note that it does not matter even if the unoccupied square is at the edge of B2. Thus, White ensures that each active line contains at most b1black stones at the edge of B1at t2i+2. Similarly, White also ensures that each active line contains at most b2black stones in B2at t2i+2. Thus, the induction hypothesis is true at t2i+2. 

In this paper, we consider three game boards with exclusive squares, as shown inFig. 8. The first game board, denoted by BrecX

(

m, n

)

and shown inFig. 8(a), consists of m horizontal lines and n vertical lines, each of which contains one extra

exclusive square. The second, denoted by BrecX

(

m, n

)

and shown inFig. 8(b), is the same as BrecX

(

m, n

)

except that the square

at the lower-left corner is removed. The third, shown inFig. 8(c), is the original BN

(

L

)

extended with one exclusive square

for each line. For simplicity, let MBBoardNX(L

,

b) denote the game MBBoardX(BN

(

L

)

, b

)

and BNX

(

L

)

denote the game board

BN

(

L

)

with extra exclusive squares. Three properties related to the above three boards are shown respectively inLemma 5,

Lemma 6, andLemma 7(below).

Lemma 5. MBBoardX(BrecX

(

m, n

)

, 1

)

is drawn over all m and n.

Proof. Let variables

σ

R

(

r

)

and

σ

C

(

c

)

respectively be the number of black stones in the rth horizontal line and that in the

cth vertical line, if still active, and be 0, otherwise. Let variable

σ =

ΣR

σ

R

(

r

) +

ΣC

σ

C

(

c

)

. For this proof, it suffices to prove

that White has a strategy such that

σ ≤

1 at all times t2i(when Black is to play), where i

0.

Assume by induction that

σ ≤

1 at some t2i. Assume that, in Move 2i

+

1, Black places only one stone on square s at row

r and column c. Obviously, Move 2i

+

1 increases

σ

by at most two (one for the vertical line and the other for the horizontal line). That is,

σ ≤

3. White uses the following strategy to make Move 2i

+

2 such that

σ ≤

1 at t2i+2.

1. When

σ ≤

1, simply place a stone randomly on one empty square, if any.

2. When

σ ≤

2, simply choose one active line containing a black stone and block it by placing one white stone on the exclusive square in that line. Then,

σ

is at most 1.

3. When

σ =

3 and an active line contains two black stones, simply block the active line by placing one white stone on the exclusive square in that line. Then,

σ

is at most 1.

4. In the remaining case that

σ =

3 and none of the active lines contains two black stones, assume some

σ

R

(

r

) =

1,

where r

̸=

r, without loss of generality. Thus, the square sat row rand column c (both lines are active) must be empty

(otherwise, we are in Case 3, since two black stones are in the same column). Therefore, simply place one white stone on

s. Since the stone blocks the two active lines in row rand column c,

σ

is back to 1. This is illustrated by Moves 3 and 4 inFig. 10(a).

However, if Black places several black stones, say pblack stones, in Move 2i

+

1, we separate the move into psubmoves,

each with one stone only. Then, White pretends that Black makes submoves one by one, and therefore follows the above strategy to place stones, except for the following case. If White is to place one stone on an empty square sin some submove

M as in Case 4, but one of the subsequent submoves Mplaces one black stone on stoo, the strategy needs to be changed as

follows.

5. Place two white stones respectively on the exclusive squares of the two active lines in row rand column c containing s.

Thus,

σ

is back to 1 too. Thus, for M, White replies by placing no more stones. In this case, the two white stones together

are viewed as a reply to the two black stones at submoves M and M′. This case is illustrated by the example inFig. 10(b). For Move 3, Black places two stones at 3 and 3’. Assume Black to make submoves in the sequence 3 and then 3’. For 3, White cannot reply by placing a stone on 3’, since it will be occupied by Black. Therefore, White places stones on 4 and 4’ to make

σ

back to 1, instead.

From the above strategy,

σ ≤

1 is maintained at all times t2i. Thus, this lemma holds.  Lemma 6. MBBoardX(BrecX

(

m, n

)

, 1

)

is drawn over all m and n.

Proof. This proof is the same as that inLemma 5, except for the first black stone and White’s reply. The first black stone is placed on the board in the following three positions: (1) in the leftmost vertical line, (2) in the bottom horizontal line, and (3) in the rest of the rectangle. In Case 1, let White reply by placing one white stone on the leftmost vertical line as shown inFig. 11(a), thus making this vertical line inactive. Now, the variable

σ

is only 1. Then, we simply follow the strategy described inLemma 5to maintain

σ ≤

1. Similarly, in Case 2, let White reply by placing one on the bottom horizontal line. In Case 3, let White place one on the leftmost vertical line without loss of generality, while blocking the first black stone in

(9)

Fig. 11. (a) and (b): Two cases for BrecX−(m,n)in and (c) another case for the board missing two corner squares.

Fig. 12. The case that Black already occupies Lp stones on an active line.

the same horizontal line as shown inFig. 11(b). Similarly, since the variable

σ

is only 1, simply follow the strategy described inLemma 5to maintain

σ ≤

1. Thus, White is able to maintain

σ ≤

1 in all cases. That is, MBBoardX

(

BrecX

(

m

,

n

),

1

)

is

drawn. (Note that we may not maintain

σ ≤

1 when two corner squares are missing, as illustrated inFig. 11(c).)  Lemma 7. As described above, assume that the game MBBoardN

(

L

,

p

)

is drawn. Then, MBBoardNX

(

L, L

p

1

)

is drawn.

Proof. Since MBBoardN

(

L

,

p

)

is drawn, White has a strategy S such that all active lines have at most L

p

1 black stones at all times t2i(when Black is to play). Otherwise, if an active line contains at least L

p black stones, Black wins by simply placing p stones on this line, as illustrated inFig. 12.

In the game MBBoardNX

(

L

,

L

p

1

)

, assume that Black still places at most p black stones in Move 2i

+

1, where i

0. Then, White simply follows strategy S (without placing stones on exclusive squares) such that all active lines in BNX

(

L

)

contain at most L

p

1 black stones at all times t2i+2(when Black is to play).

Assume that Black makes a move with more than p black stones. We separate the move into several submoves, each with at most p black stones. Then, White pretends that Black makes submoves one by one, and for each submove simply follows

S to play, but with the following exceptional case. By following S, assume that White needs to make a submove on some

empty squares, but some subsequent Black submoves will place stones on these empty squares. Without loss of generality, assume that White makes a submove M on an empty square s, but some subsequent Black submove Mwill place a stone

on s. Then, the strategy is changed as follows.

1. Place two white stones respectively on the exclusive squares of the two lines containing s, instead. The reason is similar to that in Case 5 inLemma 5. Both lines containing s are no longer active. Let the black stone at s be added into M and removed from M. Thus, the reply to M still prevents Black from having active lines with more than L

p

1 black

stones. Although the reply to M uses one more stone, M has one more stone on s too.

Thus, all active lines in the game MBBoardNX

(

L, L

p

1

)

have at most L

p

1 black stones at all t2i(when Black is to play). That is, MBBoardNX

(

L, L

p

1

)

is drawn. 

4.2.2. Initial drawn games

In this subsection, initial MBBoardN(4, 1

)

, MBBoardNX(2, 1

)

and MBBoardNX(3, 2

)

games are shown to be drawn in

Lemma 8,Lemma 9, andLemma 10respectively. Lemma 8. MBBoardN

(

4, 1

)

is drawn.

Proof. Let us transform BN

(

4

)

into BN

(

4

)

by shortening the solid lines, as shown inFig. 13. Since BN

(

4

)

is a tree and there

are no black stones initially, BN

(

4

)

is drawn, fromLemma 2. Obviously, this implies that BN

(

4

)

with extra longer lines is

drawn too. 

(10)

Fig. 13. (a) BN(4). (b) BN−(4), the same as BN(4)except that all the solid lines are shortened.

Fig. 14. (a) BNX(2). (b) The tree broken by White, Move 2. (c) The tree broken by White, Move 4.

Fig. 15. (a) BNX(3). (b) BNX(3)occupied by some black stones initially.

Fig. 16. Partitioning BN(2L+1)into dark gray and light gray zones.

Proof. The game board BNX

(

2

)

is a tree, as shown inFig. 14(a). First, we assume that Black places one stone for each move.

It suffices to prove that White has a strategy such that at all times t2i(when Black is to play) each of the trees (formed by all the active lines) satisfies that only the leftmost (active) line, if it exists, contains one black stone. For example, inFig. 14(b), for Move 1 (by Black), Move 2 (by White) blocks the diagonal line on Move 1; and inFig. 14(c), for Move 3, Move 4 blocks the vertical line containing the stone of Move 3. Thus, it is easy to see that no active lines contain two black stones at all times t2i. If Black places several stones in one move, we simply pretend that Black places stones one at a time. White simply follows the above strategy without being disturbed by Black’s multi-stone moves, since White replies by placing stones on exclusive squares where Black cannot place stones. Thus, MBBoardNX

(

2

,

1

)

is drawn. 

Lemma 10. MBBoardNX

(

3, 2

)

is drawn.

Proof. For game board BNX

(

3

)

as shown inFig. 15(a), assume that all squares above the bottom exclusive squares are initially

occupied by black stones, as shown inFig. 15(b). By ignoring these squares with black stones, the game board becomes

BNX

(

2

)

. FromLemma 9, at all times t2i(when Black is to play), Black occupies at most one of the remaining two squares plus the one already shown inFig. 15(b), that is, at most two. Thus, MBBoardNX(3, 2) is drawn. 

4.2.3. Induction rules

In this subsection, four induction rules are shown inLemma 11,Lemma 12,Lemma 13, andLemma 14respectively. Lemma 11. Assume that MBBoardNX

(

L, b

)

is drawn, where 0

<

b

<

L. Then, MBBoardN

(

2L

+

1

,

2L

b

1

)

is drawn too.

Proof. Partition the game board BN

(

2L

+

1

)

into dark gray and light gray game boards, as shown inFig. 16. Half of the dark gray board can be squeezed into BN

(

L

)

, as shown inFig. 17. The light gray game board is the union of disjoint BrecX

(

L

+

1,

L

+

1

)

. Since MBBoardNX

(

L, b

)

is drawn from the assumption and MBBoardX(BrecX

(

L

+

1, L

+

1

)

, 1

)

is drawn fromLemma 5,

MBBoardN

(

2L

+

1

, (

2L

+

1

) − (

b

+

1

) −

1

) =

MBBoardN

(

2L

+

1

,

2L

b

1

)

is drawn fromLemma 4.  Lemma 12. Assume that MBBoardNX

(

L, b

)

is drawn, where 0

<

b

<

L. Then, MBBoardN

(

2L

+

2, 2L

b

)

is drawn too.

(11)

Fig. 17. (a) Half of the dark gray game board. (b) Squeezing the game board in (a) into a BN(L).

Fig. 18. Partitioning BN(2L+2)into light gray and dark gray zones.

Table 1

List of drawn MBBoardN games derived from Property 4, where 2p≤4. Drawn games Drawn games derived fromLemma 11orLemma 12. MBBoardNX(2, 1) → MBBoardN(5, 2)and MBBoardN(6, 3)

MBBoardNX(3, 2) → MBBoardN(7, 3)and MBBoardN(8, 4)

Table 2

List of drawn MBBoardN games derived from Property 5, where 5p≤13. Drawn games Drawn games derived fromLemmas 13and14. MBBoardN(4, 1) → MBBoardN(9, 5)and MBBoardN(10, 6) MBBoardN(5, 2) → MBBoardN(11, 7)and MBBoardN(12, 8) MBBoardN(6, 3) → MBBoardN(13, 9)and MBBoardN(14, 10) MBBoardN(7, 3) → MBBoardN(15, 10)and MBBoardN(16, 11) MBBoardN(8, 4) → MBBoardN(17, 12)and MBBoardN(18, 13)

Proof. This proof is similar to that inLemma 11, except that BrecX

(

L

+

2, L

+

2

)

is used (instead of BrecX

)

and some lines

marked in dashed boxes inFig. 18are covered by two BrecX

(

L

+

2

,

L

+

2

)

. For the lines covered by two BrecX

(

L

+

2

,

L

+

2

)

,

since each active line in BrecX

(

L

+

2, L

+

2

)

contains at most one black stone, each of these lines, if active, contains at most

two black stones when Black is to play. For the other lines, we can still useLemma 4to derive that each line, if active, contains at most b

+

1 black stones when Black is to play. Since b

+

1

2, all lines contain at most b

+

1 black stones when Black is to play. Thus, the game MBBoardN

(

2L

+

2

, (

2L

+

2

) − (

b

+

1

) −

1

) =

MBBoardN

(

2L

+

2

,

2L

b

)

is drawn. 

Lemma 13. Assume that MBBoardN

(

L

,

p

)

is drawn. Then, MBBoardN

(

2L

+

1, L

+

p

)

is drawn too.

Proof. Since MBBoardN

(

L

,

p

)

is drawn, MBBoardNX

(

L, L

p

1

)

is drawn fromLemma 7. FromLemma 11, MBBoardN

(

2L

+

1, 2L

(

L

p

1

) −

1

) =

MBBoardN

(

2L

+

1

,

L

+

p

)

is drawn. Thus, this lemma holds. 

Lemma 14. Assume that MBBoardN

(

L

,

p

)

is drawn. Then, MBBoardN

(

2L

+

2, L

+

p

+

1

)

is drawn too.

Proof. Since MBBoardN

(

L

,

p

)

is drawn, MBBoardNX

(

L, L

p

1

)

is drawn fromLemma 7. FromLemma 12, MBBoardN(2L

+

2, 2L

(

L

p

1

)) =

MBBoardN

(

2L

+

2

,

L

+

p

+

1

))

is drawn. Thus, this lemma holds. 

4.2.4. The proof forProperty 3

This subsection concludes inLemma 15thatProperty 3is satisfied. Lemma 15. Property 3is satisfied.

Proof. Initially, the three games, MBBoardN(4, 1

)

, MBBoardNX(2, 1

)

and MBBoardNX(3, 2

)

, are shown to be drawn in

Lemma 8,Lemma 9, andLemma 10, respectively. FromLemma 11orLemma 12, we obtain the drawn MBBoardN games, for all 2

p

4, as shown inTable 1. Then, fromLemmas 13and14, we obtain the drawn MBBoardN games, for all 5

p

13, as shown inTable 2. By induction, all the remaining drawn MBBoardN games inProperty 3can be derived from

(12)

Connect(m, n, k

,

p, q

)

for all k

k

,

m

1, n

1

,

0

q

p. In contrast, the best known result [10] in the past was drawn Connect(15, 2

)

.

This paper shows that Connect(kdraw

(

p

),

p

)

games are drawn for all p

3, where kdraw

(

p

) =

3p

+

3d

1 and d is a

logarithmic function of p. Specifically, d is an integer such that P

(

d

1

) <

p

P

(

d

)

and P

(

d

) =

2d

d

2. The values

kdraw

(

p

)

derived in this paper are currently the smallest for all 2

p

<

1000 (the value is the same as that in [10] when

p

=

4

)

.

Although this paper presents tighter bound for k, many interesting problems are still open. The following are two examples.

Derive lower kdraw

(

p

)

for p

<

1000, especially for small p, e.g., 1

p

10. These problems are more realistic in real

games. For example, Connect(5

,

1

)

favors Black [1,2], while Connect(8, 1

)

is drawn [17]. There is still a gap between 5 and 8.

When p

=

2, the gap is even wider. Currently, the conjecture by most Connect6 players are that Connect6, Connect(19, 19, 6, 2, 1), is drawn, and that Black wins in Connect(19, 19, 6, 2, 2). Both are still open problems. A search approach similar to those in [15,16] is perhaps helpful to solve the latter. However, from our experiences, it is very difficult to use the search approach to solve the former. It is also an important open problem to solve all Connect(n

,

2), where 7

n

10.

Derive general tighter bounds than those in this paper and those in [11] simultaneously.

Acknowledgements

The authors would like to thank the National Science Council of the Republic of China (Taiwan) for financial support of this research under contract numbers NSC 95-2221-E-009-122-MY2 and NSC 97-2221-E-009-126-MY3. The authors would also like to thank Po-Ting Chen for his assistance with the program inTheorem 1and the anonymous referees for their valuable comments.

References

[1] L.V. Allis, Searching for solutions in games and artificial intelligence. Ph.D. Thesis, University of Limburg, Maastricht, the Netherlands, 1994. [2] L.V. Allis, H.J. van den Herik, M.P.H. Huntjens, Go-moku solved by new search techniques, Computational Intelligence 12 (1996) 7–23. [3] J. Beck, On positional games, Journal of Combinatorial Theory Series A 30 (1981) 117–133.

[4] C. Berge, Graphs and Hypergraphs, North Holland, Amsterdam, 1973.

[5] E.R. Berlekamp, J.H. Conway, R.K. Guy, Winning Ways for your Mathematical Plays, vol. 3, 2nd ed., A K Peters. Ltd, Canada, 2003.

[6] S.-H. Chiang, I-C. Wu, P.-H. Lin, On drawn k-in-a-row games, in: The 12th Advances in Computer Games Conference, ACG12, Pamplona, Spain, May 2009.

[7] L. Csirmaz, On a combinatorial game with an application to Go-moku, Discrete Mathematics 29 (1980) 19–23. [8] R. Diestel, Graph Theory, 2nd edition, Springer, New York, 2000.

[9] H.J. van den Herik, J.W.H.M. Uiterwijk, J.V. Rijswijck, Games solved: now and in the future, Artificial Intelligence 134 (2002) 277–311. [10] M.-Y. Hsieh, S.-C. Tsai, On the fairness and complexity of generalized k-in-a-row games, Theoretical Computer Science 385 (2007) 88–100. [11] A. Pluhar, The accelerated k-in-a-row game, Theoretical Computer Science 270 (1–2) (2002) 865–875.

[12] I-C. Wu, D.-Y. Huang, A new family of k-in-a-row games, in: The 11th Advances in Computer Games, ACG11, Conference, Taipei, Taiwan, 2005. [13] I-C. Wu, D.-Y. Huang, H.-C. Chang, Connect6, ICGA Journal 28 (4) (2006) 234–242.

[14] I-C. Wu, P.-H. Lin, Search tree for drawn Connect(11, 2). Available athttp://www.connect6.org/articles/drawn-connect-games/.

[15] I.-C. Wu, P.-H. Lin, Relevance-zone-oriented proof search for Connect6, IEEE Transactions on Computational Intelligence and AI in Games 2 (3) (2010) 191–207.

[16] I-C. Wu, H.-H. Lin, P.-H. Lin, D.-J. Sun, Y.-C. Chan, B.-T. Chen, Job-Level Proof-Number Search for Connect6. in: The International Conference on Computers and Games 2010, CG2010, Kanazawa, Japan, September 2010.

數據

Fig. 1. The game board B 2.
Fig. 4. The active vertical and diagonal lines after Move 2 (by White) in (a) Case 1, and (b) Case 2.1.
Fig. 5. Two game boards: (a) B Z ( L ) and (b) B N ( L ) .
Fig. 7. Coordinate mapping between B Z ( 4 ) and B N ( 4 ) .
+6

參考文獻

相關文件

In JSDZ, a model process in the modeling phase is treated as an active entity that requires an operation on its data store to add a new instance to the collection of

command tells Vim to run the text through a UNIX command.The ‘a tells the editor that the text to be worked on starts at the current line and ends at mark a.. The command that

We obtain several corollaries regarding the computational power needed by the row player to guarantee a good expected payoff against randomized circuits (acting as the column player)

If the points line on the 45 o line then the skewness and excess kurtosis seen in the stochastic residuals is the same as that of a standard normal distribution, which indicates

An n×n square is called an m–binary latin square if each row and column of it filled with exactly m “1”s and (n–m) “0”s. We are going to study the following question: Find

The first row shows the eyespot with white inner ring, black middle ring, and yellow outer ring in Bicyclus anynana.. The second row provides the eyespot with black inner ring

If that circle is formed into a square so that the circumference of the original circle and the perimeter of the square are exactly the same, the sides of a pyramid constructed on

That, if a straight line falling on two straight lines makes the interior angles on the same side less than two right angles, the two straight lines, if produced indefinitely, meet