UNIT 13A AI: Games & Search Strategies

Similar documents
UNIT 13A AI: Games & Search Strategies. Announcements

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

Adversarial Search (Game Playing)

A.M. Turing, computer pioneer, worried about intelligence in humans & machines; proposed a test (1950) thinks with electricity

Progress has been tremendous. Lawrence Snyder University of Washington, Seattle

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

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

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

Adversary Search. Ref: Chapter 5

Foundations of Artificial Intelligence

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

Foundations of Artificial Intelligence

Game Playing AI Class 8 Ch , 5.4.1, 5.5

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

CS2212 PROGRAMMING CHALLENGE II EVALUATION FUNCTIONS N. H. N. D. DE SILVA

Adversarial Search Aka Games

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

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

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

Artificial Intelligence Adversarial Search

Monte Carlo Tree Search

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

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

Artificial Intelligence Search III

game tree complete all possible moves

Game Playing AI. Dr. Baldassano Yu s Elite Education

CS 331: Artificial Intelligence Adversarial Search II. Outline

Programming Project 1: Pacman (Due )

CS 5522: Artificial Intelligence II

CS 188: Artificial Intelligence

GAMES COMPUTERS PLAY

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

CS 188: Artificial Intelligence Spring Announcements

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

COMP219: Artificial Intelligence. Lecture 13: Game Playing

Artificial Intelligence

2 person perfect information

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

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

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

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

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

CS 4700: Foundations of Artificial Intelligence

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

Game Playing State of the Art

CS360: AI & Robotics. TTh 9:25 am - 10:40 am. Shereen Khoja 8/29/03 CS360 AI & Robotics 1

CMPUT 396 Tic-Tac-Toe Game

Artificial Intelligence. Minimax and alpha-beta pruning

Games (adversarial search problems)

CSE 473: Artificial Intelligence. Outline

Using Neural Network and Monte-Carlo Tree Search to Play the Game TEN

CS 771 Artificial Intelligence. Adversarial Search

Artificial Intelligence

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

mywbut.com Two agent games : alpha beta pruning

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

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

ARTIFICIAL INTELLIGENCE (CS 370D)

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

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 188: Artificial Intelligence Spring Game Playing in Practice

Announcements. CS 188: Artificial Intelligence Fall Today. Tree-Structured CSPs. Nearly Tree-Structured CSPs. Tree Decompositions*

Artificial Intelligence. Topic 5. Game playing

Monday, February 2, Is assigned today. Answers due by noon on Monday, February 9, 2015.

Artificial Intelligence

Local Search. Hill Climbing. Hill Climbing Diagram. Simulated Annealing. Simulated Annealing. Introduction to Artificial Intelligence

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

CS 188: Artificial Intelligence. Overview

The Mathematics of Playing Tic Tac Toe

Adversarial Search Lecture 7

Game-Playing & Adversarial Search

Training a Back-Propagation Network with Temporal Difference Learning and a database for the board game Pente

CSE 573: Artificial Intelligence Autumn 2010

Game Playing State-of-the-Art

Wednesday, February 1, 2017

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

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

CITS3001. Algorithms, Agents and Artificial Intelligence. Semester 2, 2016 Tim French

Announcements. CS 188: Artificial Intelligence Fall Local Search. Hill Climbing. Simulated Annealing. Hill Climbing Diagram

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

CS 188: Artificial Intelligence Spring 2007

More Adversarial Search

AI in Tabletop Games. Team 13 Josh Charnetsky Zachary Koch CSE Professor Anita Wasilewska

AIs may use randomness to finally master this ancient game of strategy

Conversion Masters in IT (MIT) AI as Representation and Search. (Representation and Search Strategies) Lecture 002. Sandro Spina

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

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

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

Artificial Intelligence

Game Tree Search. Generalizing Search Problems. Two-person Zero-Sum Games. Generalizing Search Problems. CSC384: Intro to Artificial Intelligence

Game Tree Search. CSC384: Introduction to Artificial Intelligence. Generalizing Search Problem. General Games. What makes something a game?

Adversarial Search. CMPSCI 383 September 29, 2011

Games and Adversarial Search

CS 188: Artificial Intelligence

Welcome to CSC384: Intro to Artificial MAN.

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

Solving Problems by Searching: Adversarial Search

CSE 573: Artificial Intelligence

CS10 : The Beauty and Joy of Computing

Announcements. Homework 1. Project 1. Due tonight at 11:59pm. Due Friday 2/8 at 4:00pm. Electronic HW1 Written HW1

Transcription:

UNIT 13A AI: Games & Search Strategies 1 Artificial Intelligence Branch of computer science that studies the use of computers to perform computational processes normally associated with human intellect and skill. Some areas of AI: Game playing Knowledge representation Robotics Machine learning Natural language processing Speech & Vision Allen Newell and Herbert Simon (CMU) General Problem Solver (GPS) in 1957 Received the Turing Award in 1975 for "basic contributions to artificial intelligence, the psychology of human cognition, and list processing." Newell Simon 2 1

