CS Fall 2016 (Shavlik©), Lecture 11, Week 6

Slides:



Advertisements
Similar presentations
Adversarial Search Chapter 6 Section 1 – 4. Types of Games.
Advertisements

Adversarial Search We have experience in search where we assume that we are the only intelligent being and we have explicit control over the “world”. Lets.
Adversarial Search Reference: “Artificial Intelligence: A Modern Approach, 3 rd ed” (Russell and Norvig)
Games & Adversarial Search Chapter 5. Games vs. search problems "Unpredictable" opponent  specifying a move for every possible opponent’s reply. Time.
Games & Adversarial Search
CS 484 – Artificial Intelligence
Adversarial Search: Game Playing Reading: Chapter next time.
Lecture 12 Last time: CSPs, backtracking, forward checking Today: Game Playing.
Games CPSC 386 Artificial Intelligence Ellen Walker Hiram College.
Minimax and Alpha-Beta Reduction Borrows from Spring 2006 CS 440 Lecture Slides.
Lecture 13 Last time: Games, minimax, alpha-beta Today: Finish off games, summary.
Artificial Intelligence in Game Design
1 Game Playing Chapter 6 Additional references for the slides: Luger’s AI book (2005). Robert Wilensky’s CS188 slides:
Game Playing CSC361 AI CSC361: Game Playing.
MAE 552 – Heuristic Optimization Lecture 28 April 5, 2002 Topic:Chess Programs Utilizing Tree Searches.
Games & Adversarial Search Chapter 6 Section 1 – 4.
Game Trees: MiniMax strategy, Tree Evaluation, Pruning, Utility evaluation Adapted from slides of Yoonsuck Choe.
Minimax Trees: Utility Evaluation, Tree Evaluation, Pruning CPSC 315 – Programming Studio Spring 2008 Project 2, Lecture 2 Adapted from slides of Yoonsuck.
Game Playing Chapter 5. Game playing §Search applied to a problem against an adversary l some actions are not under the control of the problem-solver.
Game Playing.
AD FOR GAMES Lecture 4. M INIMAX AND A LPHA -B ETA R EDUCTION Borrows from Spring 2006 CS 440 Lecture Slides.
Game Playing Chapter 5. Game playing §Search applied to a problem against an adversary l some actions are not under the control of the problem-solver.
Agents that can play multi-player games. Recall: Single-player, fully-observable, deterministic game agents An agent that plays Peg Solitaire involves.
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.
Games. Adversaries Consider the process of reasoning when an adversary is trying to defeat our efforts In game playing situations one searches down the.
Adversarial Search Chapter Games vs. search problems "Unpredictable" opponent  specifying a move for every possible opponent reply Time limits.
Today’s Topics Playing Deterministic (no Dice, etc) Games –Mini-max –  -  pruning –ML and games? 1997: Computer Chess Player (IBM’s Deep Blue) Beat Human.
Game tree search Thanks to Andrew Moore and Faheim Bacchus for slides!
Game tree search Chapter 6 (6.1 to 6.3 and 6.6) cover games. 6.6 covers state of the art game players in particular. 6.5 covers games that involve uncertainty.
ARTIFICIAL INTELLIGENCE (CS 461D) Princess Nora University Faculty of Computer & Information Systems.
Game tree search As ever, slides drawn from Andrew Moore’s Machine Learning Tutorials: as well as from Faheim Bacchus.
Artificial Intelligence in Game Design Board Games and the MinMax Algorithm.
Game Playing Why do AI researchers study game playing?
Adversarial Search and Game-Playing
Instructor: Vincent Conitzer
Games and Adversarial Search
Last time: search strategies
Iterative Deepening A*
PENGANTAR INTELIJENSIA BUATAN (64A614)
Games and adversarial search (Chapter 5)
Adversarial Search and Game Playing (Where making good decisions requires respecting your opponent) R&N: Chap. 6.
Pengantar Kecerdasan Buatan
Adversarial Search.
State Space 4 Chapter 4 Adversarial Games.
CSC 110 – Fluency in Information Technology Chess
David Kauchak CS52 – Spring 2016
Adversarial Search Chapter 5.
Artificial Intelligence
Artificial Intelligence
Game playing.
Chapter 6 : Game Search 게임 탐색 (Adversarial Search)
Alpha-Beta Search.
NIM - a two person game n objects are in one pile
Artificial Intelligence
Alpha-Beta Search.
Instructor: Vincent Conitzer
Introduction to Artificial Intelligence Lecture 9: Two-Player Games I
Alpha-Beta Search.
Minimax strategies, alpha beta pruning
Game Playing Fifth Lecture 2019/4/11.
Alpha-Beta Search.
Mini-Max search Alpha-Beta pruning General concerns on games
Games & Adversarial Search
Adversarial Search CMPT 420 / CMPG 720.
Alpha-Beta Search.
Minimax strategies, alpha beta pruning
CS51A David Kauchak Spring 2019
Games & Adversarial Search
Unit II Game Playing.
Minimax Trees: Utility Evaluation, Tree Evaluation, Pruning
Presentation transcript:

CS 540 - Fall 2016 (Shavlik©), Lecture 11, Week 6 7/6/2018 Today’s Topics Playing Deterministic (no Dice, etc) Games Mini-max - pruning ML and games? 1997: Computer Chess Player (IBM’s Deep Blue) Beat Human Chess Champ (Kasparov) 2015: World-Class Computer GO Player 10/13/16 CS 540 - Fall 2016 (Shavlik©), Lecture 11, Week 6

