Chapter 23 Planning in the Game of Bridge

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:
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.
CS 484 – Artificial Intelligence
Lecture 12 Last time: CSPs, backtracking, forward checking Today: Game Playing.
Adversarial Search CSE 473 University of Washington.
MINIMAX SEARCH AND ALPHA- BETA PRUNING: PLAYER 1 VS. PLAYER 2.
Games CPSC 386 Artificial Intelligence Ellen Walker Hiram College.
Practical techniques for agents playing multi-player games
Min-Max Trees Based on slides by: Rob Powers Ian Gent Yishay Mansour.
Games Search Neil Heffernan Some of these slides are screen shots from the the slides my professor at CMU (Andrew Moore) used. (Sorry for the low resolution)
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.
CISC 235: Topic 6 Game Trees.
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
Instructor: Vincent Conitzer
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.
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License:
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.
S 04 Making a Plan BRIDGE FOR SCHOLARS JANUARY 2016.
Adversarial Search 2 (Game Playing)
Parallel Programming in Chess Simulations Part 2 Tyler Patton.
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.
Adversarial Search Chapter Two-Agent Games (1) Idealized Setting – The actions of the agents are interleaved. Example – Grid-Space World – Two.
Artificial Intelligence AIMA §5: Adversarial Search
Adversarial Search and Game-Playing
Instructor: Vincent Conitzer
Stochastic tree search and stochastic games
4. Games and adversarial search
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
Pengantar Kecerdasan Buatan
State Space 4 Chapter 4 Adversarial Games.
Development and Implementation of a Machine Bridge Bidding Algorithm
Adversarial Search Chapter 5.
Expectimax Lirong Xia. Expectimax Lirong Xia Project 2 MAX player: Pacman Question 1-3: Multiple MIN players: ghosts Extend classical minimax search.
Chapter 23 Planning in the Game of Bridge
Game playing.
Alpha-Beta Search.
Kevin Mason Michael Suggs
NIM - a two person game n objects are in one pile
Alpha-Beta Search.
Instructor: Vincent Conitzer
Introduction to Artificial Intelligence Lecture 9: Two-Player Games I
Alpha-Beta Search.
Chapter 23 Planning in the Game of Bridge
Alpha-Beta Search.
Instructor: Vincent Conitzer
Mini-Max search Alpha-Beta pruning General concerns on games
Based on slides by: Rob Powers Ian Gent
How to be a 1st Team player.
Games & Adversarial Search
Adversarial Search CMPT 420 / CMPG 720.
Adversarial Search CS 171/271 (Chapter 6)
Alpha-Beta Search.
Unit II Game Playing.
Minimax Trees: Utility Evaluation, Tree Evaluation, Pruning
Presentation transcript:

Chapter 23 Planning in the Game of Bridge Lecture slides for Automated Planning: Theory and Practice Chapter 23 Planning in the Game of Bridge Dana S. Nau University of Maryland 10:33 PM January 1, 2019

Computer Programs for Games of Strategy Connect Four: solved Go-Moku: solved Qubic: solved Nine Men’s Morris: solved Checkers: solved Othello: better than humans Backgammon: better than all but about 10 humans Chess: competitive with the best humans • Bridge: about as good as mid-level humans

Computer Programs for Games of Strategy 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 Largely “brute force” Can prune off portions of the tree cutoff depth & static evaluation function alpha-beta pruning transposition tables … But even then, it still examines thousands of game positions For bridge, this has some problems … 10 -3 5 9 -2 -7 2 3

How Bridge Works Four players; 52 playing cards dealt equally among them Bidding to determine the trump suit Declarer: whoever makes highest bid Dummy: declarer’s partner The basic unit of play is the trick One player leads; the others must follow suit if possible Trick won by highest card of the suit led, unless someone plays a trump Keep playing tricks until all cards have been played Scoring based on how many tricks were bid and how many were taken West North East South 6  2 8 Q  J 5 9  7 A K 3 

Game Tree Search in Bridge Bridge is an imperfect information game Don’t know what cards the others have (except the dummy) Many possible card distributions, so many possible moves If we encode the additional moves as additional branches in the game tree, this increases the branching factor b Number of nodes is exponential in b worst case: about 6x1044 leaf nodes average case: about 1024 leaf nodes A chess game may take several hours A bridge game takes about 1.5 minutes b =2 b =3 b =4 Not enough time to search the game tree

Reducing the Size of the Game Tree One approach: HTN planning Bridge is a game of planning The declarer plans how to play the hand The plan combines various strategies (ruffing, finessing, etc.) 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) Modified to generate game trees instead of just paths Describe standard bridge strategies as collections of methods Use HTN decomposition to generate a game tree in which each move corresponds to a different strategy, not a different card Brute-force search HTN-generated trees Worst case ≈ 6x1044 leaf nodes ≈ 305,000 leaf nodes Average case ≈ 1024 leaf nodes ≈ 26,000 leaf nodes