A Cynic s View AI is the study of how to get computers to do things we don t understand. thinking, learning, creativity, etc. When we do understand something, it s no longer AI: it s just programming. 3 Game Trees For most games, the number of possible moves and potential outcomes is HUGE. An AI technique used to manage this computation is the use of a game tree. A tree is built with a root node representing the current state of the game. Child nodes are generated representing the state of the game for each possible move. The tree is propagated down, building more child nodes for moves allowed by the next move, etc. Leaves are terminal states of the game. 4 2

Tic Tac Toe (Not Huge) O O O O O O O O 5 How Big is the Tic-Tac-Toe Tree? Assuming that all nine positions must be filled before the game ends, how big does this tree get? Of course, in real Tic-Tac-Toe, a player can win without filling the whole board. What is the first level of the tree where this can occur? How big is this tree up to this level? 6 3

KCD s Optimal Tic-Tac-Toe http://xkcd.com/832 7 8 4

Move 1 9 O Move 1 10 5

Move 2 11 O Move 2 12 6

Move 3 13 O Move 3 14 7

Move 4 To Win 15 Tic-Tac-Toe Is Completely Searchable For the first move, pick a square at random. (Always picking the same square would be boring.) For subsequent moves: Using recursion, grow the entire game tree with the current board state as the root (fewer than 5000 nodes). For each child of the root, count how many games below that child end in a win. Pick the child with the most wins. 16 8

Dealing With Huge Search Spaces How does a computer program that plays chess or go deal with the huge size of the game trees that can be generated? In chess, the average number of possible next moves is around 35, and the average number of moves in a chess game is around 100, so the number of possibilities a computer must check is about 35 100, which is beyond hope, even for our fastest computers! These programs use heuristics to narrow the search space in the tree that must be examined 17 Heuristics Human thought is not purely deductive. It often relies on approximations or analogies. A heuristic is a rule of thumb that may not always be correct but usually gives useful results. Heuristic algorithms are helpful because they can find a reasonably good solution to a problem without requiring excessive search. 18 9

AI Opponents Consider the game of Pente. Players alternate, placing their stones on the game board at the intersection of lines, one at a time. The object of the game is to be the first player to either get five stones in a straight line or capture 5 pairs of stones of the other player. Capture means two adjacent stones surrounded by opponent stones. Captured stones are removed. If we were write a computer program to play Pente against a human player, how does the computer calculate its moves when there are a huge amount of possibilities to consider? 19 Black Wins With 5 In A Row 20 10

Capture in Pente 21 Black To Move; White Will Win 22 11

Heuristics Important board features to look for in Pente: Check for x-pieces in a row. Check for capture possibilities. Check for x-pieces in a row for opponent. Check for opponent s potential to make a capture. Compute a feature score and choose squares with high value: Example: threat score. Code each cell based on number of opponent pieces in same row, column and diagonal. http://www.generation5.org/content/2000/boardai.asp 23 Deep Blue IBM's "Deep Blue" computer beats Gary Kasparov in a chess match in 1997. Heuristics values: The value of each piece. (1 for pawn up to 9 for queen) The amount of control each side has over the board. The safety of the king. The quickness that pieces move into fighting position. For more info: http://www.research.ibm.com/deepblue/home/html/b.html Is Deep Blue intelligent? 24 12

Chinook Created by computer scientists from the University of Alberta to play checkers (draughts) in 1989. In 2007, the team led by Jonathan Schaeffer announced that Chinook could never lose a game. Checkers had been solved! Chinook's algorithms featured: a library of opening moves from games played by grandmasters a deep search algorithm a good move evaluation function (based on piece count, kings count, trapped kings, player s turn, runaway checkers, etc.) an end-game database for all positions with eight pieces or fewer. and other minor factors. Is Chinook intelligent? 25 The Imitation Game (Turing Test) Proposed by Alan Turing in 1948. A human interrogator communicates with two players via teletype. One player is human, the other a machine. Each tries to convince the interrogator that he is the human. If the interrogator can t tell which player is human, the machine must be intelligent. 26 13

From Turing s Paper Shakespeare s Sonnet 18 Interrogator: In the first line of your sonnet which reads Shall I compare thee to a summer s day, would not a spring day do as well or better? Computer: It wouldn t scan. Interrogator: How about a winter s day? That would scan all right. Computer: Yes, but nobody wants to be compared to a winter s day. 27 Interrogator: Would you say Mr. Pickwick reminded you of Christmas? Computer: In a way. Dickens character Interrogator: Yet Christmas is a winter s day, and I do not think Mr. Pickwick would mind the comparison. Computer: I don t think you re serious. By a winter s day one means a typical winter s day, not a special one like Christmas. 28 14

Watson IBM's Watson" computer beats champions Ken Jennings and Brad Rutter in a 2-game match on Jeopardy! in 2011. Watson parsed clues into different keywords and fragments. Watson had 4TB of data content but was not connected to the Internet during the game. Watson executed 1000s of proven language analysis algorithms concurrently. The more algorithms that pointed to the same answer, the more confident Watson was and the more likely it would buzz in. Is Watson intelligent? 29 15