CS10 : The Beauty and Joy of Computing

Similar documents
CS10 : The Beauty and Joy of Computing


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

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

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

Adversarial Search (Game Playing)

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

Game Playing State of the Art

Adversarial Search Aka Games

CS 188: Artificial Intelligence Spring Announcements

CS 188: Artificial Intelligence Spring Game Playing in Practice

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

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

Game Playing AI Class 8 Ch , 5.4.1, 5.5

Artificial Intelligence

CS 5522: Artificial Intelligence II

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

Legend. The Red Goal. The. Blue. Goal

CS 188: Artificial Intelligence. Overview

UNIT 13A AI: Games & Search Strategies

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

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

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

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

Contents. MA 327/ECO 327 Introduction to Game Theory Fall 2017 Notes. 1 Wednesday, August Friday, August Monday, August 28 6

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

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

Game Playing State-of-the-Art

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

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

CS 188: Artificial Intelligence

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

CS 188: Artificial Intelligence

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

Plan. Related courses. A Take-Away Game. Mathematical Games , (21-801) - Mathematical Games Look for it in Spring 11

Artificial Intelligence. Minimax and alpha-beta pruning

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

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

CS 331: Artificial Intelligence Adversarial Search II. Outline

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

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

GAMES COMPUTERS PLAY

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

Game Playing AI. Dr. Baldassano Yu s Elite Education

UNIT 13A AI: Games & Search Strategies. Announcements

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

Adversarial Search and Game Playing

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

CS 188: Artificial Intelligence Spring 2007

Games (adversarial search problems)

CSE 573: Artificial Intelligence

Adversarial search (game playing)

CSE 473: Artificial Intelligence. Outline

CSE 573: Artificial Intelligence Autumn 2010

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

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

A Brief Introduction to Game Theory

More Adversarial Search

Artificial Intelligence Adversarial Search

Artificial Intelligence

Programming Project 1: Pacman (Due )

Game Playing. Philipp Koehn. 29 September 2015

Advanced Microeconomics: Game Theory

Chess Algorithms Theory and Practice. Rune Djurhuus Chess Grandmaster / September 23, 2013

CSE 473: Ar+ficial Intelligence

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

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

Games and Adversarial Search

ADVERSARIAL SEARCH. Chapter 5

CS 771 Artificial Intelligence. Adversarial Search

Game-playing AIs: Games and Adversarial Search I AIMA

Game playing. Outline

Intuition Mini-Max 2

What does it mean to be intelligent? A History of Traditional Computer Game AI. Human Strengths. Computer Strengths

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

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

Foundations of Artificial Intelligence Introduction State of the Art Summary. classification: Board Games: Overview

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

One Jump Ahead. Jonathan Schaeffer Department of Computing Science University of Alberta

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

Tangent: Boromean Rings. The Beer Can Game. Plan. A Take-Away Game. Mathematical Games I. Introduction to Impartial Combinatorial Games

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

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

Artificial Intelligence. Topic 5. Game playing

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

Introduction To Game Theory: Two-Person Games of Perfect Information and Winning Strategies. Wes Weimer, University of Virginia

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

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

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

CS 380: ARTIFICIAL INTELLIGENCE

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

Adversarial Search Lecture 7

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

Aspects of Game Theory & John Nash

Exercises for Introduction to Game Theory SOLUTIONS

CSC384: Introduction to Artificial Intelligence. Game Tree Search

Game-Playing & Adversarial Search

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

Monte Carlo Tree Search

Adversary Search. Ref: Chapter 5

Transcription:

CS10 : The Beauty and Joy of Computing Lecture #16 : Computational Game Theory UC Berkeley EECS Summer Instructor Ben Chun 2012-07-12 CHECKERS SOLVED! A 19-year project led by Prof Jonathan Schaeffer, he used dozens (sometimes hundreds) of computers and AI to prove it is, in perfect play, a draw! This means that if two Gods were to play, nobody would ever win! www.cs.ualberta.ca/~chinook/

