V. Adamchik Data Structures. Game Trees. Lecture 1. Apr. 05, Plan: 1. Introduction. 2. Game of NIM. 3. Minimax

Similar documents
ARTIFICIAL INTELLIGENCE (CS 370D)

Computer Science and Software Engineering University of Wisconsin - Platteville. 4. Game Play. CS 3030 Lecture Notes Yan Shi UW-Platteville

Game Playing. Garry Kasparov and Deep Blue. 1997, GM Gabriel Schwartzman's Chess Camera, courtesy IBM.

Playing Games. Henry Z. Lo. June 23, We consider writing AI to play games with the following properties:

Adversarial Search Aka Games

mywbut.com Two agent games : alpha beta pruning

Game-playing AIs: Games and Adversarial Search FINAL SET (w/ pruning study examples) AIMA

CPS331 Lecture: Search in Games last revised 2/16/10

UNIT 13A AI: Games & Search Strategies

Adversary Search. Ref: Chapter 5

CS 440 / ECE 448 Introduction to Artificial Intelligence Spring 2010 Lecture #5

Game Playing AI Class 8 Ch , 5.4.1, 5.5

Adversarial Search and Game Playing. Russell and Norvig: Chapter 5

CPS 570: Artificial Intelligence Two-player, zero-sum, perfect-information Games

game tree complete all possible moves

Module 3. Problem Solving using Search- (Two agent) Version 2 CSE IIT, Kharagpur

Artificial Intelligence Search III

INF September 25, The deadline is postponed to Tuesday, October 3

2 person perfect information

Adversarial Search (Game Playing)

Game-playing AIs: Games and Adversarial Search I AIMA

COMP219: Artificial Intelligence. Lecture 13: Game Playing

Lecture 33: How can computation Win games against you? Chess: Mechanical Turk

Computer Game Programming Board Games

Games (adversarial search problems)

COMP219: COMP219: Artificial Intelligence Artificial Intelligence Dr. Annabel Latham Lecture 12: Game Playing Overview Games and Search

Outline. Game Playing. Game Problems. Game Problems. Types of games Playing a perfect game. Playing an imperfect game

CS 2710 Foundations of AI. Lecture 9. Adversarial search. CS 2710 Foundations of AI. Game search

Minimax Trees: Utility Evaluation, Tree Evaluation, Pruning

Adversarial Search and Game- Playing C H A P T E R 6 C M P T : S P R I N G H A S S A N K H O S R A V I

CS 331: Artificial Intelligence Adversarial Search II. Outline

CS 1571 Introduction to AI Lecture 12. Adversarial search. CS 1571 Intro to AI. Announcements

CS440/ECE448 Lecture 9: Minimax Search. Slides by Svetlana Lazebnik 9/2016 Modified by Mark Hasegawa-Johnson 9/2017

Programming Project 1: Pacman (Due )

CS 771 Artificial Intelligence. Adversarial Search

Artificial Intelligence

Artificial Intelligence. Minimax and alpha-beta pruning

UNIT 13A AI: Games & Search Strategies. Announcements

Game-Playing & Adversarial Search

Games and Adversarial Search

Game Playing. Philipp Koehn. 29 September 2015

Last update: March 9, Game playing. CMSC 421, Chapter 6. CMSC 421, Chapter 6 1

Adversarial Search. Rob Platt Northeastern University. Some images and slides are used from: AIMA CS188 UC Berkeley

Today. Types of Game. Games and Search 1/18/2010. COMP210: Artificial Intelligence. Lecture 10. Game playing

Algorithms for Data Structures: Search for Games. Phillip Smith 27/11/13

Foundations of AI. 6. Adversarial Search. Search Strategies for Games, Games with Chance, State of the Art. Wolfram Burgard & Bernhard Nebel

Artificial Intelligence

Game Playing Part 1 Minimax Search

Adversarial search (game playing)

2/5/17 ADVERSARIAL SEARCH. Today. Introduce adversarial games Minimax as an optimal strategy Alpha-beta pruning Real-time decision making

Foundations of AI. 6. Board Games. Search Strategies for Games, Games with Chance, State of the Art

