+ Artificial Intelligence: Fact or Fiction? Artificial Intelligence: Fact or Fiction? CMSC 101 / IS 101Y Dr. Marie desJardins December 3, 2013.

Slides:



Advertisements
Similar presentations
Game Playing CS 63 Chapter 6
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.
AI for Connect-4 (or other 2-player games) Minds and Machines.
Artificial Intelligence Adversarial search Fall 2008 professor: Luigi Ceccaroni.
CMSC 671 Fall 2001 Class #8 – Thursday, September 27.
ICS-271:Notes 6: 1 Notes 6: Game-Playing ICS 271 Fall 2008.
CS 484 – Artificial Intelligence
Adversarial Search Chapter 6 Section 1 – 4.
University College Cork (Ireland) Department of Civil and Environmental Engineering Course: Engineering Artificial Intelligence Dr. Radu Marinescu Lecture.
Adversarial Search Chapter 5.
MINIMAX SEARCH AND ALPHA- BETA PRUNING: PLAYER 1 VS. PLAYER 2.
CMSC 463 Chapter 5: Game Playing Prof. Adam Anthony.
Mahgul Gulzai Moomal Umer Rabail Hafeez
Problem Solving Using Search Reduce a problem to one of searching a graph. View problem solving as a process of moving through a sequence of problem states.
CPSC 322 Introduction to Artificial Intelligence October 25, 2004.
UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering CSCE 580 Artificial Intelligence Ch.6: Adversarial Search Fall 2008 Marco Valtorta.
1 search CS 331/531 Dr M M Awais A* Examples:. 2 search CS 331/531 Dr M M Awais 8-Puzzle f(N) = g(N) + h(N)
MAE 552 – Heuristic Optimization Lecture 28 April 5, 2002 Topic:Chess Programs Utilizing Tree Searches.
ICS-271:Notes 6: 1 Notes 6: Game-Playing ICS 271 Fall 2006.
CIS 310: Visual Programming, Spring 2006 Western State College 310: Visual Programming Othello.
Alpha-Beta Search. 2 Two-player games The object of a search is to find a path from the starting position to a goal position In a puzzle-type problem,
Game Playing: Adversarial Search Chapter 6. Why study games Fun Clear criteria for success Interesting, hard problems which require minimal “initial structure”
1 Adversary Search Ref: Chapter 5. 2 Games & A.I. Easy to measure success Easy to represent states Small number of operators Comparison against humans.
CSC 412: AI Adversarial Search
Game Trees: MiniMax strategy, Tree Evaluation, Pruning, Utility evaluation Adapted from slides of Yoonsuck Choe.
Natural Language Introduction Adapted from Tim Finin, UMBC, Marie desJardins.
PSU CS 370 – Introduction to Artificial Intelligence Game MinMax Alpha-Beta.
Minimax Trees: Utility Evaluation, Tree Evaluation, Pruning CPSC 315 – Programming Studio Spring 2008 Project 2, Lecture 2 Adapted from slides of Yoonsuck.
Artificial Intelligence Introduction (2). What is Artificial Intelligence ?  making computers that think?  the automation of activities we associate.
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. Introduction Why is game playing so interesting from an AI point of view? –Game Playing is harder then common searching The search space.
Game Playing.
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.
October 3, 2012Introduction to Artificial Intelligence Lecture 9: Two-Player Games 1 Iterative Deepening A* Algorithm A* has memory demands that increase.
Mark Dunlop, Computer and Information Sciences, Strathclyde University 1 Algorithms & Complexity 5 Games Mark D Dunlop.
CMSC 671 Fall 2001 Professor Marie desJardins, ECS 216, x3967 TA: Suryakant Sansare,
Game-playing AIs Part 1 CIS 391 Fall CSE Intro to AI 2 Games: Outline of Unit Part I (this set of slides)  Motivation  Game Trees  Evaluation.
Notes on Game Playing by Yun Peng of theYun Peng University of Maryland Baltimore County.
Introduction to Artificial Intelligence CS 438 Spring 2008 Today –AIMA, Ch. 6 –Adversarial Search Thursday –AIMA, Ch. 6 –More Adversarial Search The “Luke.
Game Playing. Towards Intelligence? Many researchers attacked “intelligent behavior” by looking to strategy games involving deep thought. Many researchers.
State-Space Searches. 2 State spaces A state space consists of A (possibly infinite) set of states The start state represents the initial problem Each.
Games. Adversaries Consider the process of reasoning when an adversary is trying to defeat our efforts In game playing situations one searches down the.
Game Playing. Introduction One of the earliest areas in artificial intelligence is game playing. Two-person zero-sum game. Games for which the state space.
CSC 8520 Fall, Paula Matuszek 1 CS 8520: Artificial Intelligence Introduction Paula Matuszek Fall, 2005.
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.
CMSC 100 Heuristic Search and Game Playing Professor Marie desJardins Tuesday, November 13, 2012 Thu 10/25/12 1 E-Commerce and Databases.
Instructor: Eyal Amir Grad TAs: Wen Pu, Yonatan Bisk Undergrad TAs: Sam Johnson, Nikhil Johri CS 440 / ECE 448 Introduction to Artificial Intelligence.
Artificial Intelligence
ARTIFICIAL INTELLIGENCE (CS 461D) Princess Nora University Faculty of Computer & Information Systems.
Adversarial Search. Regular Tic Tac Toe Play a few games. –What is the expected outcome –What kinds of moves “guarantee” that?
AIMA Code: Adversarial Search CSE-391: Artificial Intelligence University of Pennsylvania Matt Huenerfauth February 2005.
CS-424 Gregory Dudek Lecture 10 Annealing (final comments) Adversary Search Genetic Algorithms (genetic search)
Explorations in Artificial Intelligence Prof. Carla P. Gomes Module 5 Adversarial Search (Thanks Meinolf Sellman!)
Adversarial Search In this lecture, we introduce a new search scenario: game playing 1.two players, 2.zero-sum game, (win-lose, lose-win, draw) 3.perfect.
Adversarial Search and Game Playing. Topics Game playing Game trees Minimax Alpha-beta pruning Examples.
Search: Games & Adversarial Search Artificial Intelligence CMSC January 28, 2003.
1 Chapter 6 Game Playing. 2 Chapter 6 Contents l Game Trees l Assumptions l Static evaluation functions l Searching game trees l Minimax l Bounded lookahead.
Iterative Deepening A*
Adversarial Search.
CMSC 471 Fall 2011 Class #8-9 Tue 9/27/11 – Thu 9/29/11 Game Playing
Chapter 6 : Game Search 게임 탐색 (Adversarial Search)
Game Playing: Adversarial Search
CMSC 671 Fall 2010 Tue 9/21/10 Game Playing
Introduction to Artificial Intelligence Lecture 9: Two-Player Games I
Game Playing: Adversarial Search
Game Playing Chapter 5.
CS51A David Kauchak Spring 2019
Presentation transcript:

+ Artificial Intelligence: Fact or Fiction? Artificial Intelligence: Fact or Fiction? CMSC 101 / IS 101Y Dr. Marie desJardins December 3, 2013

+ AI: A Vision Could an intelligent agent living on your home computer manage your , coordinate your work and social activities, help plan your vacations…… even watch your house while you take those well planned vacations? Tue 12/3/13 2 CMSC 101 / IS 101Y - Artificial Intelligence

+ What is AI? Tue 12/3/13CMSC 101 / IS 101Y - Artificial Intelligence 3

+ Main Goals of AI Represent knowledge Reason about knowledge Behave intelligently in complex environments Develop interesting and useful applications Interact with people, agents, and the environment Tue 12/3/13 4 CMSC 101 / IS 101Y - Artificial Intelligence

+ Computer Science & Engineering AI Mathematics Cognitive Science Philosophy PsychologyLinguistics Biology Economics Foundations of AI Tue 12/3/13 5 CMSC 101 / IS 101Y - Artificial Intelligence

+ Big Questions Can machines think? If so, how? If not, why not? What does this say about human beings? What does this say about the mind? And if we can make machines think, should we? Tue 12/3/13 6 CMSC 101 / IS 101Y - Artificial Intelligence

+ Early AI: Eliza ELIZA: A program that simulated a psychotherapist interacting with a patient Implemented at MIT during by Joel Weizenbaum Really simple “chatbot” approach – pattern matching without any understanding People thought that AI was solved!! Tue 12/3/13 7 CMSC 101 / IS 101Y - Artificial Intelligence

