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

Similar documents
CS10 : The Beauty and Joy of Computing

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

Adversarial Search (Game Playing)

CS10 : The Beauty and Joy of Computing


Artificial Intelligence. Minimax and alpha-beta 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 188: Artificial Intelligence Spring Game Playing in Practice

Game Playing AI Class 8 Ch , 5.4.1, 5.5

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

Adversarial Search Aka Games

Adversarial Search: Game Playing. Reading: Chapter

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

Game Playing AI. Dr. Baldassano Yu s Elite Education

CS 771 Artificial Intelligence. Adversarial Search

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

Programming Project 1: Pacman (Due )

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

ARTIFICIAL INTELLIGENCE (CS 370D)

Game-Playing & Adversarial Search

CS 331: Artificial Intelligence Adversarial Search II. Outline

CS 188: Artificial Intelligence

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

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

game tree complete all possible moves

Artificial Intelligence Adversarial Search

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

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

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

CS 188: Artificial Intelligence Spring Announcements

Set 4: Game-Playing. ICS 271 Fall 2017 Kalev Kask

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

Monte Carlo Tree Search

Artificial Intelligence

Game Playing State of the Art

2359 (i.e. 11:59:00 pm) on 4/16/18 via Blackboard

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

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

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

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

CS 5522: Artificial Intelligence II

Game-playing AIs: Games and Adversarial Search I AIMA

COMP219: Artificial Intelligence. Lecture 13: Game Playing

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

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

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

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

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

2 person perfect information

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

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

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

Adversarial Search and Game Playing

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

Math 152: Applicable Mathematics and Computing

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

CSE 40171: Artificial Intelligence. Adversarial Search: Games and Optimality

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

Intuition Mini-Max 2

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

CSE 573: Artificial Intelligence Autumn 2010

Artificial Intelligence

Adversarial Search. Read AIMA Chapter CIS 421/521 - Intro to AI 1

CSE 473: Artificial Intelligence. Outline

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

CS 188: Artificial Intelligence

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

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

Adversarial Search. Chapter 5. Mausam (Based on slides of Stuart Russell, Andrew Parks, Henry Kautz, Linda Shapiro) 1

Game Playing Part 1 Minimax Search

Adversarial Search. Soleymani. Artificial Intelligence: A Modern Approach, 3 rd Edition, Chapter 5

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

CHECKMATE! A Brief Introduction to Game Theory. Dan Garcia UC Berkeley. The World. Kasparov

ADVERSARIAL SEARCH. Today. Reading. Goals. AIMA Chapter Read , Skim 5.7

Adversary Search. Ref: Chapter 5

Games (adversarial search problems)

150 Students Can t Be Wrong! GamesCrafters,, a Computational Game Theory Undergraduate Research and Development Group at UC Berkeley

Artificial Intelligence, CS, Nanjing University Spring, 2018, Yang Yu. Lecture 4: Search 3.

Adversarial search (game playing)

Game-playing: DeepBlue and AlphaGo

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

CS 188: Artificial Intelligence. Overview

Adversarial Search Lecture 7

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

Ar#ficial)Intelligence!!

CS 229 Final Project: Using Reinforcement Learning to Play Othello

Minimax Trees: Utility Evaluation, Tree Evaluation, Pruning

Chapter 6. Overview. Why study games? State of the art. Game playing State of the art and resources Framework

Artificial Intelligence Search III

CS 188: Artificial Intelligence Spring 2007

Tutorial 1. (ii) There are finite many possible positions. (iii) The players take turns to make moves.

CSE 573: Artificial Intelligence

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

Foundations of Artificial Intelligence

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

Unit-III Chap-II Adversarial Search. Created by: Ashish Shah 1

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

Foundations of Artificial Intelligence

Recherche Adversaire

Transcription:

4/2/0 CS 202 Introduction to Computation " UNIVERSITY of WISCONSIN-MADISON Computer Sciences Department Lecture 33: How can computation Win games against you? Professor Andrea Arpaci-Dusseau Spring 200 Chess: Mechanical Turk Automaton Chess Player Chess-playing machine 770-854 Play strong game of chess against human opponent Arms move chess pieces Gears shown off inside The Turk won most games Europe and the Americas Defeated many challengers including statesmen Napoleon Bonaparte and Benjamin Franklin The Turk: a mechanical illusion Human chess master hiding inside to operate the machine Revealed in 820s

4/2/0 Chess: Deep Blue Feb 996: first machine to win chess game vs. reigning world champion Garry Kasparov under regular time controls Lose match May 997: Upgrade wins match Search 6-8 moves ahead (up to 20 moves) Kasparov said saw deep intelligence and creativity in machine's moves Claimed person was directing Deep Blue Change between games to fix weaknesses What types of Strategy Games? Examples: Tic-Tac-Toe, Connect 4, Othello, Checkers, Chess No chance involved (no dice or card games) Both players have complete information No hidden information (no Stratego or Magic) Two players alternate moves No simultaneous moves Win, Tie, or Lose: Game ends in a pattern, capture, by the absence of moves 2

4/2/0 Exercise: Variation of Nim (Subtraction Game) Rules: 2 players, 7 objects Take turns Remove, 2, or 3 objects Winner: Takes last object Play several times, alternate who goes first Can you devise winning strategy? If solve for 7 objects, try with different numbers of starting pieces Record states: Fill in 7 slots Use (player ) Use 0 (player 2) Example: " "000 "000 wins Random Strategies? Just pick, 2, or 3 at random! Exhaustive search Record every possible move for and O Which ones lead to winning? Do those next game Insight Remove,2, or 3 such that remaining N mod 4 = 0 3

4/2/0 Exhaustively Analyze all Possibilities 7 Empty slots Possibility : Initial move of 3 s O O O O O O Conclusion: can always win if it places 3 (given 7 initially) Leaving 4 squares is good Exhaustively Analyze all Possibilities Possibility 2: Initial move of 2 s O O O O O O O No matter what does, O can win may not win if it takes 2 (given 7 initially) Leaving 5 is bad 4

4/2/0 Nim Game Trees: Empty Board 2 moves Nodes: Game positions or states Edges: Moves or transitions Empty Board 0 OO OOO O OO OOO 0 00 000 Nim Game Tree: 3 s for first move Empty Board Leaf node: Winner Purple: Wins Red: O Wins 0 00 000 0 0 0 00 00 000 00 OOO 00 000 OO 3 s good move: All paths can lead to winning 5

4/2/0 Computer Chess Great website http://www.computerhistory.org/chess/ Interactive Demo: http://www.computerhistory.org/chess/ interact/index_content.html Minimax Algorithm: Game Tree Associate values: 0: tie : computer win -: opponent win Strategy Assume each makes best move for itself Pick path to victory! Algorithm Start at leaves Propagate max value before computer turn Propagate min value up before opponent turn Choose max path down 6

4/2/0 Nim Game Tree: 3 s for first move Empty Board Leaf node: Winner Purple: Wins Red: O Wins 0 00 000 0 0 0 00 00 000 00 OOO 00 000 OO 3 s good move: All paths can lead to winning Leaf node: Winner Purple: Wins Red: O Wins Computer turn Human turn Computer turn - 00 0 Nim Game Tree: 3 s for first move - OOO 0 Empty Board - 0 00-0 - 00 000 00 00-000 000 Human turn OO Computer turn Conclusion: Player can always win with 7 objects by initially taking 3 7

4/2/0 Strongly Solve? Nim and tic-tac-toe have relatively few board positions Can exhaustively search every possibility Can determine best strategy ahead-of-time and hard-code solution Chess: too many board positions to exhaustively search Can only search few moves ahead and/or some possibilities at each move Determine strategy as play, based on observed positions Today s Summary Game Strategies Construct game tree to determine best moves for self and opponent Minimax algorithm: Assume each makes best moves for self Reading 3 articles on computer chess http://www.computerhistory.org/chess Announcements Exam 2 being graded Sign up for Project 2 Demos! Comments done before! Homework 8 available: Due week 8