CS 188: Artificial Intelligence

Foundations of Artificial Intelligence

Foundations of Artificial Intelligence

Announcements. Homework 1 solutions posted. Test in 2 weeks (27 th ) -Covers up to and including HW2 (informed search)

Game Playing. Why do AI researchers study game playing? 1. It s a good reasoning problem, formal and nontrivial.

6. Games. COMP9414/ 9814/ 3411: Artificial Intelligence. Outline. Mechanical Turk. Origins. origins. motivation. minimax search

Artificial Intelligence. 4. Game Playing. Prof. Bojana Dalbelo Bašić Assoc. Prof. Jan Šnajder

Recherche Adversaire

Solving Problems by Searching: Adversarial Search

Game-Playing & Adversarial Search Alpha-Beta Pruning, etc.

CS440/ECE448 Lecture 11: Stochastic Games, Stochastic Search, and Learned Evaluation Functions

CS885 Reinforcement Learning Lecture 13c: June 13, Adversarial Search [RusNor] Sec

CMPUT 396 Tic-Tac-Toe Game

Games CSE 473. Kasparov Vs. Deep Junior August 2, 2003 Match ends in a 3 / 3 tie!

CS 188: Artificial Intelligence Spring Game Playing in Practice

CSE 473: Artificial Intelligence. Outline

Adversarial Search. Human-aware Robotics. 2018/01/25 Chapter 5 in R&N 3rd Ø Announcement: Slides for this lecture are here:

Game Playing AI. Dr. Baldassano Yu s Elite Education

Adversarial Search 1

CS 188: Artificial Intelligence Spring Announcements

4. Games and search. Lecture Artificial Intelligence (4ov / 8op)

CS 5522: Artificial Intelligence II

Foundations of AI. 5. Board Games. Search Strategies for Games, Games with Chance, State of the Art. Wolfram Burgard and Luc De Raedt SA-1

ADVERSARIAL SEARCH. Today. Reading. Goals. AIMA Chapter , 5.7,5.8

CS 4700: Foundations of Artificial Intelligence

Intuition Mini-Max 2

Adversarial Search. Hal Daumé III. Computer Science University of Maryland CS 421: Introduction to Artificial Intelligence 9 Feb 2012

Artificial Intelligence. Topic 5. Game playing

Lecture 14. Questions? Friday, February 10 CS 430 Artificial Intelligence - Lecture 14 1

Game Playing State-of-the-Art CSE 473: Artificial Intelligence Fall Deterministic Games. Zero-Sum Games 10/13/17. Adversarial Search

Adversarial Search. Robert Platt Northeastern University. Some images and slides are used from: 1. CS188 UC Berkeley 2. RN, AIMA

Artificial Intelligence

Artificial Intelligence 1: game playing

Contents. Foundations of Artificial Intelligence. Problems. Why Board Games?

Announcements. CS 188: Artificial Intelligence Spring Game Playing State-of-the-Art. Overview. Game Playing. GamesCrafters

Ch.4 AI and Games. Hantao Zhang. The University of Iowa Department of Computer Science. hzhang/c145

Artificial Intelligence Adversarial Search

Artificial Intelligence Lecture 3

Outline. Game playing. Types of games. Games vs. search problems. Minimax. Game tree (2-player, deterministic, turns) Games

Introduction to AI Techniques

CS 380: ARTIFICIAL INTELLIGENCE ADVERSARIAL SEARCH. Santiago Ontañón

CS10 : The Beauty and Joy of Computing

Adversarial Search: Game Playing. Reading: Chapter

CSE 332: Data Structures and Parallelism Games, Minimax, and Alpha-Beta Pruning. Playing Games. X s Turn. O s Turn. X s Turn.

Game playing. Outline

Artificial Intelligence

CS 4700: Artificial Intelligence

Game Playing State-of-the-Art. CS 188: Artificial Intelligence. Behavior from Computation. Video of Demo Mystery Pacman. Adversarial Search

Game Playing State-of-the-Art

Transcription:

Game Trees Lecture 1 Apr. 05, 2005 Plan: 1. Introduction 2. Game of NIM 3. Minimax

V. Adamchik 2 ü Introduction The search problems we have studied so far assume that the situation is not going to change. For example, searching a tree or a string. In game playing this is not the case. If you make a move then your opponent is going to move next, so you cannot be certain what the board state will be after your opponents move. Game playing has a long history within computer science research. Poker A research history of poker started with von Neumann (1944) in his work on economics (in which game theory was developed). It was recognized that bluffing is a part of any automated poker player. Findler (1977) studied automated poker, over a 20 year period. He concluded that dynamic and adaptive algorithms are required for successful play and static mathematical models were unsuccessful and easily beaten. Poker is interesting, from a research point of view, as it is a game of imperfect information. Unlike chess and checkers, games such as poker have some information that is unseen. Poker also contains other unknowns such as the playing styles of the other players who may use bluffing (and double bluffing) during the course of the game. Unlike complete information games where the techniques to solve the games (computational power allowing) have been known and understood for a long time (such as mini-max search and alpha-beta pruning), games of imperfect information have not received the same sort of analysis and, doing so, could prove relevant to many other areas such as economics, on-line auctions and negotiating. Nowadays the best automated poker is called Loki, developed at the University of Alberta. It cannot yet compete in the World Series of Poker. Here at CMU we also have people (J. Bertomeu) working in this area.

Chess In 1949, Claude Shannon (a scientist at Bell Laboratories) delivered a paper where he presented his ideas as to how a computer could play chess. He noted that chess has 10 120 possible moves (or unique chess boards). The bottom estimate. Each player has 16 pieces. There are at least 20 possible moves (8 pawns moving 1 or 2 positions plus two knights). On average, a chess game has 40 moves. Therefore, the total number of moves is 10 104. The upper estimate 10 120 In 1957, artificial intelligence pioneers Herbert Simon and Allen Newell (they are from CMU) predicted that a computer would beat a human at chess within 10 years. The prediction was part of an attempt "to give some feeling for what computers would mean" to society. And it was lumped with three others -- making music, proving a math theorem, and expressing a psychological theory in computer code. In the mid-1980s, scientists at CMU started the work that was to become the Deep Blue project. The project moved to IBM in 1989. On May 11, 1997, Kasparov lost a six game match against deep blue with a score of 2.5-3.5.

V. Adamchik 4 ü Game of NIM Nim is a two player game in which players alternate making moves. Initially the players are given several piles of sticks. Each pile can have any number of sticks in it. On each turn a player can remove any number of sticks from one pile. The player must remove a minimum of one stick from the pile or may remove the whole pile. The player who picks up the last stick loses (or wins, it depends on variation). The NIM game (1, 2, 2) is presented below (credit to McGill Univ. for the pix) Each level represents either the MAX score for the player (assuming that he/she make a first move) or the MIN score for the opponent. We also assign 0s and 1s to each node. A loss is presented by "0" and a win is presented by "1". We start assigning score from the leaves going up to the root: the scores are assigned to "0" if the leaves are at MAX nodes and the scores are assigned to "1" if the leaves are MIN. When we back up we choose the MAXIMUM score of the children if we are on the MAX level; the MINIMUM score of the children if we are on the MIN level;

In this example, we get 1 for the root, which means that there is a winning strategy. To find that strategy we should follow 1s nodes. ü Minimax This method was originally published by John von Neumann in 1944. In order to implement minimax you need some way of measuring how good (or bad) your position is. In a two player game, the first player moves with MAX score and the second player moves with MIN score. A minimax search is used to determine all possible continuations of the game up to a desired level. A score is originally assigned to the leaf, then by evaluating each possible set of moves, a score is assigned to the upper level by the minimax algorithm. The minimax algorithm performs a preorder traversal and computes the scores on the fly. The same would be obtained by a simple recursive algorithm. The rule is as follows: A true minimax search tree is very expensive, since each node must be visited. For games of any size we cannot calculate the entire game tree. Exercise. Draw a game tree for the tic-tac-toe game. How many nodes in that tree?