+ Eliza Speaks I am the psychotherapist. Please, describe your problems. i'm having a hard time with my students Why do you say that? well, they keep asking me for money Maybe your plans have something to do with this. what plans? Is it because of your life that you say what plans? No, it's because I didn't know what you were talking about Is it because you didn't know what I was talking about that you came to me? no, it's because i wanted to see if you could pass the turing test Does it bother you that you wanted to see if I could really pass the turing test? ….. How do you reconcile problems at school? This is a waste of time. Good bye My secretary will send you a bill. Tue 12/3/13 8 CMSC 101 / IS 101Y - Artificial Intelligence

+ Early AI: Parry Kenneth Colby modeled a paranoid using the same techniques as Eliza, around 1968 PARRY has basic emotions. If it gets angry, its replies become more hostile Expert psychiatrists were unable to distinguish PARRY’s ramblings from those of real paranoids! Tue 12/3/13 9 CMSC 101 / IS 101Y - Artificial Intelligence

+ PARRY Speaks Good afternoon. My name is Doctor Jones. Pleased to meet you. How are you? All right I guess. Could you tell me your name? Pat Smith. I though you might have some problems. I've been upset lately. By what? People get on my nerves sometimes. Tell me more. Do you know anything about bookies?... Tue 12/3/13 10 CMSC 101 / IS 101Y - Artificial Intelligence

+ Eliza Meets Parry P: I don't understand your motives. E: Why don't you understand my motives? P: Shouldn't I be? E: Why do you say that just now? P: That's just the way it is. E: Suppose that's the way it were not. P: So? E: I am not sure I understand you fully. P: You harp on the same questions too much. E: What does that similarity suggest to you? P: I don't get you. E: Do you wish that you did get I? Tue 12/3/13 11 CMSC 101 / IS 101Y - Artificial Intelligence

+ The Coolest AI Technology Today Your kids probably won’t even need to learn to drive... Google self-driving car Nissan self-driving car Tue 12/3/13 12 CMSC 101 / IS 101Y - Artificial Intelligence

+ State Space Search Tue 12/3/13CMSC 101 / IS 101Y - Artificial Intelligence 13

+ Important Ideas in AI Abstraction GPS navigation == Graph search Academic class scheduling == Constraint-based search Creating a cool game avatar == Search through design space Hey, what’s this search stuff? The most important idea behind AI systems Define a set of possible solutions to a problem Define ways to transform one possible solution to another Start from some random (maybe bad/wrong solution) Apply transformation steps until you find a good solution Tue 12/3/13 14 CMSC 101 / IS 101Y - Artificial Intelligence

+ For Example... GPS navigation == Graph search Start from a bad solution (stay where you are) Apply transformations (drive along a road segment) Find the right solution (drive to your destination!) Academic class scheduling == Constraint-based search Start from a bad solution (an empty schedule) Apply transformations (add a class that results in a better schedule) Find the right solution (best set of classes) Creating a cool game avatar == Search through design space Start from a bad solution (random/default avatar) Apply transformations (change one feature to make a better avatar) Find the right solution (the coolest avatar ever) Tue 12/3/13 15 CMSC 101 / IS 101Y - Artificial Intelligence

+ Now You Try It! Teenagers and Zombies Three teenagers and three zombies are on the west side of a river There is one boat that will hold up to two people/zombies (and can’t row itself, so must carry at least one at a time) If zombies ever outnumber teenagers (on either side of the river), the zombies will eat all of the teenagers How can all of the teenagers and zombies get across to the east side of the river? Think about that for a while... Talk amongst yourselves! Tue 12/3/13 16 CMSC 101 / IS 101Y - Artificial Intelligence

+ Saving Teenagers Through State- Space Search What are the possible “states”? [Z,T,*] = [Number of zombies on west, number of teenagers on west, whether the boat is in the west or east] Initial state is [3,3,W]. What is the goal state? How many possible states are there? How many of those states are illegal? Any state where zombies outnumber teenagers ([3,2] or [0,2] – why?) Note that [3,0] is OK since there are no teenagers to be eaten! Start with the initial state and build the “graph” of possible moves From the goal state, what are the next states you can get to? Then what? Solution = path through graph from [3,3,W] to [0,0,E] Tue 12/3/13 17 CMSC 101 / IS 101Y - Artificial Intelligence