Methods for Finessing … … task Finesse(P1; S) method time ordering LeadLow(P1; S) FinesseTwo(P2; S) possible moves by 1st opponent PlayCard(P1; S, R1) EasyFinesse(P2; S) StandardFinesse(P2; S) BustedFinesse(P2; S) … … dummy StandardFinesseTwo(P2; S) StandardFinesseThree(P3; S) FinesseFour(P4; S) PlayCard(P2; S, R2) PlayCard(P3; S, R3) PlayCard(P4; S, R4) PlayCard(P4; S, R4’) 1st opponent declarer 2nd opponent

Instantiating the Methods Us: East declarer, West dummy Opponents: defenders, South & North Contract: East – 3NT On lead: West at trick 3 task Finesse(P1; S) East: KJ74 West: A2 Out: QT98653 method time ordering LeadLow(P1; S) FinesseTwo(P2; S) possible moves by 1st opponent PlayCard(P1; S, R1) EasyFinesse(P2; S) StandardFinesse(P2; S) BustedFinesse(P2; S) … … West— 2 dummy (North— Q) (North— 3) StandardFinesseTwo(P2; S) StandardFinesseThree(P3; S) FinesseFour(P4; S) PlayCard(P2; S, R2) PlayCard(P3; S, R3) PlayCard(P4; S, R4) PlayCard(P4; S, R4’) North— 3 East— J South— 5 South— Q 1st opponent declarer 2nd opponent

Generating Part of a Game Tree Finesse(P1; S) The red boxes are the leaf nodes LeadLow(P1; S) FinesseTwo(P2; S) PlayCard(P1; S, R1) EasyFinesse(P2; S) StandardFinesse(P2; S) BustedFinesse(P2; S) … … West— 2 (North— Q) (North— 3) StandardFinesseTwo(P2; S) StandardFinesseThree(P3; S) FinesseFour(P4; S) PlayCard(P2; S, R2) PlayCard(P3; S, R3) PlayCard(P4; S, R4) PlayCard(P4; S, R4’) North— 3 East— J South— 5 South— Q

Game Tree Generated using the Methods ... later stratagems ... FINESSE S— Q –100 0.5 N— 2 E— J 0.9854 S— 5 +265 +265 +630 0.5 W— 2 N— Q E— K S— 3 +630 0.0078 +270.73 +630 +630 N— 3 E— K S— 3 +600 0.0078 +600 +600 +600 +600 CASH OUT W— A N— 3 E— 4 S— 5  +600 +600 +600 +600

Implementation Stephen J. Smith, then a PhD student at U. of Maryland Wrote a procedure to plan declarer play Incorporated it into Bridge Baron, an existing commercial product This significantly improved Bridge Baron’s declarer play Won the 1997 world championship of computer bridge Since then: Stephen Smith is now Great Game Products’ lead programmer He has made many improvements to Bridge Baron Proprietary, I don’t know what they are Bridge Baron was a finalist in the 2003 and 2004 computer bridge championships I haven’t kept track since then

Other Approaches Monte Carlo simulation: Generate many random hypotheses for how the cards might be distributed Generate and search the game trees Average the results This can divide the size of the game tree by as much as 5.2x106 (6x1044)/(5.2x106) = 1.1x1038 still quite large Thus this method by itself is not enough

Other Approaches (continued) AJS hashing - Applegate, Jacobson, and Sleator, 1991 Modified version of transposition tables Each hash-table entry represents a set of positions that are considered to be equivalent Example: suppose we have AQ532 View the three small cards as equivalent: Aqxxx Before searching, first look for a hash-table entry 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 GIB (1998-99 computer bridge champion) used a combination of Monte Carlo simulation and AJS hashing Several current bridge programs do something similar

Top contenders in computer bridge championships, 1997–2004 Year #1 #2 #3 #4      1997 Bridge Baron Q-Plus Micro Bridge Meadowlark 1998 GIB Q-Plus Micro Bridge Bridge Baron 1999 GIB WBridge5 Micro Bridge Bridge Buff 2000 Meadowlark Q-Plus Jack WBridge5 2001 Jack Micro Bridge WBridge5 Q-Plus 2002 Jack Wbridge5 Micro Bridge ? 2003 Jack Bridge Baron WBridge5 Micro Bridge 2004 Jack Bridge Baron WBridge5 Micro Bridge I haven’t kept track since 2004 For more information see http://www.jackbridge.com/ewkprt.htm