double AlphaBeta(state, depth, alpha, beta) begin if depth <= 0 then return evaluation(state) //op pov for each action “a” possible from state nextstate.

Slides:



Advertisements
Similar presentations
Adversarial Search Chapter 6 Sections 1 – 4. Outline Optimal decisions α-β pruning Imperfect, real-time decisions.
Advertisements

Adversarial Search Chapter 6 Section 1 – 4. Types of Games.
Games & Adversarial Search Chapter 5. Games vs. search problems "Unpredictable" opponent  specifying a move for every possible opponent’s reply. Time.
February 7, 2006AI: Chapter 6: Adversarial Search1 Artificial Intelligence Chapter 6: Adversarial Search Michael Scherger Department of Computer Science.
Game Playing Perfect decisions Heuristically based decisions Pruning search trees Games involving chance.
Games & Adversarial Search
Games and adversarial search
For Monday Read chapter 7, sections 1-4 Homework: –Chapter 4, exercise 1 –Chapter 5, exercise 9.
CS 484 – Artificial Intelligence
Adversarial Search Chapter 6 Section 1 – 4.
Adversarial Search Chapter 5.
COMP-4640: Intelligent & Interactive Systems Game Playing A game can be formally defined as a search problem with: -An initial state -a set of operators.
1 Game Playing. 2 Outline Perfect Play Resource Limits Alpha-Beta pruning Games of Chance.
ITCS 3153 Artificial Intelligence Lecture 9 Adversarial Search Chapter 6 Lecture 9 Adversarial Search Chapter 6.
Adversarial Search CSE 473 University of Washington.
Adversarial Search Chapter 6.
Artificial Intelligence for Games Game playing Patrick Olivier
Adversarial Search 對抗搜尋. Outline  Optimal decisions  α-β pruning  Imperfect, real-time decisions.
An Introduction to Artificial Intelligence Lecture VI: Adversarial Search (Games) Ramin Halavati In which we examine problems.
1 Adversarial Search Chapter 6 Section 1 – 4 The Master vs Machine: A Video.
Games CPSC 386 Artificial Intelligence Ellen Walker Hiram College.
EIE426-AICV 1 Game Playing Filename: eie426-game-playing-0809.ppt.
Game Playing 최호연 이춘우. Overview Intro: Games as search problems Perfect decisions in 2-person games Imperfect decisions Alpha-beta pruning.
G51IAI Introduction to AI Minmax and Alpha Beta Pruning Garry Kasparov and Deep Blue. © 1997, GM Gabriel Schwartzman's Chess Camera, courtesy IBM.
Adversarial Search Board games. Games 2 player zero-sum games Utility values at end of game – equal and opposite Games that are easy to represent Chess.
Lecture 13 Last time: Games, minimax, alpha-beta Today: Finish off games, summary.
Games and adversarial search
UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering CSCE 580 Artificial Intelligence Ch.6: Adversarial Search Fall 2008 Marco Valtorta.
How computers play games with you CS161, Spring ‘03 Nathan Sturtevant.
Adversarial Search: Game Playing Reading: Chess paper.
Games & Adversarial Search Chapter 6 Section 1 – 4.
Game Playing State-of-the-Art  Checkers: Chinook ended 40-year-reign of human world champion Marion Tinsley in Used an endgame database defining.
CSC 412: AI Adversarial Search
PSU CS 370 – Introduction to Artificial Intelligence Game MinMax Alpha-Beta.
1 Game Playing Why do AI researchers study game playing? 1.It’s a good reasoning problem, formal and nontrivial. 2.Direct comparison with humans and other.
Adversarial Search Chapter 6 Section 1 – 4. Outline Optimal decisions α-β pruning Imperfect, real-time decisions.
Introduction to Artificial Intelligence CS 438 Spring 2008 Today –AIMA, Ch. 6 –Adversarial Search Thursday –AIMA, Ch. 6 –More Adversarial Search The “Luke.
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.
1 Adversarial Search CS 171/271 (Chapter 6) Some text and images in these slides were drawn from Russel & Norvig’s published material.
Games 1 Alpha-Beta Example [-∞, +∞] Range of possible values Do DF-search until first leaf.
For Wednesday Read chapter 7, sections 1-4 Homework: –Chapter 6, exercise 1.
Adversarial Search Chapter 6 Section 1 – 4. Search in an Adversarial Environment Iterative deepening and A* useful for single-agent search problems What.
CHAPTER 4 PROBABILITY THEORY SEARCH FOR GAMES. Representing Knowledge.
Adversarial Search Chapter Games vs. search problems "Unpredictable" opponent  specifying a move for every possible opponent reply Time limits.
CSE373: Data Structures & Algorithms Lecture 23: Intro to Artificial Intelligence and Game Theory Based on slides adapted Luke Zettlemoyer, Dan Klein,
Paula Matuszek, CSC 8520, Fall Based in part on aima.eecs.berkeley.edu/slides-ppt 1 CS 8520: Artificial Intelligence Adversarial Search Paula Matuszek.
Artificial Intelligence
Graph Search II GAM 376 Robin Burke. Outline Homework #3 Graph search review DFS, BFS A* search Iterative beam search IA* search Search in turn-based.
Adversarial Search and Game Playing Russell and Norvig: Chapter 6 Slides adapted from: robotics.stanford.edu/~latombe/cs121/2004/home.htm Prof: Dekang.
Explorations in Artificial Intelligence Prof. Carla P. Gomes Module 5 Adversarial Search (Thanks Meinolf Sellman!)
Luca Weibel Honors Track: Competitive Programming & Problem Solving Partisan game theory.
Adversarial Search Chapter 5 Sections 1 – 4. AI & Expert Systems© Dr. Khalid Kaabneh, AAU Outline Optimal decisions α-β pruning Imperfect, real-time decisions.
ADVERSARIAL SEARCH Chapter 6 Section 1 – 4. OUTLINE Optimal decisions α-β pruning Imperfect, real-time decisions.
Adversarial Search CMPT 463. When: Tuesday, April 5 3:30PM Where: RLC 105 Team based: one, two or three people per team Languages: Python, C++ and Java.
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.
5/4/2005EE562 EE562 ARTIFICIAL INTELLIGENCE FOR ENGINEERS Lecture 9, 5/4/2005 University of Washington, Department of Electrical Engineering Spring 2005.
Game Playing Why do AI researchers study game playing?
EA C461 – Artificial Intelligence Adversarial Search
Stochastic tree search and stochastic games
Adversarial Search Chapter 5.
Games & Adversarial Search
Games & Adversarial Search
Adversarial Search.
Games & Adversarial Search
Games & Adversarial Search
Games & Adversarial Search
Adversarial Search CS 171/271 (Chapter 6)
Games & Adversarial Search
Adversarial Search Chapter 6 Section 1 – 4.
Presentation transcript:

double AlphaBeta(state, depth, alpha, beta) begin if depth <= 0 then return evaluation(state) //op pov for each action “a” possible from state nextstate = performAction(a, state) rval = -AlphaBeta(nextstate, depth-1, -beta, -alpha); if (rval >= beta) return rval; if (rval > alpha) alpha = rval; endfor return alpha; end

Meta-Reasoning for Search problem: one legal move only (or one clear favourite)  alpha-beta search will still generate (possibly large) search tree similar symmetrical situations idea: compute utility of expanding a node before expanding it meta-reasoning (reasoning about reasoning): reason about how to spend computing time

Where We are: Chess Technology Search depth Level of play minimax, evaluation function, cut-off test with quiescence search, large transposition table, speed: 1 million nodes/sec 5 plynovice as above, but alpha-beta search 10 plyexpert as above, plus additional pruning, database of openings and end games, supercomputer 14 ply grand master

Deep Blue algorithm: –iterative-deepening alpha-beta search, transposition table, databases incl. openings, grandmaster games (700000), endgames (all with 5 pieces, many with 6) hardware: –30 IBM RS/6000 processors software search: at high level –480 custom chess processors for hardware search: search deep in the tree, move generation and ordering, position evaluation (8000 features) average performance: –126 million nodes/sec., 30 billion position/move generated, search depth: 14 (but up to 40 plies)

Samuel’s Checkers Program (1952) learn an evaluation function by self-play (see: machine learning) beat its creator after several days of self- play hardware: IBM 704 –10kHz processor –10000 words of memory –magnetic tape for long-term storage

Chinook: Checkers World Champion simple alpha-beta search (running on PCs) database of 444 billion positions with eight or fewer pieces problem: Marion Tinsley –world checkers champion for over 40 years –lost three games in all this time 1990: Tinsley vs. Chinook: –Chinook won two games! 1994: Tinsley retires (for health reasons)

Backgammon TD-GAMMON –search only to depth 2 or 3 –evaluation function machine learning techniques (see Samuel’s Checkers Program) neural network –performance ranked amongst top three players in the world program’s opinions have altered received wisdom

Go most popular board game in Asia 19x19 board: initial branching factor 361 –too much for search methods best programs: Goemate/Go4++ –pattern recognition techniques (rules) –limited search (locally) performance: 10 kyu (weak amateur)

A Dose of Reality: Chance unpredictability: –in real life: normal; often external events that are not predictable –in games: add random element, e.g. throwing dice, shuffling of cards games with an element of chance are less “toy problems”

Example: Backgammon move: roll pair of dice move pieces according to result

Search Trees with Chance Nodes problem: –MAX knows its own legal moves –MAX does not know MIN’s possible responses solution: introduce chance nodes –between all MIN and MAX nodes –with n children if there are n possible outcomes of the random element, each labelled with the result of the random element the probability of this outcome

Example: Search Tree for Backgammon 1/ / / / MAX MIN CHANCE move probability + outcome move probability + outcome

Optimal Decisions for Games with Chance Elements aim: pick move that leads to best position idea: calculate the expected value over all possible outcomes of the random element  expectiminimax value

Example: Simple Tree × × 3 = × × 4 =

Complexity of Expectiminimax time complexity: O(b m n m ) –b: maximal number of possible moves –n: number of possible outcomes for the random element –m: maximal search depth example: backgammon –average b is around 20 (but can be up to 4000 for doubles) –n = 21 –about three ply depth is feasible