+ Game Playing Tue 12/3/13CMSC 101 / IS 101Y - Artificial Intelligence 18

+ Let’s Play Nim! Seven tokens (coins, sticks, whatever) Each player must take either 1 or 2 tokens Whoever takes the last token loses You can go first…

+ How to Play a Game A way to play such a game is to: Consider all the legal moves you can make Compute the new position resulting from each move Evaluate each resulting position and determine which is best Make that move Wait for your opponent to move and repeat Key problems are: Representing the “board” Generating all legal next boards Evaluating a position

+ Evaluation Function Evaluation function or static evaluator is used to evaluate the “goodness” of a game position. Contrast with heuristic search where the evaluation function was a non-negative estimate of the cost from the start node to a goal and passing through the given node The zero-sum assumption allows us to use a single evaluation function to describe the goodness of a board with respect to both players. f(n) >> 0: position n good for me and bad for you f(n) << 0: position n bad for me and good for you f(n) near 0: position n is a neutral position f(n) = +infinity: win for me f(n) = -infinity: win for you

+ Game Trees Problem spaces for typical games are represented as trees (a tic-tac-toe tree is shown to the right) The root node represents the current board configuration; player must decide the best move to make next Static evaluator function rates a board position. f(board) = real number with f>0 (I’m ahead), f<0 (you’re ahead) Arcs represent the possible legal moves for a player If it is my turn to move, then the root is labeled a "MAX" node; otherwise it is labeled a "MIN" node, indicating my opponent's turn. Each level of the tree has nodes that are all MAX or all MIN; nodes at level i are of the opposite kind from those at level i+1

+ Minimax Procedure Create start node as a MAX node with current board configuration Expand nodes down to some depth (a.k.a. ply) of lookahead in the game Apply the evaluation function at each of the leaf nodes “Back up” values for each of the non-leaf nodes until a value is computed for the root node At MIN nodes, the backed-up value is the minimum of the values associated with its children. (Best move for the MIN player) At MAX nodes, the backed-up value is the maximum of the values associated with its children. (Best move for the MAX player) Pick the operator associated with the child node whose backed- up value determined the value at the root

+ Nim-4: First Ply 4 MAX 2 MIN 3 MIN State: # coins left, whose turn it is Win for MAX: +1 Win for MIN: -1 Left branch: take 1 coin Right branch: take 2 coins

+ Nim-4: Second Ply 4 MAX 2 MIN 3 MIN 1 MAX 2 MAX 0 MAX 1 MAX +1

+ Nim-4: Third Ply 4 MAX 2 MIN 3 MIN 1 MAX 2 MAX 0 MAX 1 MAX 0 MIN 1 MIN 0 MIN +1

+ Nim-4: Fourth Ply 4 MAX 2 MIN 3 MIN 1 MAX 2 MAX 0 MAX 1 MAX 0 MIN 1 MIN 0 MIN 0 MAX Complete game tree! All “leaf nodes” are terminal states (end of the game), so no need to evaluate intermediate (non-end) states

+ Backup to Level 3 4 MAX 2 MIN 3 MIN 1 MAX 2 MAX 0 MAX 1 MAX 0 MIN 1 MIN 0 MIN 0 MAX +1

+ Backup to Level 2 4 MAX 2 MIN 3 MIN 1 MAX 2 MAX 0 MAX 1 MAX 0 MIN 1 MIN 0 MIN 0 MAX

+ Backup to Level 1 4 MAX 2 MIN 3 MIN 1 MAX 2 MAX 0 MAX 1 MAX 0 MIN 1 MIN 0 MIN 0 MAX

+ Backup to Level 0 (Root) 4 MAX 2 MIN 3 MIN 1 MAX 2 MAX 0 MAX 1 MAX 0 MIN 1 MIN 0 MIN 0 MAX MAX always loses! (unless MIN does something stupid...)

+ The Future of AI? Tue 12/3/13CMSC 101 / IS 101Y - Artificial Intelligence 32

+ Just You Wait... Tue 12/3/13 33 CMSC 101 / IS 101Y - Artificial Intelligence