11
INTELLIGENT SYSTEM FOR PLAYING TAROK Mitja Luštrek & Matjaž Gams Jožef Stefan Institute Ljubljana, Slovenia

INTELLIGENT SYSTEM FOR PLAYING TAROK Mitja Luštrek & Matjaž Gams Jožef Stefan Institute Ljubljana, Slovenia

Embed Size (px)

Citation preview

Page 1: INTELLIGENT SYSTEM FOR PLAYING TAROK Mitja Luštrek & Matjaž Gams Jožef Stefan Institute Ljubljana, Slovenia

INTELLIGENT SYSTEMFOR PLAYING TAROK

Mitja Luštrek & Matjaž Gams

Jožef Stefan Institute

Ljubljana, Slovenia

Page 2: INTELLIGENT SYSTEM FOR PLAYING TAROK Mitja Luštrek & Matjaž Gams Jožef Stefan Institute Ljubljana, Slovenia

PERFECT AND IMPERFECT INFORMATION GAMES

Perfect information(players have full knowledge of the state of the game) Chess, backgammon Checkers, Othello Connect-four ...

Imperfect information(players have only partial knowledge of the state of the game) Bridge Poker Tarok ...

Page 3: INTELLIGENT SYSTEM FOR PLAYING TAROK Mitja Luštrek & Matjaž Gams Jožef Stefan Institute Ljubljana, Slovenia

THE GAME – TAROK

Very popular in Central Europe Many variants (tarock, taroky, königsrufen...) Three players: two against one 54 cards: suits and trumps – taroks The objective is winning tricks

Page 4: INTELLIGENT SYSTEM FOR PLAYING TAROK Mitja Luštrek & Matjaž Gams Jožef Stefan Institute Ljubljana, Slovenia

THE PROGRAM – SILICON TAROKIST

Tarok-playing programs exist, but little is known of how they work. Tarok.net (www.tarok.net) Tarock World (www.gatecentral.com/triangle) ...

We developed SiliconTarokist. Freely available

(tarok.bocosoft.com) Plays reasonably well

as judged by humanplayers.

Page 5: INTELLIGENT SYSTEM FOR PLAYING TAROK Mitja Luštrek & Matjaž Gams Jožef Stefan Institute Ljubljana, Slovenia

GAME TREE SEARCH

Alpha-beta algorithm is used to search a single game tree. Nodes – game states Edges – moves

Page 6: INTELLIGENT SYSTEM FOR PLAYING TAROK Mitja Luštrek & Matjaž Gams Jožef Stefan Institute Ljubljana, Slovenia

SAMPLING

Monte Carlo sampling is used to generate samples of other players’ hands.

Page 7: INTELLIGENT SYSTEM FOR PLAYING TAROK Mitja Luštrek & Matjaž Gams Jožef Stefan Institute Ljubljana, Slovenia

ALPHA-BETA ENHANCEMENTS

Transposition table Fuzzy transposition table Similar to partition search (bridge program GIB, M. L. Ginsberg, 1996)

Move ordering Adjusting the width of search window Pruning the game tree

Page 8: INTELLIGENT SYSTEM FOR PLAYING TAROK Mitja Luštrek & Matjaž Gams Jožef Stefan Institute Ljubljana, Slovenia

TRANSPOSITION TABLE

Usually: transposition table stores single game states and their values.

Partition search: for each encountered game state, a set of states with equal value is calculated and stored together with the value.

Silicon Tarokist: the set of equivalent game states is determined heuristically.

Page 9: INTELLIGENT SYSTEM FOR PLAYING TAROK Mitja Luštrek & Matjaž Gams Jožef Stefan Institute Ljubljana, Slovenia

OTHER ALPHA-BETA ENHANCEMENTS

Move ordering Moves that cause cut-offs should be tried first. History heuristic: moves that have caused cut-offs in previously

searched game states are given priority. Adjusting the width of search window

Narrower search window causes more cut-offs, thus speeding up the search.

Minimal window search: non-first children of a node are searched with minimal window, since we are trying to show they are inferior to the first one.

Pruning the game tree Some moves can be discarded because they are either clearly bad or

redundant – the same effect can be achieved by another move.

Page 10: INTELLIGENT SYSTEM FOR PLAYING TAROK Mitja Luštrek & Matjaž Gams Jožef Stefan Institute Ljubljana, Slovenia

MONTE CARLO SAMPLING ENHANCEMENT

Monte Carlo sampling has demonstrable deficiencies. Nevertheless, it works. Deficiency we observed:

An assumption about the state of the game is made. Sequence of bad, but inevitable move – good move is evaluated equally

as good move – bad, but inevitable move. Sometimes bad, but inevitable move is made first. Then it turns out it is not inevitable.

Solution: In addition to full search, search to the depth of one trick is performed. This emphasizes immediate profit. A combination of both searches is used for the final decision.

Page 11: INTELLIGENT SYSTEM FOR PLAYING TAROK Mitja Luštrek & Matjaž Gams Jožef Stefan Institute Ljubljana, Slovenia

RESULTS

Game tree search algorithm in Silicon Tarokist searches 184-times less nodes than alpha-beta using uses 86-times less time.

The program does not play flawlessly, but it is a challenging opponent.

For truly high-level play, game tree search that we use in inadequate. It is too shallow for long-term strategies to be developed. It will either have to be improved significantly or another – probably knowledge-based – way to develop long-term

strategies will have to be devised.