Computational Game Theory History Definitions Game Theory What Games We Mean Win, Lose, Tie, Draw Weakly / Strongly Solving Gamesman Dan s Undergraduate R&D Group Demo!! Future UC Berkeley CS10 The Beauty and Joy of Computing : Computational Game Theory (2)

www.eecs.berkeley.edu/research/areas/ Computer Science A UCB view CS research areas: Artificial Intelligence Biosystems & Computational Biology Computer Architecture & Engineering Database Management Systems Graphics Human-Computer Interaction Operating Systems & Networking Programming Systems Scientific Computing Security Theory UC Berkeley CS10 The Beauty and Joy of Computing : Computational Game Theory (3)

en.wikipedia.org/wiki/the_turk The Turk (1770) A Hoax! Built by Wolfgang von Kempelen to impress the Empress Could play a strong game of Chess thanks to Master inside Toured Europe Defeated Benjamin Franklin & Napoleon! Burned in an 1854 fire Chessboard saved The Mechanical Turk (1770) UC Berkeley CS10 The Beauty and Joy of Computing : Computational Game Theory (4)

en.wikipedia.org/wiki/claude_shannon Claude Shannon s Paper (1950) Father of Information Theory Digital computer and digital circuit design theory Defined fundamental limits on compressing/storing data Wrote Programming a Computer for Playing Chess paper in (1950) All chess programs today have his theories at their core His estimate of # of Chess positions called Shannon # Now proved < 2 155 ~ 10 46.7 Claude Shannon (1916-2001) UC Berkeley CS10 The Beauty and Joy of Computing : Computational Game Theory (5)

en.wikipedia.org/wiki/deep_blue_(chess_computer) Deep Blue vs Garry Kasparov (1997) Kasparov World Champ 1996 Tournament Deep Blue First game DB wins a classic! But DB loses 3 and draws 2 to lose the 6-game match 4-2 In 1997 Deep Blue upgraded, renamed Deeper Blue 1997 Tournament Deeper Blue GK wins game 1 GK resigns game 2 even though it was draw! DB & GK draw games 3-5 Game 6 : 1997-05-11 (May 11 th ) Kasparov blunders move 7, loses in 19 moves. Loses tournament 3 ½ - 2 ½ GK accuses DB of cheating. No rematch. Defining moment in AI history IBM s Deep Blue vs Garry Kasparov UC Berkeley CS10 The Beauty and Joy of Computing : Computational Game Theory (6)

www.cs.berkeley.edu/~ddgarcia/eyawtkagtbwata What is Game Theory? Combinatorial Sprague and Grundy s 1939 Mathematics and Games Board games Nim, Domineering, dots and boxes Film: Last Year in Marienbad Complete info, alternating moves Goal: Last move Computational R. C. Bell s 1988 Board and Table Games from many Civilizations Board games Tic-Tac-Toe, Chess, Connect 4, Othello Film : Searching for Bobby Fischer Complete info, alternating moves Goal: Varies Economic von Neumann and Morgenstern s 1944 Theory of Games and Economic Behavior Matrix games Prisoner s dilemma, auctions Film : A Beautiful Mind (about John Nash) Incomplete info, simultaneous moves Goal: Maximize payoff UC Berkeley CS10 The Beauty and Joy of Computing : Computational Game Theory (7)

What Board Games do you mean? No chance, such as dice or shuffled cards Both players have complete information No hidden information, as in Stratego or Magic Two players (Left & Right) usually alternate moves Repeat & skip moves ok Simultaneous moves not ok The game can end in a pattern, capture, by the absence of moves, or UC Berkeley CS10 The Beauty and Joy of Computing : Computational Game Theory (8)

What s in a Strong Solution For every position Assuming alternating play Value (for player whose turn it is) Winning ( losing child) Losing (All children winning) Tieing (! losing child, but tieing child) Drawing (can t force a win or be forced to lose) Remoteness How long before game ends? W..." W W W T..." W W W L T L..." W W W D D..." W W W W W UC Berkeley CS10 The Beauty and Joy of Computing : Computational Game Theory (9)

