Phutball is PSPACE-hard

We consider the $n\times n$ game of Phutball. It is shown that, given an arbitrary position of stones on the board, it is a PSPACE-hard problem to determine whether the specified player can win the game, regardless of the opponent's choices made duri…

Authors: **Dariusz Dereniowski** – Department of Algorithms, System Modeling, Gdańsk University of Technology

Phutball is PSPACE-hard
Phutball is PSP A CE-hard Dariusz Derenio wski Department of Algorithms and System Modeling, Gda ´ nsk Uni v ersity of T echnology , Poland deren@eti.pg.gda.pl October 23, 2018 Abstract: W e consider the n × n game of Phutball. It is shown that, given an arbitrary position of stones on the board, it is a PSP A CE-hard p roblem to determi ne whether the specified player can win the game, re gardless of the op- ponent’ s choices made during the game. Keyw ords: computational complexity , games, Phutball, Pspace hardness 1 Introduction There is a dee p mathematical t heory de veloped for analyzing combinatorial games [1, 8]. The researchers work on the algorithmi c techniques which are useful for finding good game strategies for man y board games, including Phutball [4, 5]. The paper [6] introduces t he notion of generalized threads and this techni que is used to so lve some Go instances and the author s uggest th at this approach could be e ff ective for other bo ard games, li ke Phutball. T .Cazena ve used an approach called Gradual Abstract Proof Search to sho w that 11 × 11 Phutball is a win for the first player [7]. The gam e is l oopy , i.e. it i s possible to obtain a configuration of stones which already appeared in one of the pre vious tu rns – so me combinatorial aspects of loopy games were considered in [24]. In this paper we ar e interested in the complexity of the game rather than in manipulating and analyzing the rooted tree describing the game. Se veral generalizations of one-player games turns out 1 to be NP-complete: Peg Solitaire [26], Minesweeper (the probl em of testing con - sistency) [20], Same Game [3]. Howe ve r , m ost of the board gam es (especially two-player games) appear to be harder: Checkers [23], Hex (a generalization to graphs) [13], Othello (Rev ersi) [19], Sokoban [9], Go [21, 2 2, 27], Dy son T ele- scopes [12], Rush Hour [14] or Amazons [16]. The Phutball [2] game is usu ally played on a 19 × 19 Go bo ard. I nitially a black stone is placed in the middl e of the board. The players m ake their moves alternately . A player mak es his mov e by either placing a white stone in an unoccu- pied position , or makes a sequence of jump s over horizontal, vertical or diagonal sequences of whit e stones. Each jump is performed by moving the black ston e, called ball , ove r a li ne of white stones (no empty space between the ball and the line is allowed if we want to make a ju mp) and placing the ball on the board on the first unoccupied position after the last white s tone in the line. Th e white stones are removed from the bo ard im mediately after the j ump. Each player tries to m ove the ball on or o ver the opponent’ s goal line . The goal lines are tw o opposi te edges of the board. W e consid er a natural generalization with an arbitrary s ize of the board and initially a black stone placed in the middle of the board. As in dicated i n [2], Phut ball is not the kind of gam e where you can expect a complete analysis. The authors in [17] considered a s implified version o f the game, i.e. t he case where there is only one dimensi on and it turns out that ac- cording to th e presented examples, the o ne-dimensional version stil l seems to be hard to analyze. Moreover , given an arbitrary positi on in the 2-dimensional Phut- ball gam e, i t is an NP-complete probl em to determine whether the current player can win the game i n his next move [11]. Howe ver , as ind icated in sev eral papers [7, 10, 11, 18], t he com plexity of the Phutball game is stil l o pen. In this paper we place the prob lem of determin ing whether th e current player has a winni ng strategy in the class of P SP A CE-hard problems. 2 A graph game W e st art this section by describing the rules of a game played on a graph. Then we prov e that this game is PSP A CE-hard. The graph constructed on the basis of a problem known to be PSP A CE-complete is defined in such a way that its topology allows to code it as a configuration of stones in the Phutball game. The game described in the following is played on a d irected graph. For com - pleteness we list here some basi c definiti ons. A d irected graph G is a pair G = ( V ( G ) , E ( G )) with a verte x set V ( G ) and a set of directed edges E ( G ) (each e ∈ 2 E ( G ) is an ordered p air of t wo v ertices). W e say that H is a s ubgraph o f G , H ⊆ G , if V ( H ) ⊆ V ( G ) and E ( H ) ⊆ E ( G ). A di r ected path P = ( { v 1 , . . . , v n } , E ( P )) from v 1 to v n is a graph with edge set E ( P ) = { ( v i , v i + 1 ) : i = 1 , . . . , n − 1 } . The vertices V ( P ) \ { v 1 , v n } are the internal vertices of P . The input of the game is a directed graph G = ( V ( G ) , E ( G )), a set C ⊆ V ( G ), a verte x s ∈ C , and a relation R ⊆ V ( G ) × E ( G ) between the vertices and t he edges of G . If ( v , e ) ∈ R then we say that a vertex v is pointing an edge e . Denote b y R − 1 ( E ( G )) the set of vertices v for which there exists e ∈ E ( G ), such that ( v , e ) ∈ R . The players of the game wil l be called ∃ - player and ∀ - player . W e will also use a notation that if a symbol X refers to one of the players th en X is the other player . At each point of the game there is a unique active vertex . The players m ust follow the rules: Rule 1 ( initialization ). The ∃ -player s tarts t he game. Initially s is the activ e verte x. Rule 2 ( a move ). Let u ∈ C be the active vertex. The current player X selects a verte x v ∈ C ∪ R − 1 ( E ( G )) and a directed path P ⊆ G from u to v such that all internal vertices of P are in V ( G ) \ ( C ∪ R − 1 ( E ( G ))). Th e edges of P are removed from G , v becomes the active verte x, and X becomes the current player . W e say that X moves fr om u to v . Rule 3 ( game end ). If the current player cannot make a move, i.e. there is no directed path P from the activ e vertex to a vertex v ∈ C ∪ R − 1 ( E ( G )), then the current player loses the game. If the current player moves from u to v ∈ R − 1 ( E ( G )) then he wins the game. Let us recall the PSP A CE-complet e Quantified Boolean F ormula ( QBF ) prob- lem [25]. Give n a formula Q in the form Q 1 x 1 · · · Q n x n F ( x 1 , . . . , x n ) , decide whether the formu la is true, where Q i ∈ {∃ , ∀} for i = 1 , . . . , n . In our case we us a restricted case of thi s problem where Q 1 = ∃ , Q i + 1 , Q i for i = 1 , . . . , n − 1, the inte ger n is e ven, and F is a 3CNF formula, i.e. F = F 1 ∧ F 2 ∧ · · · ∧ F m , where F i = ( l i , 1 ∨ l i , 2 ∨ l i , 3 ) and each literal l i , j is a variable or the negation of a variable, i = 1 , . . . , m , j = 1 , 2 , 3. Giv en Q , we create a directed graph G . For each variable x i define the corre- sponding va riable component G ( x i ): V ( G ( x i )) = { a i , b i , c i , d i , e i , f i , g i } , 3 E ( G ( x i )) = { ( a i , b i ) , ( a i , c i ) , ( b i , e i ) , ( c i , f i ) , ( e i , d i ) , ( f i , d i ) , ( d i , g i ) } , for i = 1 , . . . , n . W e connect the variable components in such a way t hat ( g i , a i + 1 ) ∈ E ( G ) for each i = 1 , . . . , n − 1. Then we define the formula component G ( F ): V ( G ( F )) = { x i , y i , z i : i = 1 , . . . , m } ∪ { w i , j : i = 1 , . . . , m , j = 1 , 2 , 3 } , E ( G ( F )) = { ( x i , y i ) , ( y i , z i ) , ( z i , w i , 1 ) , ( w i , 1 , w i , 2 ) , ( w i , 2 , w i , 3 ) : i = 1 , . . . , m }∪ { ( x i , x i + 1 ) : i = 1 , . . . , m − 1 } . Fig. 1( a ) sho ws the formula component while Fig. 1( b ) giv es the v ariable compo- nent. T o finish t he constructi on of G let ( g n , x 1 ) ∈ E ( G ) and introduce a vertex g 0 a i b i . . . . . . x 1 y 1 y m z 1 z 2 z m − 1 z m y m − 1 y 2 x 2 x m − 1 x m w 1 , 1 w 2 , 1 w 2 , 2 w 2 , 3 w m − 1 , 1 w m − 1 , 2 w m − 1 , 3 w m , 1 w m , 2 w m , 3 c i f i d i e i g i ( a ) ( b ) w 1 , 2 w 1 , 3 Figure 1: The graphs ( a ) G ( F ) and ( b ) G ( x i ) connected to the graph in such a way that ( g 0 , a 1 ) ∈ E ( G ). The input t o ou r graph gam e is the directed graph G d efined above, the set C = { g 0 , . . . , g n − 1 } ∪ { z 1 , . . . , z m } , s = g 0 and R containing a pair ( w i , j , ( b l , e l )) (respectiv ely ( w i , j , ( c l , f l ))) for i ∈ { 1 , . . . , m } , j ∈ { 1 , 2 , 3 } , l ∈ { 1 , . . . , n } , i ff l i , j = x l ( l i , j = x l , resp.). Observe t hat initial ly R − 1 ( E ( G )) contain s all the vertices w i , j , i = 1 , . . . , m , j = 1 , 2 , 3, because a vertex w i , j corresponds to the lit eral l i , j , which equals x l or x l for s ome l ∈ { 1 , . . . , n } . Howev er , during the gam e the set R − 1 gets smaller due to the fact that some of the edges of G are remove d from G . All the edges of the graph have v ertical and hori zontal orientations (as shown in Figs 1 and 2) and the lines of st ones in the Phutball game corresponding to t he edges of the graph will preserve this topol ogy . 4 Let us consider t he following complete example of o ur reduction . Giv en a formula Q ∃ x 1 ∀ x 2 ∃ x 3 ∀ x 4 ( x 1 ∨ x 2 ∨ x 3 ) ∧ ( x 2 ∨ x 3 ∨ x 4 ) ∧ ( x 1 ∨ x 2 ∨ x 4 ) , (1) Fig. 2 depicts the correspon ding g raph G . The dashed arcs represent the ele- ments of the relation R , the vertices in C are deno ted as white nodes, whi le t he vertices in V ( G ) \ C are the black nodes. Note t hat for each vertex w i , j there is exactly one element ( w i , j , e ) ∈ R . Since t he ∃ -player starts the game and the ac- x 1 y 2 x 2 x 3 y 1 G ( x 2 ) G ( x 4 ) G ( x 3 ) G ( x 1 ) y 3 z 2 g 0 z 1 z 3 w 3 , 1 w 2 , 2 w 1 , 1 w 1 , 2 w 2 , 3 w 3 , 2 w 1 , 3 w 3 , 3 w 2 , 1 Figure 2: A complete instance of the graph G corresponding to the formula in (1) tiv e vertex is g 0 , two moves are possible, i.e. V ( P ) contains g 0 , a 1 , b 1 , e 1 , d 1 , g 1 or g 0 , a 1 , c 1 , f 1 , d 1 , g 1 . After the move w 1 , 3 or w 3 , 3 does n ot belong to the s et R − 1 ( E ( G )), respectively . The game o btained in the reduction has a sp ecial structure, which m akes it quite easy to analyze. Here we list three straightforward facts describing the s truc- ture of the game. Fact 1 If the activ e vertex is g i − 1 , i ∈ { 1 , . . . , n } then the current player makes a move from g i − 1 to g i and the directed path P removed from G contains one of the following sequences of edges: ( g i − 1 , a i ) , ( a i , b i ) , ( b i , e i ) , ( e i , d i ) , ( d i , g i ) , (2) ( g i − 1 , a i ) , ( a i , c i ) , ( c i , f i ) , ( f i , d i ) , ( d i , g i ) . (3) Furthermore, the ∃ -player makes such a move for i = 1 , 3 , 5 . . . , n − 1 while the ∀ -player makes this mov e f or i = 2 , 4 , 6 , . . . , n (recall that n is e ven). ✷ 5 Fact 2 Let g n be the activ e vertex. The ∀ -player is the current pl ayer and he makes a mov e from g n to a vertex z i and the path P contains the edges ( g n , x 1 ) , ( x 1 , x 2 ) , . . . , ( x i − 1 , x i ) , ( x i , y i ) , ( y i , z i ) , (4) where i ∈ { 1 , . . . , m } . ✷ Fact 3 Assu me that z i , i ∈ { 1 , . . . , m } , is the current verte x. The ∃ -player is the current pl ayer . If th ere exists such a vertex w i , j that ( w i , j , e ) ∈ R and e ∈ E ( G ) then ∃ -player wi ns the game. Otherwise he cannot m ake a m ove and he loses the game. ✷ Theor em 1 The above graph game is PS P A CE -hard. Pr oof: W e show that the ∃ -player has a w inning strategy if and only if the corre- sponding qu antified formula Q is true. If we w rite e ∈ E ( G ) then we mean that e is an edge of G at the current stage of the game. First, ass ume that the formula is true. Define th e st rategy as follows. If the activ e v ertex is g i − 1 and the v ariable x i , i ∈ { 1 , 3 , 5 , . . . , n − 1 } i s true (in an assign- ment of Boolean values to the variables forcing F to b e true) then the ∃ -player tra verses the sequence of edges as stated in (3). Ot herwise the ∃ -player traverses the edges listed in (2). By Fact 2, th e ∀ -player cho oses in his last move an index i ∈ { 1 , . . . , m } and ends t he m ove at a verte x z i . Since F is true, F i is true, and consequently , there exists a literal l i , j , j ∈ { 1 , 2 , 3 } , which is true. If l i , j = x l for some l ∈ { 1 , . . . , n } , then x l is true which implies that ( b l , e l ) ∈ E ( G ). Moreover , by the definition of R , w i , j is pointing ( b l , e l ). Similarly , if l i , j = x l for l ∈ { 1 , . . . , n } , then x l is false, so ( c i , f i ) ∈ E ( G ) and ( w i , j , ( c i , f i )) ∈ R . So, for each choice of i by the ∀ -player there exists a vertex w i , j pointing an edge of G . So, th e ∃ -player has a win. Assume now that ∃ -player has a winning strategy . W e p rove that the formula Q is true. If the ∃ -player trav erses the edges in (2) in order to re ach g i then define x i to be f als e, otherwise let the value of x i be set t o true. Then the ∀ -player choos es any of the paths (2) or (3) which corre sponds to setting an arbitrary Boolean v alue to the va riable x i + 1 quantified by ∀ . When the Bool ean va lues hav e been assigned to t he variables then, by Fact 2, the ∀ -player chooses a vertex z i . Since the ∃ -player has a winning strategy , by Fact 3, at least one of the vertices w i , j , j ∈ { 1 , 2 , 3 } , is pointing an edge which still belongs to G . By Fac t 3, the literal l i , j of F i is true. Since i has been chosen arbitrarily , the formula F is true. ✷ 6 3 T ransf ormat ion of G to the Phutball game In the following we transform t he input to t he graph game, i.e. a directed graph G , a s et C ⊆ V , a starting vertex s and a relation R , defined in Section 2, into a configuration of stones of the Phutball game. Note that we do not give a reduc- tion between the two problems, but we only show how to code a well structu red instances of the graph game. This, t ogether w ith Theorem 1, will gi ve a desired reduction from the QBF p roblem to the Phutball game. For bre vit y we will use t he symbols from the previous section used to denote the vertices of G to refer to the points on the board ( see e.g. Fig. 3( a )). Only the vertices in C will be coded using special gadgets. Because of the direct correspondence between the vertices of G and the fields on the Phutball board we w ill use the labels used for the vertices to denote the fields. It will be clear from t he context whether we refer to a vertex or to a point on the board. Let the upper (respectively lower) edge of the board be th e ∀ -player’ s ( ∃ - player’ s, resp.) goal l ine. The vertices in V ( G ) \ C are coded as t he empty points on the board. W e will choose those empty poi nts in such a way t hat if there is an edge ( u , v ) ∈ E ( G ) then the points correspondi ng to u and v wi ll h a ve the same horizon tal or vertical coordinates . The edges of the graph correspond to the (horizontal or vertical) sequences of stones. The starting vertex is also coded as an empt y spot and it initi ally contains the ball. The con figuration of stones corresponding to the variable component G ( x i ) for i = 1 , 3 , 5 , . . . , n − 1 is given in Fig. 3( a ) while the Fig. 3( b ) gives the v ariable component for i = 2 , 4 , 6 , . . . , n . In all the figures of this s ection, the dots end ing a vertical line of stones indicate 2 ... ... 2 ... 3 ... 3 f i d i c i f i c i ( a ) ( b ) b i b i e i e i d i to g i to g i a i a i 1 1 Figure 3: The variable compo nent G F ( x i ) for ( a ) i = 1 , 3 , 5 , . . . , n − 1, and ( b ) i = 2 , 4 , 6 , . . . , n − 2 7 that the line ends at the appropriate (upper or lower) goal line. W e will use two types o f configurations corresponding to the vertices g i , 0 < i < n . Fig. 4( a ) (Fig. 4( b )) p resents the configurati on corresponding to g i for i = 1 , 3 , 5 , . . . , n − 1 ( i = 2 , 4 , 6 , . . . , n − 2, respectively). In order to make the analysis consistent we will use the label g i , 0 < i < n , to m ark a point on the board as shown i n Fig. 4. Roughly speaking, such a gadget forces the fol lowing sequence of ev ents: o ne player makes a jump ending at field g i (according to an arrow on the right hand side), then two stones are placed at points 8 and 18 (each by one player) and finally the other player makes a move of two jumps (as indi cated by the second arrow) leading the ball di rectly to t he point a i + 1 . T o obtain the configuration of stones ... 8 5 6 7 ... ... ... ... ... ... 10 11 13 14 15 16 17 20 21 19 18 19 8 18 ( a ) ( b ) ... g i g i 1 12 1 4 9 Figure 4: Configuration of whi te stones correspondi ng to vertices ( a ) g i , wh ere i is odd, ( b ) g i , where i is e ven corresponding to G ( x i ), denoted in the follo wing by G P ( x i ), for i = 1 , 3 , 5 , . . . , n − 1 (respectiv ely for i = 2 , 4 , 6 , . . . , n − 2) we con nect the gadgets in Figs 3( a ) and 4 ( a ) (Figs 3( b ) and 4 ( b ), resp.) in such a way t hat the p oints marked by 1 in bot h pictures refer to the same place on the board. W e will use the following correspondence between the edges of G and the lines of stones in G P : an edge of G ( x , y ) ∈ { ( g 0 , a 1 ) , ( g n , x 1 ) } ∪ [ 1 ≤ i ≤ n E ( G ( x i )) \ { ( g i , a i + 1 ) } corresponds t o a line of white stones between the po ints x and y on t he board, while ( g i , a i + 1 ), i = 1 , . . . , n − 1 , corresponds t o two lines of stones : between g i and 19 of G P ( x i ) and between 19 of G P ( x i ) and a i + 1 of G P ( x i + 1 ). Note that two points in a line between g i and 19 are by the definition unoccupied, but the g ame 8 is set up in such a way t hat when t he ball is about to move from g i then there is a line of whit e stones between g i and 19 o f G P ( x i ) which we are going to prove later . Note that we used the Facts 1-3 l isted in the previous section to obtain Theo- rem 1. Now we prove these f acts for the correspondi ng configurati ons of sto nes on the board. Then we may conclude that the game of Phut ball simulates t he graph game which will give us a desired reduction from the QBF problem. If x and y are two point s on the board then x → y denotes a jump from x to y and removing all the sto nes between x and y (we wil l use this symbol i n such a way that all th e conditions required by the rules of the game for making a jump will be satisfied). Pr oof of Fact 1: In the terms of t he phutball game we are going to prove, by an induction on i , that if a ball is at g i − 1 , 1 < i ≤ n , and is X th e player making the next mov e then the f ollowing sequence of mov es occ urs: (i) X places a whit e stone at 8 of G P ( x i − 1 ), (ii) X pl aces a white stone at 18 of G P ( x i − 1 ), (iii) X makes a s equence of jum ps over the lines of stones corresponding t o the edges gi ven in (2) or (3). Moveo ver , X i s the ∃ -player ( ∀ -player) for odd (even, respectiv ely) va lues of i . For i = 1 the s ituation is sim ilar to the case when i > 1 exce pt t hat only (iii ) is done. So, assume that the b all is at g i − 1 . By t he induction hypoth esis, the wh ite stones on the right hand side of g i − 1 are no longer on the board. Moreover , bo th for odd and even values of i , the lines of stones next to 1 0 and 17 (20 and 21) of G F ( x i − 1 ) lead to th e X ’ s ( X ’ s, respectively) board line. W e hav e that X must place a whit e stone, because he cannot make a jump . Clearly , he cannot p ut a stone at 10 of G P ( x i − 1 ). If he does not occupy one of the fields 4-11 of G P ( x i − 1 ) then in the next turn X pu ts a white st one at the point 1 0 of G P ( x i − 1 ) and it is easy to see that X wi ns the game. Observe, t hat if X is able to move the ball to the point 17 then he i s o ne jump away from his opponent’ s goal l ine. Note that if X places a stone i n one of the points 4 , 5 , 6 , 7 , 9 , 11 of G P ( x i − 1 ) t hen X can reach 17 and win the g ame. Thus, X places a whit e st one at the field 8 of G P ( x i − 1 ), i.e. (i) occurs. Then, X can eit her: (1) make one of th e moves g i − 1 → 18, g i − 1 → 18 → 20 or g i − 1 → 18 → 20 → 21, but it is easy to s ee that in all cases his opponent wins in the next t urn, o r (2) put a white ston e and if he chooses a field di ff erent than 18 then, similarly as in (1), he loses, because either 20 or 21 of G F ( x i − 1 ) 9 is u noccupied. So, X can make jumps g i − 1 → 18 → 2 0 or g i − 1 → 18 → 2 1, respectiv ely and reach his opponent ’ s goal line in the next jump. This proves that (ii) must happen. The fact that X must reach the po int g i by j umping over the lines of sto nes corresponding to (2) or (3) follows from the observation t hat otherwise he loses the game. In particular , if X places a white stone somewhere on the board instead of making some jumps then one of the points 3 or a i of G P ( x i ) is still unoccupied. Then, X reaches 3 or 2 in G P ( x i ), respecti vely , and his ne xt jump places the ball at the X ’ s goal line. So, X is forced to make a sequence of jumps. If X finishes his move before reaching b i or c i then his moves were g i − 1 → 19, g i − 1 → 19 → a i , g i − 1 → 19 → a i → 2 or g i − 1 → 19 → a i → 3 and it is easy to see th at X wins immediately in all cases. If X reaches b i , by jumps g i − 1 → 19 → a i → b i (the case of c i is analogous) then he must foll ow to the point g i (by jumps b i → e i → f i → g i ) since otherwise there is a pa th b i → e i → d i → c i → a i → 2 which X can follow . ✷ The con version of the formula component G ( F ) to the configuration of ston es is s hown in Figs 5 and 6. In p articular , Fig. 5 depicts the board representation of the edges ( x i − 1 , x i ), ( x i , y i ) and ( y i , z i ) while Fig. 6( a ) (respective ly Fig. 6( b )) giv es the configuration of stones coding the situation when w i , t is pointi ng an edge ( b j , e j ) (( c j , f j ), r espective ly), where i ∈ { 1 , . . . , m } , t ∈ { 1 , 2 , 3 } and j ∈ { 1 , . . . , n } . ... ... ... x i − 1 x i z i y i y i − 1 y ′ i − 1 y ′ i Figure 5: The configuration representing the paths in (4) See Fig. 7 for an e x ample wh ere G P ( x 2 ) is giv en together with w 1 , 2 pointing ( b 2 , e 2 ) and w 2 , 3 , w 3 , 2 both point ing ( c 2 , f 2 ). The configuration of st ones correspondi ng to a vertex z i is identical to the one in F ig. 4( a ), but it is rotated with the angle of 180 10 ( b ) ... ... ( a ) ... ... e j f j f j e j c j b j b j c j w l , t w l , t w ′ l , t w ′′ l , t w ′ l , t w ′′ l , t Figure 6: ( a ) w l , 2 and pointing to ( b j , e j ) and ( b ) w l , 3 and pointing to ( e i , f i ) degrees, a nd we use the symbol z i to refer to the point denoted by g i in the c ase of G P ( x i )’ s . The configuration of stones corresponding to G ( F ) is denoted by G P ( F ). It remains to mention that t he number of white stones in a line does not change the analysis of the game. In particular the distance between b j and e j can be arbi- trary l ong and in our reductio n it depends on the number of vertices w i , t pointing ( b j , e j ) or ( c j , f j ). W e require that there a dist ance of at least o ne ’field’ between each pair of vertical lines appearing on the board. In this way if o ne st one, say from a field z , in a line between x and y has been removed from the board during the game then a j ump x → y , wh ere y may b e on the goal line, is replaced b y two jumps x → z → y . Thanks to the distance between the vertical lines, no oth er jump from z is pos sible. If a player ends his move at z t hen such a situation does not di ff er from the case when the move would end at y and our analysis covers that. Pr oof of Fact 2 : From the Fact 1 it follows that when the ball is at point g n then t he ∀ -player is t he current pl ayer . The p layer cannot p lace a stone o n t he board in t he forthcomi ng move, beca use then the ∃ -player selects an emp ty point x i (it exists, because we ass umed w .l .o.g. that there are at least two variables in the formula) and g n → x 1 → · · · → x i → y i → y ′ i (5) leads directly to the ∀ -player goal line. 11 By a simp le inducti on on i one can prove that when th e ∀ -player reaches th e point x i then he m ust either jum p to x i + 1 or to y i . So, there exists i ∈ { 1 , . . . , m } such that the ∀ -player reaches y i . He canno t end his s equence of jump s at y i or y ′ i , because, as before, he would immediately l ose. By the arguments simil ar to the ones presented in t he proof of Fact 1, the moves (i) and (ii) in t he component corresponding to the vertex z i of G must occur and the ∃ -player begins his move when the ball is at z i . ✷ Pr oof of F act 3: By Fac t 2, the ∀ -player reaches z i . Sim ilarly as in the proof of Fact 1 one can show that (i) and (ii), defined in the proof, occur and consequently ∃ -player starts his m ove from z i when th e fields 8 and 18 are already occupied by white stones. The ∃ -player is forced to make a jum p, because otherwise th e ∀ -player follows a path z i → w i , 1 → · · · → w i , j → w ′ i , j → w ′′ i , j (see Fig. 6), where j ∈ { 1 , 2 , 3 } can be chosen in such a way that none of w i , j , w ′ i , j , w ′′ i , j is occupied by a white ston e placed by the ∃ -player in his l ast move . So, the ∃ - player has three paths to follow: z i → w i , 1 → · · · → w i , j → w ′ i , j , (6) where j ∈ { 1 , 2 , 3 } . If he ends his mov e at w ′ i , j (or earlier) then the ∀ -player reaches w ′′ i , j and can jum p t o the ∃ -player’ s board line. There are two cases to consider: (i) w i , j points to an edge ( b l , e l ); (ii) w i , j points to an edge ( c l , f l ). Both cases are analogo us, so we consider only (i). From the const ruction of the board it follows that the only conti nuation of moves in (6) by the ∃ -player in direction di ff erent than to w ′′ i , j is possible when no jump from b l to e l has been made during the g ame, and in this case the ∃ -player makes a ju mp from w ′ i , j to the ∀ -player’ s board li ne. So the ∃ -player wi ns if and o nly if no jum p from b l to e l has been made (or equiv alently the edge ( b l , e l ) still belongs to the corresponding graph G ). It remains to ment ion that t he line of stones between c l and f l has been remove d from the board, but the result i s that a player makes t wo jumps instead of one in order to move the ball from w i , j to w ′ i , j or from w ′′ i , j to the board line. ✷ Fig. 7 presents some parts of the board obtained on the basis of the graph G corresponding to formula (1) and shown in Fig. 2. Theor em 2 The game of Phutb all is PSP A CE -har d. Pr oof: The theorem follows from Fa cts 1-3, the proof of Theorem 1 and an obser - vation that the size of the board is polynom ial in n + m . ✷ 12 ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... . . . . . . . . . . . . w 3 , 2 d 2 b 2 x 2 x 1 z 2 z 1 e 2 f 2 w 1 , 2 w 2 , 3 c 2 a 2 Figure 7: Some parts of the graph in Fig. 2 4 Summary There are seve ral natural questions one may ask about the complexity of a game. One of t hem is: given an arbitrary s tate of t he game, is it p ossible for the current player to wi n in the next move? Such a problem has been consi dered in [11] where it has been shown that it is NP-complete for Phutball . According to t he discussion in [11] the games of Checkers and Phutball hav e many s imilarities. Howe ver , it turns out t hat we can give a posi tiv e answer to the abov e question in the case of Checkers in poly nomial time [11 , 15]. Another question to ask about the complexity of th e game is the one considered in th is paper . In t he case of Checkers, Frae nkel et. al. hav e sho wn that the game is P SP AC E-hard. Their result has been st renghtened by the paper of Robson: the game i s EXPTIME-compl ete [23]. In this p aper we developed the first result concerning the com plexity of Phutball and an open question remains whether it belongs t o PSP A CE or is as hard as EXPTIME? 13 References [1] E. R. Berlekamp, J. H. Conw ay and R. K. Guy , W i nning W ays for your Mathematical Plays, V ol. I, II, Academic Press, London (1982). 2nd edition: vol. 1 (2001), vol. 2 (2003), vol. 3 (2003), vol. 4 (2004), AK Peters, Nati ck, MA [2] E. Berlekamp, J.H.Conway , R.K. G uy , Philos opher’ s foo tball, In: W i nning W ays for Y our Mathemat ical Plays , 2nd edition, A K P eters Ltd (2003) 752- 755. [3] T .C. Biedl, E.D. Demaine, M.L. Demaine, R. Fleischer , L. Jacobson, J. I. Munro, The complexity of Clickomania, in: Mor e Games of No Chance R.J. Now ako wski Ed., Cambridg e Uni versity P ress (2002) 389-404 . [4] T . Caz enav e, Iterati ve W id ening, Pr oceedings of IJCAI-01 1 (2001) 523-528. [5] T . Cazena ve, Admis sible moves in two-player games, in: Pr oceedings of SARA, Lectur e Notes in Comp. Sci. 2371 (2002) 52-63. [6] T . Cazena ve, A generalized threats search algorit hm, In Proceedings of the Third Internati onal Conference on Computers and Games, Lectur e Notes in Comp. Sci. 2883 (2003) 75-87. [7] T . Cazena ve, Gradual abstract proof search, ICGA J ournal 25 (2002) 3-15. [8] J.H. Conway , On numbers and games , Academic Press, London (1976). [9] J. Culberson, Sokoban is PSP A CE-compl ete, Proce edings of the Int erna- tional Confer ence on Fun with Algori thms (1998) 65-76. [10] E.D. Demaine, Playing games with algorithms: Al gorithmic combinatorial game theory , Pr oc. 26th Symposium on Mathematical F ou ndations in Comp. Sci. , Lectur e Notes in Comp. Sci. 2136 (2001) 18-32. [11] E.D. Demaine, M.L. Demaine, D. Eppstein Phutball Endgames are Hard, in: Mor e Ga mes of No Chance , R. J. Nowak owski Ed., Cambridge University Press, (2002) 351-360. [12] E.D. Dem aine, M.L. Demaine, R. Fleischer , R.A. He arn, T . von Oertzen, The complexity of Dyson T elescopes, i n: Games of No Chance III (to appear). 14 [13] S. Even, R.E. T arjan, A combinatorial problem which is complete in polyn o- mial s pace, Journal of the Associat ion for Computi ng Machinery 2 3 (1976) 710-719. [14] G. Flake, E. Baum, Rush Hour is PSP A CE-complete, or “Why you should generously tip parking lot at tendants”, Theore tical Computer Science 270 (2002) 895-911. [15] A.S. Fraenke l, M.R. Garey , D.S. Johnso n, T . Schaefer , Y . Y esh a, The com- plexity of Checkers on an N × N board, preliminary report, Pr oc. 19th Annual Symposium on F oundat ions of Comp. Sci. (197 8) 55-64. [16] T . Furtak, M. Ki yomi, T . Uno, M. Buro, Generalized Am azons is PSP A CE- Complete, in: IJCAI L.P . Kaelbling and A. Sa ffi otti Eds. (2005) 132-137. [17] J.P . Grossman, R.J. No wako wski, One-dim ensional Phutball , in: More Games of No Chance, R.J. Now ako wski Ed. MRSI Publications 42 , Cam- bridge Univ ersity Press (2002) 361-367. [18] R.A. Hearn, Games, Puzzles, and Computati on, PhD dis sertation, Mas- sachusetts Institute of T echnology (2006) (to appear). [19] S. Iwata, T . Kasai, The Othell o game on n × n board in PSP A CE-complete, Theor etical Computer Science 123 (1994) 329-340 . [20] R. Kaye, Minesweeper is NP-compl ete, Mathemati cal Intelligencer 22 (2000) 9-15. [21] D. Lichtens tein, M. Sipser , Go is p olynomial-sp ace hard, Journal of the As- sociation for Computing Machinery 27 (1980) 393 -401. [22] J.M. Robson, Th e com plexity of Go, Pr oceedings of the IFIP 9th W orld Computer Congr ess on Informati on Pr ocessing (1983) 413-417. [23] J.M. Robson, N by N Checker s is EXPTIME complete, SIAM J . Comput. 13 (1984) 252-267. [24] A.N. Sie gel, Loopy Games and Computation, PhD thesis, Univ ersity of Cal- ifornia at Berke ley (2005). 15 [25] L.J. Stockm eyer , A.R. Meyer , W o rd problems requi ring exponential time, Pr oceedings 5th A CM Symposium on the Theory of Computing A CM Press (1973) 1-9. [26] R. Uehara, S. Iwa ta, Generalized Hi-Q is NP-complete, T ransactions o f the IEICE 73 (19 90) 270-273. [27] D. W olfe, Go endgames are hard, in: More Games of No Chance, R.J. Now ako wski Ed. M RSI Publications 42 , Cambridge Univ ersity P ress (2002) 125-136. 16

Original Paper

Loading high-quality paper...

Comments & Academic Discussion

Loading comments...

Leave a Comment