DCP 1172, Homework 2 1 Homework 2 for DCP-1172 (2004.10.26) This time, we have 3 different homework assignments.  Homework assignment 2-1 (50%, Ch3 &

Slides:



Advertisements
Similar presentations
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.
Advertisements

Artificial Intelligence Adversarial search Fall 2008 professor: Luigi Ceccaroni.
SE Last time: search strategies Uninformed: Use only information available in the problem formulation Breadth-first Uniform-cost Depth-first Depth-limited.
1 Tree Searching Strategies Updated: 2010/12/27. 2 The procedure of solving many problems may be represented by trees. Therefore the solving of these.
Search in AI.
Lab 1 Chapter 1, Sections 1.1, 1.2, 1.3, and 1.4 Book: Discrete Mathematics and Its Applications By Kenneth H. Rosen.
Logic Puzzle Smith. The Setup There are five houses Each of a different color Inhabited by men of different nationalities Each has a different pet Each.
CPSC 322 Introduction to Artificial Intelligence October 25, 2004.
All rights reservedL. Manevitz Lecture 31 Artificial Intelligence A/O* and Minimax L. Manevitz.
Search: Representation and General Search Procedure CPSC 322 – Search 1 January 12, 2011 Textbook § 3.0 –
This time: Outline Game playing The minimax algorithm
CS 561, Sessions Administrativia Assignment 1 due tuesday 9/24/2002 BEFORE midnight Midterm exam 10/10/2002.
Midterm Review CMSC421 – Fall CH1 Summary: Intro AI Definitions: dimensions human/rational think/act Three Major Components of AI Algorithms Representation.
1 Using Search in Problem Solving Part II. 2 Basic Concepts Basic concepts: Initial state Goal/Target state Intermediate states Path from the initial.
Using Search in Problem Solving
CS 561, Sessions Last time: search strategies Uninformed: Use only information available in the problem formulation Breadth-first Uniform-cost Depth-first.
Game Playing CSC361 AI CSC361: Game Playing.
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)
Constraint Satisfaction Problems
Constraint Satisfaction Problems (CSP) (Where we postpone making difficult decisions until they become easy to make) R&N: Chap. 5.
Find a Path s A D B E C F G Heuristically Informed Methods  Which node do I expand next?  What information can I use to guide this.
CS 460, Sessions Last time: search strategies Uninformed: Use only information available in the problem formulation Breadth-first Uniform-cost Depth-first.
Uninformed Search Reading: Chapter 3 by today, Chapter by Wednesday, 9/12 Homework #2 will be given out on Wednesday DID YOU TURN IN YOUR SURVEY?
Max Min Max Min Starting node and labels Figure 4.15 (pp. 148) MiniMax Search.
Constraint Satisfaction Problems Russell and Norvig: Chapter 5 CMSC 421 – Fall 2005.
Adversarial Search: Game Playing Reading: Chess paper.
HEURISTIC SEARCH. Luger: Artificial Intelligence, 5 th edition. © Pearson Education Limited, 2005 Portion of the state space for tic-tac-toe.
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,
Solving problems by searching
Constraint Satisfaction Problems (CSP) (Where we postpone making difficult decisions until they become easy to make) R&N: Chap. 5 1.
1 Midterm Review cmsc421 Fall Outline Review the material covered by the midterm Questions?
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.
CISC 235: Topic 6 Game Trees.
Lecture 5 Note: Some slides and/or pictures are adapted from Lecture slides / Books of Dr Zafar Alvi. Text Book - Aritificial Intelligence Illuminated.
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.
Artificial Intelligence CS482, CS682, MW 1 – 2:15, SEM 201, MS 227 Prerequisites: 302, 365 Instructor: Sushil Louis,
Agents that can play multi-player games. Recall: Single-player, fully-observable, deterministic game agents An agent that plays Peg Solitaire involves.
October 3, 2012Introduction to Artificial Intelligence Lecture 9: Two-Player Games 1 Iterative Deepening A* Algorithm A* has memory demands that increase.
Heuristic Search In addition to depth-first search, breadth-first search, bound depth-first search, and iterative deepening, we can also use informed or.
Chapter 6 Adversarial Search. Adversarial Search Problem Initial State Initial State Successor Function Successor Function Terminal Test Terminal Test.
1 Section 1.4 Graphs and Trees A graph is set of objects called vertices or nodes where some pairs of objects may be connected by edges. (A directed graph.
Puzzle A Puzzle B. When asked about his birthday, a man said: "The day before yesterday I was only 25 and next year I will turn 28." This is true only.
1 CSE 4705 Artificial Intelligence Jinbo Bi Department of Computer Science & Engineering
Games. Adversaries Consider the process of reasoning when an adversary is trying to defeat our efforts In game playing situations one searches down the.
Search exploring the consequences of possible actions.
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.
1 CS B551: Elements of Artificial Intelligence Instructor: Kris Hauser
CSCI 4310 Lecture 6: Adversarial Tree Search. Book Winston Chapter 6.
Basic Search Procedure 1. Start with the start node (root of the search tree) and place in on the queue 2. Remove the front node in the queue and If the.
Who owns the zebra?. Here’s a small logical puzzle for you. Copy down the information you see. Through elimination, can you discover who owns the zebra.
1 CSE 4705 Artificial Intelligence Jinbo Bi Department of Computer Science & Engineering
4/18/2005EE5621 EE562 ARTIFICIAL INTELLIGENCE FOR ENGINEERS Lecture 5, 4/18/2005 University of Washington, Department of Electrical Engineering Spring.
Constraint Satisfaction Problems
C ONSTRAINT S ATISFACTION P ROBLEMS Instructor: Kris Hauser 1.
ARTIFICIAL INTELLIGENCE (CS 461D) Princess Nora University Faculty of Computer & Information Systems.
Constraint Satisfaction Problems Russell and Norvig: Chapter 3, Section 3.7 Chapter 4, Pages CS121 – Winter 2003.
Adversarial Search 2 (Game Playing)
Adversarial Search and Game Playing Russell and Norvig: Chapter 6 Slides adapted from: robotics.stanford.edu/~latombe/cs121/2004/home.htm Prof: Dekang.
PSU CS 370 – Introduction to Artificial Intelligence 1 Constraint Satisfaction Problems.
CMPT 463. What will be covered A* search Local search Game tree Constraint satisfaction problems (CSP)
Logic Puzzle.
Last time: search strategies
Constraint Satisfaction Problems (CSP) (Where we postpone making difficult decisions until they become easy to make) R&N: Chap. Slides taken from.
Clues 1 The Brit lives in the red house 2 The Swede keeps dogs as pets 3 The Dane drinks tea 4 As you look at the houses from across the street, the.
Solving the ‘Einstein” puzzle
Using Alloy to Solve the Einstein Puzzle
Constraint Propagation
Constraint Satisfaction Problems
Constraint Propagation
Presentation transcript:

DCP 1172, Homework 2 1 Homework 2 for DCP-1172 ( ) This time, we have 3 different homework assignments.  Homework assignment 2-1 (50%, Ch3 & Ch4.)  Homework assignment 2-2 (25%, Ch5.)  Homework assignment 2-3 (25%, Ch6.)  It is due on Nov. 12.

DCP 1172, Homework 2 2 Homework 2-1 : Search Algorithms (AIMA-ch3&4) The following figure shows a portion of a partially expanded search tree. Each arc between nodes is labeled with the cost of the corresponding operator, and the leaves are labeled with the value of the heuristic function, h. Which node (use the node’s letter) will be expanded next by each of the following search algorithms? (a) Depth-first search (b) Breadth-first search (c) Uniform-cost search (d) Greedy search (e) A* search 5 D 5 A C h=15 B FGE h=8h=12h=10 h=18 H h=20 h=14

DCP 1172, Homework 2 3 Homework 2-2a: Constraint Satisfaction Problems (AIMA-ch5, Ex.5-13) Consider the following logic puzzle: In five houses, each with a different color, live 5 persons of different nationalities, each of whom prefer a different brand of cigarette, a different drink, and a different pet. Give the following facts, the question to answer is: “Where does the zebra live, and in which house do they drink water “ ▪ The Englishman lives in the red house. ▪ The Spaniard owns the dog. ▪ The Norwegian lives in the first house on the left. ▪ Kools are smoked in the yellow house. ▪ The man who smokes Chesterfields lives in the house next to the man with the fox. ▪ The Norwegian lives next to the blue house.

DCP 1172, Homework 2 4 Homework 2-2b: Constraint Satisfaction Problems (cont., AIMA-ch5, Ex.5-13) ▪ The Winston smoker owns snails. ▪ The Lucky Strike smoker drinks orange juice. ▪ The Ukrainian drinks tea. ▪ The Japanese smokes Parliaments. ▪ Kools are smoked I the house next to the house where the horse is kept. ▪ Coffee is drunk in the green house. ▪ The Green house is immediately to the right (your right) of the ivory house. ▪ Milk is drunk in the middle house. Discuss different representations of the problem as a CSP. Why would one prefer one representation over another ?

DCP 1172, Homework 2 5 Homework 2-3 : Adversarial Search (AIMA-ch6) (a) Compute the backed-up values computed by the minimax algorithm. Show your answer by writing values at the appropriate nodes in the above tree. (b) Compute the backed-up values computed by the alpha-beta algorithm. What nodes will not be examined by the alpha-beta pruning algorithm? (c) What move should Max choose once the values have been backed-up all the way? A B C D E FG HIJ K LMNOPQRSTUVWYX Max Min Consider the following game tree in which the evaluation function values are shown below each leaf node. Assume that the root node corresponds to the maximizing player. Assume the search always visits children left-to-right.

DCP 1172, Homework 2 6 Answer Sections Homework 2-1 Page 7-26 Homework 2-2 Homework 2-3

DCP 1172, Homework 2 7 HW#2-1: Depth-first search Node queue:initialization #statedepthpath costparent # 1A00--

DCP 1172, Homework 2 8 HW#2-1: Depth-first search Node queue:add successors to queue front; empty queue from top #statedepthpath costparent # 2B131 3C1191 4D151 1A00--

DCP 1172, Homework 2 9 HW#2-1: Depth-first search Node queue:add successors to queue front; empty queue from top #statedepthpath costparent # 5E272 6F282 7G282 8H292 2B131 3C1191 4D151 1A00--

DCP 1172, Homework 2 10 HW#2-1: Depth-first search Node queue:add successors to queue front; empty queue from top #statedepthpath costparent # 5E272 6F282 7G282 8H292 2B131 3C1191 4D151 1A00--

DCP 1172, Homework 2 11 HW#2-1: Breadth-first search Node queue:initialization #statedepthpath costparent # 1A00--

DCP 1172, Homework 2 12 HW#2-1: Breadth-first search Node queue:add successors to queue end; empty queue from top #statedepthpath costparent # 1A00-- 2B131 3C1191 4D151

DCP 1172, Homework 2 13 HW#2-1: Breadth-first search Node queue:add successors to queue end; empty queue from top #statedepthpath costparent # 1A00-- 2B131 3C1191 4D151 5E272 6F282 7G282 8H292

DCP 1172, Homework 2 14 HW#2-1: Breadth-first search Node queue:add successors to queue end; empty queue from top #statedepthpath costparent # 1A00-- 2B131 3C1191 4D151 5E272 6F282 7G282 8H292

DCP 1172, Homework 2 15 HW#2-1: Uniform-cost search Node queue:initialization #statedepthpath costparent # 1A00--

DCP 1172, Homework 2 16 HW#2-1: Uniform-cost search Node queue:add successors to queue so that entire queue is sorted by path cost so far; empty queue from top #statedepthpath costparent # 1A00-- 2B131 3D151 4C1191

DCP 1172, Homework 2 17 HW#2-1: Uniform-cost search Node queue:add successors to queue so that entire queue is sorted by path cost so far; empty queue from top #statedepthpath costparent # 1A00-- 2B131 3D151 5E272 6F282 7G282 8H292 4C1191

DCP 1172, Homework 2 18 HW#2-1: Uniform-cost search Node queue:add successors to queue so that entire queue is sorted by path cost so far; empty queue from top #statedepthpath costparent # 1A00-- 2B131 3D151 5E272 6F282 7G282 8H292 4C1191

DCP 1172, Homework 2 19 HW#2-1: Greedy search Node queue:initialization #statedepthpathcosttotalparent # costto goalcost 1A

DCP 1172, Homework 2 20 HW#2-1: Greedy search Node queue:Add successors to queue, sorted by cost to goal. #statedepthpathcosttotalparent # costto goalcost 1A B D C Sort key

DCP 1172, Homework 2 21 HW#2-1: Greedy search Node queue:Add successors to queue, sorted by cost to goal. #statedepthpathcosttotalparent # costto goalcost 1A B G E H F D C

DCP 1172, Homework 2 22 HW#2-1: Greedy search Node queue:Add successors to queue, sorted by cost to goal. #statedepthpathcosttotalparent # costto goalcost 1A B G E H F D C

DCP 1172, Homework 2 23 HW#2-1: A* search Node queue:initialization #statedepthpathcosttotalparent # costto goalcost 1A

DCP 1172, Homework 2 24 HW#2-1: A* search Node queue:Add successors to queue, sorted by total cost. #statedepthpathcosttotalparent # costto goalcost 1A B D C Sort key

DCP 1172, Homework 2 25 HW#2-1: A* search Node queue:Add successors to queue front, sorted by total cost. #statedepthpathcosttotalparent # costto goalcost 1A B G E H D F C

DCP 1172, Homework 2 26 HW#2-1: A* search Node queue:Add successors to queue front, sorted by total cost. #statedepthpathcosttotalparent # costto goalcost 1A B G E H D F C