CS 540 - Fall 2016 (Shavlik©), Lecture 11, Week 6 Mini-Max Algorithm Generate Search Tree of ALL Possible Games Score Leaves (Assume Higher Better for ‘You’) eg, +1 you win, -1 you lose, 0 if a draw (ie, a tie) Assume Opponent Scores ‘Board Configurations’ the Same Way You Do (more on this later) Propagate Info from Leaves to Root of Search Tree, then Choose Best Move Your Turn: choose MAX score Opponent’s Turn: choose MIN score (which is best for opponent) Only Choose NEXT Move; When Your Turn Again, Repeat opponent might not have done what you expected 10/13/16 CS 540 - Fall 2016 (Shavlik©), Lecture 11, Week 6

Tic-Tac-Toe (https://en.wikipedia.org/wiki/Tic-tac-toe) 10/13/16 CS 540 - Fall 2016 (Shavlik©), Lecture 11, Week 6

What If Game More Complex? CS 540 Fall 2015 (Shavlik) 7/6/2018 What If Game More Complex? Chess: approx 35 moves per turn and 50 moves/player/game, so O(35100) possible board configurations! Better estimate: 1047 en.wikipedia.org/wiki/Shannon_number Number of atoms in the Earth: 1050 www.fnal.gov/pub/science/inquiring/questions/atoms.html Solution: project ahead as far as possible, then use a ‘static board evaluator’ (SBE) to score in-progress board configurations (Common) Abuse of big-O notation 10/13/16 CS 540 - Fall 2016 (Shavlik©), Lecture 11, Week 6

CS 540 - Fall 2016 (Shavlik©), Lecture 11, Week 6 SBE’s No Perfect SBE Exists for Chess (otherwise we’d know if black can always win, etc) But a lot of Domain K can be Put in the SBE You Might Have Learned “Piece Values” in Chess SBE = 1  (#myPawns - #theirPawns) + … + 10  (#myQueens - #theirQueens) + points for ‘center of board’ control + etc Can Run Mini-Max with SBE 10/13/16 CS 540 - Fall 2016 (Shavlik©), Lecture 11, Week 6

Saving Unnecessary Calculations: - Pruning Can Prune Away Subtrees by Realizing no Matter their Score, they won’t Impact Choice We Won’t Cover the Full - Pruning Algorithm, Since its Applicability Across AI is Limited But We’ll Cover some Simple Cases of the Two Types of Pruning Ask: Would it Matter if this Node had Value  or Value -? If Decision Same in Both Cases, No Need to Compute Node’s SBE Value 10/13/16 CS 540 - Fall 2016 (Shavlik©), Lecture 11, Week 6

An -Cutoff Example (view in Slide Show mode to see animation) move Tip: Always fully compute the left-most subtree of root  2 Us (max) 2  1 Them (min) 2 7 1 big subtree ? If good for Us, Opponent will not go here. If bad for Us, we will take left branch from root. 10/13/16 CS 540 - Fall 2016 (Shavlik©), Lecture 11, Week 6

A -Cutoff Example (view in Slide Show mode to see animation) move Recall: Always compute the left-most subtree of root  7 Them (min) 7  9 Us (max) 2 7 9 big subtree ? If good for Us, Opponent will take left branch from root. If bad for Us, we will take left branch. 10/13/16 CS 540 - Fall 2016 (Shavlik©), Lecture 11, Week 6

CS 540 - Fall 2016 (Shavlik©), Lecture 11, Week 6 Note We project ahead as far as we can in the time we have, but only choose our next move Next time it is our turn, we repeat - calc (possibly repeating some work, but too much to store) 10/13/16 CS 540 - Fall 2016 (Shavlik©), Lecture 11, Week 6

Performance Improvement Best case: - can double search depth considered is fixed amount of time (doubling depth exponentially increases boards considered!) Worst case: no savings Note: - and mini-max return SAME answer (- simply avoids wasted work) 10/13/16 CS 540 - Fall 2016 (Shavlik©), Lecture 11, Week 6

Some Built-in Assumptions Projecting Ahead k Moves will Lead to Better SBE Estimates than Simply Applying SBE to the Legal Next Boards seems reasonable, but isn’t guaranteed Our Opponent Thinks the Same Way We Do no consideration of ‘traps’ and tricking opponent 10/13/16 CS 540 - Fall 2016 (Shavlik©), Lecture 11, Week 6

CS 540 - Fall 2016 (Shavlik©), Lecture 11, Week 6 Horizon Effect Defn: Since We Usually Stop before Game Ends, ‘Danger’ might be Lurking just Beyond our Search Depth One (Partial) Soln: Once Best Move Chosen, Look Ahead a Few Moves More if turns out bad, spend more time searching this turn 10/13/16 CS 540 - Fall 2016 (Shavlik©), Lecture 11, Week 6

Perils of Not-Looking Ahead 10/11/16 CS 540 - Fall 2016 (Shavlik©), Lecture 11, Week 6

Chess: The ‘E. coli’ of AI? Chess Originally Thought to be a Great Testbed for Advancing AI Has had Moderate Impact on AI Progress Not Much ‘Technology Transfer’ to AI Tasks Played Minor Role in ‘ML Revolution’ 10/13/16 CS 540 - Fall 2016 (Shavlik©), Lecture 11, Week 6

CS 540 - Fall 2016 (Shavlik©), Lecture 11, Week 6 ML and Games ML Led to World-Class Backgammon Player Decades Ago ML Produced World-Class Poker Player over Last Few Years World-class GO Player via ‘Deep [Neural] Networks’ (2015) Deep Networks Recently Learned to Play Well without being given Games’ Rules 10/13/16 CS 540 - Fall 2016 (Shavlik©), Lecture 11, Week 6