Intelligent System for Playing Tarok

Intelligent System for Playing Tarok

Journal of Computing and Information Technology - CIT 11, 2003, 3, 209-215 209 Intelligent System for Playing Tarok Mitja Lustrekˇ and Matjazˇ Gams “Jozefˇ Stefan” Institute, Ljubljana, Slovenia We present an advanced intelligent system for playing Tarok 7 is a very popular card game in several three-player tarok card game. The system is based countries of central Europe. There are some on alpha-beta search with several enhancements such as fuzzy transposition table, which clusters strategically tarok-playing programs 2, 9 , but they do not similar positions into generalised game states. Unknown seem to be particularly good and little is known distribution of other players’ cards is addressed by Monte of how they work. This is why we have cho- Carlo sampling. Experimental results show an additional sen tarok for the subject of our research. The reduction in size of expanded 9-ply game-tree by a factor of 184. Human players judge the resulting program to resulting program, Silicon Tarokist, is available play tarok reasonably well. online at httptarokbocosoftcom. Keywords: game playing, imperfect information, tarok, The paper is organised as follows. In section 2 alpha-beta search, transposition table, Monte Carlo rules of tarok and basic approaches to a tarok- sampling. playing program are presented. Section 3 gives the overview of Silicon Tarokist. Section 4 describes its game-tree search algorithm, i.e. an advanced version of alpha-beta search. In 1. Introduction section 5 Monte Carlo sampling is described, which is used to deal with imperfect informa- tion. Section 6 discusses the performance of Computer game playing is a well-developed the search algorithm and presents the results of area of artificial intelligence. However, the ma- testing against human players. Section 7 con- jority of research has focused on games of per- cludes the paper and lists some ideas that might fect information, where players have complete produce an even better tarok-playing program. knowledge of the entire game state. In chess and backgammon, computers can compete with top human players. For checkers, Othello and 2. Playing Tarok Scrabble programs exist that can consistently defeat any human, while some simpler games, such as connect-four, have actually been solved 2.1. Rules of the Game i.e. the best move for each possible position has been determined. The only major chal- We have chosen three-player version of the lenge left is probably the game of go. game, which is used in tournament play rel- On the other hand, games of imperfect informa- atively unknown two-player and more compli- cated casual four-player versions also exist. tion, such as card games where players typically do not see opponents’ cards, have not enjoyed The game is played with 54 cards. There are that much attention. An exception to this is eight cards of each suit and 22 trumps called bridge, where several programs exist and the taroks. The black suits rank from lowest to best of them, like GIB 4 , can challenge ex- highest: 7, 8, 9, 10 1 point each; scoring will be pert human players. Some work has also been explained at the end, Jack 2 points , Knight 3 done on poker, but even Poki 1 , which is prob- points, Queen 4 points and King 5 points . ably the only major effort in the field, is still The red suits rank from lowest to highest: 4, 3, mediocre compared to humans. 2, 1, Jack, Knight, Queen and King scoring is 210 Intelligent System for Playing Tarok the same as for black suits. The lowest tarok unfulfilled subtracted . Scoring is cumulative I is called pagat, second highest XXI mond over all the games in a session. 1 and highest not numbered skisˇ 5 points each and 1 point each for other taroks. 2.2. Tarok-playing Program Each player is dealt 16 cards and the remaining six called talon are not yet revealed. Play- There are at least two basic approaches to com- ers then bid to decide who will be the declarer. puter tarok: previously prepared in-depth know- Each player in turn either names a contract or ledge of the game can be employed and deci- passes. Possible contracts from lowest to high- sions can made based on basic knowledge of the est are three three cards in hand will be ex- game combined with extensive analysis of the changed for three cards in talon; 10 points, two situation at hand. 20 points , one 30 points solo no cards will The advantage of the first approach is that com- be exchanged; 50 points, beggar no tricks, plex and ingenious strategies, which human i.e. cards played in one round, must be won; players have developed and tested, can be used. 70 points and klop when all players pass; They only need to be expressed in a form that the value of the tricks they win is subtracted can be used by a game-playing program. How- from their scores. Players are only allowed to ever, applying such pre-made strategies to the name higher contracts than those before them variety of situations that arise in the course of a and bidding ends when all players have passed. game is not easy. Unpredicted situations have to The player with the highest contract becomes be dealt with. And of course care has to be taken the declarer and the other two players oppose that the program does not become predictable. him jointly. The talon is revealed, the declarer Not to mention that humans are imperfect and chooses the appropriate number of cards from so can be their strategies. it, puts equal number of cards from his hand on A variation of the above approach is to use his trick pile where cards he wins are put and the remaining cards are given to his opponents. machine-generated knowledge. Ideally game- The declarer may then make announcements: theoretic optimal randomised strategy would be produced, but this is not possible due to enor- kings 20 points means that he declares to win mous complexity of the task. all four kings; trula 20 points that he will win pagat, mond and skis;ˇ pagat ultimo 50 points The more traditional approach is through search, that he will win the last trick with pagat; and which utilises computers’ main advantages over valat 500 points that he will win all tricks. humans: speed and perfect memory. In eve- ry position all moves are considered, for each The declarer plays the first card and the other move every countermove is tried etc. Such players play theirs in turn. Suit must be fol- methods are completely adaptable and moves, lowed, if possible; tarok should be played oth- being tailor-made for specific situations, are not erwise. The trick is won by the highest card predictable. However, even modern computers played of the suit led, unless it contains a tarok, are sometimes not fast enough to execute such in which case the highest tarok wins. In klop searches to sufficient depth. and beggar, higher card must be played, if pos- sible. We have decided on a combination of both ap- proaches. The emphasis is on search, because The value of the cards the declarer has won is we feel it has greater potential due to its flex- the sum of their point values, decreased by 1 ibility. Here, the field of artificial intelligence per three cards. Thirty five is subtracted from offers a large array of methods to be used. Also, it and if the remaining number is positive, the it is interesting to let computer devise strategies declarer has won the game. In any case this on its own and compare them to what human number is added to his score. If he has won, the players do. Nevertheless, using human knowl- point value of his contract is also added and edge can be beneficial and sometimes even es- subtracted otherwise. Point value of fulfilled sential, so Silicon Tarokist employs it in several announcements is added as well and those of places. 1 This is the Slovene term; in German it is called skus,¨ in Hungarian sk´iz, in Czech skˇ yz´ etc. Intelligent System for Playing Tarok 211 3. Overview of Silicon Tarokist it must have been too pessimistic, so the mar- gin is decreased. Minimum percentages of ful- Tarok-playing program must perform three dis- filled announcements during test games while tinct tasks: bidding, exchanging cards with exchanging cards with talon are adaptable in a talon and actual playing. When cards are dealt, similar fashion. it must determine how high it can afford to bid to be still able to win the game. If it wins the bidding, it must choose which cards from talon 4. Game-tree Search to take and which cards to remove from hand to achieve best hand. And lastly, it must decide 4.1. Alpha-beta Algorithm which card to play each turn. Despite these tasks seemingly being quite dif- Alpha-beta search 5 is the most widely used ferent, Silicon Tarokist performs them in basi- algorithm for playing games. Its purpose is cally the same way. to search game tree, which consists of nodes representing game states and edges represent- Bidding. For each contract starting with the ing moves. Values representing game score are lowest, a number of games are played out. The assigned to leaves. The tree has interchang- highest contract for which test games have been ing max and min plies2: in the first it is your won by a sufficient margin is considered viable. turn and in each node you choose the successor The program will bid as high as this contract.

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