GamesCrafters A groups that strongly solves abstract strategy games and puzzles 70 games / puzzles in our system Allows perfect play against an opponent Ability to do a postgame analysis UC Berkeley CS10 The Beauty and Joy of Computing : Computational Game Theory (10)

http://youtu.be/nhwjlcairqo! What did you mean strongly solve? Wargames (1983) UC Berkeley CS10 The Beauty and Joy of Computing : Computational Game Theory (11)

Thanks to Jonathan Schaeffer @ U Alberta for this slide Weakly Solving A Game (Checkers) Master: main line of play to consider Workers: positions to search Endgame databases (solved) Log of Search Space Size UC Berkeley CS10 The Beauty and Joy of Computing : Computational Game Theory (12)

Strong Solving Example: 1,2,,10 Rules (on your turn): Running total = 0 Rules (on your turn): Add 1 or 2 to running total Goal Be the FIRST to get to 10 Example Ana: 2 to make it 2 Bob: 1 to make it 3 Ana: 2 to make it 5 Bob: 2 to make it 7 photo Ana: 1 to make it 8 Bob: 2 to make it 10 I WIN! 7 ducks (out of 10) UC Berkeley CS10 The Beauty and Joy of Computing : Computational Game Theory (13)

Example: Tic-Tac-Toe Rules (on your turn): Place your X or O in an empty slot on 3x3 board Goal If your make 3-in-a-row first in any row / column / diag, win Else if board is full with no 3-in-row, tie Misére is tricky 3-in-row LOSES Pair up and play now, then swap who goes 1st Values Visualization for Tic-Tac-Toe UC Berkeley CS10 The Beauty and Joy of Computing : Computational Game Theory (14)

Tic-Tac-Toe Answer Visualized! Recursive Values Visualization Image Misére Tic-tac-toe Outer rim is position Inner levels moves Legend Lose Tie Win Misére Tic-Tac-Toe 2-ply Answer UC Berkeley CS10 The Beauty and Joy of Computing : Computational Game Theory (15)

GamesCrafters.berkeley.edu GamesCrafters (revisited) Undergraduate Computational Game Theory Research Group 300 students since 2001 We now average 20/semester! They work in teams of 2+ Most return, take more senior roles (sub-group team leads) Maximization (bottom-up solve) Oh, DeepaBlue (parallelization) GUI (graphical interface work) Retro (GUI refactoring) Architecture (core) New/ice Games (add / refactor) Documentation (games & code) UC Berkeley CS10 The Beauty and Joy of Computing : Computational Game Theory (16)

http://nyc.cs.berkeley.edu:8080/gcweb/ui/game.jsp?game=connect4! Connect 4 Solved, Online! Just finished a solve of Connect 4!! It took 30 Machines x 8 Cores x 1 weeks Win for the first player (go in the middle!) 3,5 = tie 1,2,6,7 = lose Come play online! UC Berkeley CS10 The Beauty and Joy of Computing : Computational Game Theory (17)

Gamescrafters.berkeley.edu! Future Board games are exponential So has been the progress of the speed / capacity of computers! Therefore, every few years, we only get to solve one more ply One by one, we re going to solve them and/or beat humans We ll never solve some E.g., hardest game : Go Strongly solving (GamesCrafters) We visit EVERY position, and know value of EVERY position E.g., Connect 4 Weakly solving (Univ Alberta) 17408965065903192790718 8238070564367946602724 950263541194828118706801 05167618464984116279288 98871493861209698881632 07806137549871813550931 2951480336966057289307 5468180597603 Go s search space ~ 3361 We prove game s value by only visiting SOME positions, so we only know value of SOME positions E.g., Checkers UC Berkeley CS10 The Beauty and Joy of Computing : Computational Game Theory (18)