Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License:

Slides:



Advertisements
Similar presentations
Minibridge Cowbridge Comprehensive July 2007 Patrick Jourdain.
Advertisements

A Whist AI Jason Fong CS261A, Spring What is Whist? Old card game, driven into obscurity by Bridge Similar to other trick taking games Bridge, Spades,
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License:
Anthony Cozzie. Quite possibly the nerdiest activity in the world But actually more fun than human chess Zappa o alpha-beta searcher, with a lot of tricks.
Adversarial Search We have experience in search where we assume that we are the only intelligent being and we have explicit control over the “world”. Lets.
Techniques for Dealing with Hard Problems Backtrack: –Systematically enumerates all potential solutions by continually trying to extend a partial solution.
Lesson 13: Tricks from small cards Surendra Mehta March 2007.
1 Bridge for Scholars 2009 Presentation 01 2 The deck The deck has 52 cards There are four suits: Clubs , Diamonds , Hearts, Spades  The lowest card.
February 7, 2006AI: Chapter 6: Adversarial Search1 Artificial Intelligence Chapter 6: Adversarial Search Michael Scherger Department of Computer Science.
Bridge for Beginners Lesson 3 Declarer Play. Homework from Week 2 1Chris Game in 10 2Bill Part score in 11 2Bill Part score in  11 3Bill Game in NT 8.
CS 484 – Artificial Intelligence
Lecture 12 Last time: CSPs, backtracking, forward checking Today: Game Playing.
Adversarial Search CSE 473 University of Washington.
Games CPSC 386 Artificial Intelligence Ellen Walker Hiram College.
Games with Chance 2012/04/25 1. Nondeterministic Games: Backgammon White moves clockwise toward 25. Black moves counterclockwise toward 0. A piece can.
Practical techniques for agents playing multi-player games
State Space 4 Chapter 4 Adversarial Games. Two Flavors Games of Perfect Information ◦Each player knows everything that can be known ◦Chess, Othello Games.
This time: Outline Game playing The minimax algorithm
Games and adversarial search
Min-Max Trees Based on slides by: Rob Powers Ian Gent Yishay Mansour.
1 Adversary Search Ref: Chapter 5. 2 Games & A.I. Easy to measure success Easy to represent states Small number of operators Comparison against humans.
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License:
Game Trees: MiniMax strategy, Tree Evaluation, Pruning, Utility evaluation Adapted from slides of Yoonsuck Choe.
Minimax Trees: Utility Evaluation, Tree Evaluation, Pruning CPSC 315 – Programming Studio Spring 2008 Project 2, Lecture 2 Adapted from slides of Yoonsuck.
CISC 235: Topic 6 Game Trees.
Lecture 5 Note: Some slides and/or pictures are adapted from Lecture slides / Books of Dr Zafar Alvi. Text Book - Aritificial Intelligence Illuminated.
Game Playing Chapter 5. Game playing §Search applied to a problem against an adversary l some actions are not under the control of the problem-solver.
Game Playing.
(Classical) AI Planning. Some Examples Route search: Find a route between Lehigh University and the Naval Research Laboratory Project management: Construct.
1 Computer Group Engineering Department University of Science and Culture S. H. Davarpanah
Agents that can play multi-player games. Recall: Single-player, fully-observable, deterministic game agents An agent that plays Peg Solitaire involves.
October 3, 2012Introduction to Artificial Intelligence Lecture 9: Two-Player Games 1 Iterative Deepening A* Algorithm A* has memory demands that increase.
Chapter 12 Adversarial Search. (c) 2000, 2001 SNU CSE Biointelligence Lab2 Two-Agent Games (1) Idealized Setting  The actions of the agents are interleaved.
Game Playing. Towards Intelligence? Many researchers attacked “intelligent behavior” by looking to strategy games involving deep thought. Many researchers.
Pitch Playing Agent Project for Into to AI Jody Ammeter.
Minimax with Alpha Beta Pruning The minimax algorithm is a way of finding an optimal move in a two player game. Alpha-beta pruning is a way of finding.
Games. Adversaries Consider the process of reasoning when an adversary is trying to defeat our efforts In game playing situations one searches down the.
INTELLIGENT SYSTEM FOR PLAYING TAROK
Machine Learning of Bridge Bidding By Dan Emmons Computer Systems Laboratory
(Classical) AI Planning. General-Purpose Planning: State & Goals Initial state: (on A Table) (on C A) (on B Table) (clear B) (clear C) Goals: (on C Table)
Game tree search Chapter 6 (6.1 to 6.3 and 6.6) cover games. 6.6 covers state of the art game players in particular. 6.5 covers games that involve uncertainty.
Parallel Programming in Chess Simulations Tyler Patton.
ARTIFICIAL INTELLIGENCE (CS 461D) Princess Nora University Faculty of Computer & Information Systems.
Game-playing AIs Part 2 CIS 391 Fall CSE Intro to AI 2 Games: Outline of Unit Part II  The Minimax Rule  Alpha-Beta Pruning  Game-playing.
S 04 Making a Plan BRIDGE FOR SCHOLARS JANUARY 2016.
Adversarial Search 2 (Game Playing)
Adversarial Search and Game Playing Russell and Norvig: Chapter 6 Slides adapted from: robotics.stanford.edu/~latombe/cs121/2004/home.htm Prof: Dekang.
Parallel Programming in Chess Simulations Part 2 Tyler Patton.
Luca Weibel Honors Track: Competitive Programming & Problem Solving Partisan game theory.
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License:
The play of the cards: suit contracts Trumps or no trumps? Trumps or no trumps? The value of trumps The value of trumps When to draw trumps When to draw.
1 Chapter 6 Game Playing. 2 Chapter 6 Contents l Game Trees l Assumptions l Static evaluation functions l Searching game trees l Minimax l Bounded lookahead.
Artificial Intelligence AIMA §5: Adversarial Search
Adversarial Search and Game-Playing
Stochastic tree search and stochastic games
Machine Learning of Bridge Bidding
Automated Planning & Computer Games: Perspectives and Applications
SNS College of Engineering Department of Computer Science and Engineering AI Planning Presented By S.Yamuna AP/CSE 5/23/2018 AI.
Iterative Deepening A*
Bridge (and Card Games) in General
@NAMEOFEVENTORBRIDGECLUB
Development and Implementation of a Machine Bridge Bidding Algorithm
Chapter 23 Planning in the Game of Bridge
Kevin Mason Michael Suggs
Chapter 23 Planning in the Game of Bridge
Introduction to Artificial Intelligence Lecture 9: Two-Player Games I
Chapter 23 Planning in the Game of Bridge
How to be a 1st Team player.
Minimax Trees: Utility Evaluation, Tree Evaluation, Pruning
Presentation transcript:

Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: 1 Chapter 23 Planning in the Game of Bridge Dana S. Nau Dept. of Computer Science, and Institute for Systems Research University of Maryland Lecture slides for Automated Planning: Theory and Practice

Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: 2 Connect Four:solved Go-Moku:solved Qubic:solved Nine Men’s Morris:solved Othello:better than humans Checkers:better than any living human Backgammon:better than all but about 10 humans Chess:competitive with the best humans Bridge:as of 2004, about as good as mid-level humans Computer Programs for Games of Strategy

Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: 3 Computer Programs for Games of Strategy l Fundamental technique: the minimax algorithm minimax(u) = max{minimax(v) : v is a child of u} if it’s Max’s move at u = min{minimax(v) : v is a child of u} if it’s Min’s move at u l Largely “brute force” l Can prune off portions of the tree u cutoff depth & static evaluation function u alpha-beta pruning u transposition tables u … l But even then, it still examines thousands of game positions l For bridge, this has some problems …

Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: 4 West North East South Q Q  J 6  5  9  7  A K 5 3 A  9   How Bridge Works l Four players; 52 playing cards dealt equally among them l Bidding to determine the trump suit u Declarer: whoever makes highest bid u Dummy: declarer’s partner l The basic unit of play is the trick u One player leads; the others must follow suit if possible u Trick won by highest card of the suit led, unless someone plays a trump u Keep playing tricks until all cards have been played l Scoring based on how many tricks were bid and how many were taken

Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: 5 l Bridge is an imperfect information game u Don’t know what cards the others have (except the dummy) u Many possible card distributions, so many possible moves l If we encode the additional moves as additional branches in the game tree, this increases the branching factor b l Number of nodes is exponential in b u worst case: about 6x10 44 leaf nodes u average case: about leaf nodes u A chess game may take several hours u A bridge game takes about one and 1/2 minutes Game Tree Search in Bridge Not enough time to search the game tree b =2 b =3 b =4

Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: 6 Reducing the Size of the Game Tree l One approach: HTN planning u Bridge is a game of planning u The declarer plans how to play the hand u The plan combines various strategies (ruffing, finessing, etc.) u If a move doesn’t fit into a sensible strategy, it probably doesn’t need to be considered Write a planning procedure procedure similar to TFD (see Chapter 11) u Generalized to generate game trees instead of just paths u Describe standard bridge strategies as collections of methods u Use HTN decomposition to generate a game tree in which each move corresponds to a different strategy, not a different card HTN-generated trees Worst case Average case Brute-force search ≈ leaf nodes≈ 26,000 leaf nodes ≈ 305,000 leaf nodes≈ 6x10 44 leaf nodes

Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: 7 …… Methods for Finessing PlayCard(P 3 ; S, R 3 )PlayCard(P 2 ; S, R 2 )PlayCard(P 4 ; S, R 4 ) FinesseFour(P 4 ; S) PlayCard(P 1 ; S, R 1 ) StandardFinesseTwo(P 2 ; S) LeadLow(P 1 ; S) PlayCard(P 4 ; S, R 4 ’) StandardFinesseThree(P 3 ; S) EasyFinesse(P 2 ; S)BustedFinesse(P 2 ; S) FinesseTwo(P 2 ; S) StandardFinesse(P 2 ; S) Finesse(P 1 ; S) task method 1st opponent declarer 2nd opponent dummy

Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: 8 (North—  Q) …… Instantiating the Methods PlayCard(P 3 ; S, R 3 )PlayCard(P 2 ; S, R 2 )PlayCard(P 4 ; S, R 4 ) FinesseFour(P 4 ; S) PlayCard(P 1 ; S, R 1 ) StandardFinesseTwo(P 2 ; S) LeadLow(P 1 ; S) PlayCard(P 4 ; S, R 4 ’) StandardFinesseThree(P 3 ; S) EasyFinesse(P 2 ; S)BustedFinesse(P 2 ; S) FinesseTwo(P 2 ; S) StandardFinesse(P 2 ; S) Finesse(P 1 ; S) Us:East declarer, West dummy Opponents:defenders, South & North Contract:East – 3NT On lead:West at trick 3 East:  KJ74 West:  A2 Out:  QT98653 (North—  3) East—  J West—  2 North—  3South—  5South—  Q task method 1st opponent declarer 2nd opponent dummy

Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: 9 (North—  Q) …… How to Generate a Game Tree PlayCard(P 3 ; S, R 3 )PlayCard(P 2 ; S, R 2 )PlayCard(P 4 ; S, R 4 ) FinesseFour(P 4 ; S) PlayCard(P 1 ; S, R 1 ) StandardFinesseTwo(P 2 ; S) LeadLow(P 1 ; S) PlayCard(P 4 ; S, R 4 ’) StandardFinesseThree(P 3 ; S) EasyFinesse(P 2 ; S)BustedFinesse(P 2 ; S) FinesseTwo(P 2 ; S) StandardFinesse(P 2 ; S) Finesse(P 1 ; S) (North—  3) East—  J West—  2 North—  3South—  5South—  Q

Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: 10 Game Tree Generated using the Methods N— QQ E— KK FINESSE N— 22 E— JJ N— 33 W— 22 E— KK S— 33 QQ 55 33 W— AA 33 E— 44 5 CASH OUT N—S— – later stratagems...

Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: 11 l Tignum 2: procedure to plan declarer play u Stephen Smith (then a PhD student at U. of Maryland) u Funded in part by Great Game Products (maker of Bridge Baron) l Result: u New version of Bridge Baron with significantly better declarer play u Won the 1997 world championship of computer bridge l Stephen Smith is now Lead Programmer at Great Game Products Implementation

Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: 12 Other Approaches l Monte Carlo simulation: u Generate many random hypotheses for how the cards might be distributed u Generate and search the game trees »Average the results l This can divide the size of the game tree by as much as 5.2x10 6 u (6x10 44 )/(5.2x10 6 ) = 1.1x10 38 »still quite large u Thus this method by itself is not enough

Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: 13 Other Approaches (continued) l AJS hashing - Applegate, Jacobson, and Sleator, 1991 u Modified version of transposition tables »Each hash-table entry represents a set of positions that are considered to be equivalent »Before searching below a node, first look for a hash-table entry u Reduces the branching factor of the game tree »value calculated for one branch will be stored in the table and used as the value for similar branches l Example: suppose we have  AQ532 u We may want to classify this as  Aqxxx u View the three small cards as equivalent l GIB (winner of the 1998 world computer bridge championship) used a combination of Monte Carlo simulation and AJS hashing l Several current bridge programs do something similar

Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: Computer Bridge Championship Round-Robin (5 rounds) Semi-final Final ProgramScore Bridge Baron (USA) 147 WBridge5 (France) 145 Jack (Netherlands) 138 Micro Bridge (Japan) 131 Q-Plus Bridge (Germany) 108 Blue Chip Bridge (UK) 63 Meadowlark Bridge (USA) 36 Sabrina (France) 3 Bridge Baron Jack