The Complexity of Playing Durak⇤

The Complexity of Playing Durak⇤

Proceedings of the Twenty-Fifth International Joint Conference on Artificial Intelligence (IJCAI-16) The Complexity of Playing Durak⇤ Edouard´ Bonnet Institute for Computer Science and Control, Hungarian Academy of Sciences (MTA SZTAKI), Budapest, Hungary, [email protected] Abstract suits can be solved in polynomial time [Kahn et al., 1987; Wastlund,¨ 2005a; 2005b]. Some generalizations of bridge Durak is a Russian card game in which players with more hands were proven PSPACE-complete [Bonnet et try to get rid of all their cards via a particular at- al., 2013b]. Finally, the complexity of problems linked to the tack/defense mechanism. The last player standing games of UNO [Demaine et al., 2010] and SET [Lampis and with cards loses. We show that, even restricted to Mitsou, 2014] has been studied. the perfect information two-player game, finding Here, we wish to pursue this line of works by investigating optimal moves is a hard problem. More precisely, the complexity of durak whose game mechanism is not based we prove that, given a generalized durak position, on taking tricks. Durak is a two to six-player card game inten- it is PSPACE-complete to decide if a player has a sively played in Russia and East European countries. Durak winning strategy. We also show that deciding if an is the Russian word for fool which designates the loser. There attack can be answered is NP-hard. is no winner in durak, there is just a loser: the last player standing with cards. We sketch a simplified version2 of the 1 Introduction rules for two players and without trumps. The game is played with 36 cards, by keeping the cards The computational complexity of games is a fruitful research from the sixes (lowest cards) to the aces (highest cards) in a topic which started to formalize in the late seventies [Schae- standard 52-card deck. Both players, let us call them P and fer, 1978]. From an AI perspective, it offers an insight into O, are dealt a hand of six cards and their goal is to empty their what may and may not be computed efficiently in the pro- hand before the opponent does. The remaining cards form the cess of solving a game. The complexity of games has been pile. The game is made of rounds. A designated player, say and is still extensively studied, giving rise to a few tractabil- P , leads the first round by playing any card c of his hand. ity results, such as solving in polynomial time NIM [Bouton, In this round, P is the attacker, O is the defender, and c is 1901] and SHANNON EDGE SWITCHING GAME [Bruno and the first attacking card. The defender can skip, at any time. In Weinberg, 1970], and a series of intractability results. For that case, the defender picks up all the cards played during the instance, HEX [Reisch, 1981], OTHELLO [Iwata and Kasai, round (by both players) and puts them into his hand; then, the 1994], AMAZONS [Furtak et al., 2005; Hearn and Demaine, attacker remains the attacker for the next round. The defender 2009], and HAVANNAH [Bonnet et al., 2013a] are PSPACE- can also defend the current attacking card by playing a higher complete, while CHESS (without fifty-move rule) [Fraenkel card in the same suit. Each time his opponent defends, the and Lichtenstein, 1981], GO (with Japanese ko rules) [Rob- attacker can (but is not forced to) play an additional attacking son, 1983], and CHECKERS [Robson, 1984], are EXPTIME- card (up to a limit of six cards) provided it has the same rank complete. as a card already played during the round (by either himself That list suggests that the computational complexity of or his opponent). If the defender does defend all the attacking board games is relatively well understood. The main moti- cards played by the attacker, all the cards played during the vation of this paper is to go towards a similar understand- round are discarded and the defender leads the next round, ing for card games. Indeed, although card games are ar- thereby becoming the new attacker. After each round, any guably as popular as board games, far less is known concern- player with less than six cards, draws cards in the pile until ing their complexity. We only know of a handful of results he reaches the total of six. mostly on trick-taking card games. Bridge (or whist) with 1 In fact, we will consider that the pile is empty and that two hands and a single suit, or with two hands and mirror the two players have perfect information. Why do we make those assumptions? In durak, one does not win but has to ⇤The author is supported by the ERC grant PARAMTIGHT: ”Pa- rameterized complexity and the search for tight complexity results”, avoid losing. While the pile is not empty, or while there are no. 280152. 1A suit is said mirror whenever both players have the same num- 2For a full description of the rules of Durak, see http://www. ber of cards in it. pagat.com/beating/podkidnoy durak.html 109 three players or more still in the game, the risk of quickly 7 losing is relatively weak. This is one motivation for focusing 6 on the two-player game with an empty pile. Now, from his 5 hand and the cards played and discarded so far, a player can 4 infer the hand of his opponent, yielding perfect information. 3 More importantly, we almost exclusively prove negative re- 2 sults, and our hardness proofs do not require more than two 1 players, nor a non empty pile, nor trumps. s2 s3 s4 s5 s6 After precising the notations, the vocabulary and the rules Figure 1: The geometric representation of position (s , 4), of durak in Section 2, we show that deciding if one player can h{ 2 defend any attack is NP-hard, in Section 3. The main result (s2, 5), (s3, 3), (s3, 6), (s3, 7), (s4, 2), (s5, 1), (s5, 5), (s , 6), (s , 2), (s , 7) ,h ,P, . of the paper is the PSPACE-hardness of two-player perfect in- 5 6 6 } 1 1i formation durak and is presented in Section 4. Our reduction (from 3-TQBF) requires the introduction of several notions: Generalized durak. In generalized durak, there are s suits weaknesses, well-covered weaknesses, and strong suits.We and the ranks range from 1 to r. The threshold poses some believe that those notions can be of importance in designing questions. It seems sound that, in a generalization of the game good artificial players for durak. with an unbounded number of suits and ranks, the number of moves within a round is not limited by a constant. Therefore, 2 Preliminaries as a part of the instance, the threshold should be allowed to For any integers x y, [x, y]:= x, x +1,...,y 1,y and grow. Besides, it does not make sense to impose that r, s, and 6 { − } [x]:=[1,x].Acard is defined by a suit symbol sj and an y satisfy a constraint that is satisfied by r =9, s =4, y =6 integer i called rank, and is denoted by (sj,i).Ahand is a since there is no canonical such constraint. In case y > rs, set of cards. the threshold cannot come into play, and we denote its value as . Example 1. h1 = (s2, 1), (s3, 1), (s3, 5), (s4, 1), (s5, 3), 1 (s , 4), (s , 5) is a hand.{ Card (s , 1) has rank 1 in suit s . 5 6 } 2 2 Definition 1. A durak position = h(P ),h(O),L,y is Algebraic notation. We write fragments of game, called given by two hands h(P ) and h(OP) of Ph and O, an indicatori variations or continuations in the following way. A move is L P, O of who leads the next round (equivalently, whose a card, the defensive skip , or the attacking skip . Pairs of turn2{it is) and} a threshold y, that is the maximum number of an attacking card and its defensive⇤ card are separated by com- attacking cards allowed in a round. mas. The extra attacking cards played after the defender skips are written to the right of symbol . Rounds are separated by semicolons. ⇤ Rules. Relation defines a partial order over the cards by: for any suit sj and any i1,i2 [r], (sj,i1) (sj,i2) iff 2 Geometric representation. Each card (sj,i) h(P ) is i1 6 i2. If c1 c2 and c1 = c2, we write c1 c2. 6 ≺ represented by a black disk in (i, j); each card (s ,i2) h(O) A game from an initial position = h(P ),h(O),L,y is j 2 composed of rounds that are themselvesP h composed of movesi . is represented by a circle in (i, j) (see Figure 1). In the fol- If h(P )= or h(O)= the game ends, the player still lowing sections, the suits are indexed by symbols rather than having cards; loses, and his; opponent wins3. We assume integers and the columns are displayed in a convenient order. that P is the current attacking player (i.e., L = P ). If Observe that permuting the columns of the representation preserves the position. c1,c2,...cp is the list of attacking cards played by P , so far, and d1,d2,...dp 1 the list of defending cards played by O then p y, and for− each i [p 1], c d and c has the Example 2. P has a winning strategy in the position of Fig- 6 2 − i ≺ i i+1 same rank as at least one card in c ,d ,...,c ,d .

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    7 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us