Problem 1. (15 points) Consider the so-called Cryptarithmetic problem shown below.

Similar documents
Artificial Intelligence Lecture 3

Solving Problems by Searching

Practice Session 2. HW 1 Review

Adversarial Search 1

ARTIFICIAL INTELLIGENCE (CS 370D)

UMBC 671 Midterm Exam 19 October 2009

CSE 473 Midterm Exam Feb 8, 2018

Search then involves moving from state-to-state in the problem space to find a goal (or to terminate without finding a goal).

Midterm Examination. CSCI 561: Artificial Intelligence

CS 171, Intro to A.I. Midterm Exam Fall Quarter, 2016

Homework Assignment #1

Games and Adversarial Search II

Heuristics, and what to do if you don t know what to do. Carl Hultquist

Adversary Search. Ref: Chapter 5

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

Your Name and ID. (a) ( 3 points) Breadth First Search is complete even if zero step-costs are allowed.

mywbut.com Two agent games : alpha beta pruning

Artificial Intelligence Search III

Section Marks Agents / 8. Search / 10. Games / 13. Logic / 15. Total / 46

UNIVERSITY of PENNSYLVANIA CIS 391/521: Fundamentals of AI Midterm 1, Spring 2010

Midterm. CS440, Fall 2003

CSC384 Introduction to Artificial Intelligence : Heuristic Search

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

Game Playing Beyond Minimax. Game Playing Summary So Far. Game Playing Improving Efficiency. Game Playing Minimax using DFS.

CS 4700: Artificial Intelligence

game tree complete all possible moves

CS 771 Artificial Intelligence. Adversarial Search

Games (adversarial search problems)

AIMA 3.5. Smarter Search. David Cline

CSC 380 Final Presentation. Connect 4 David Alligood, Scott Swiger, Jo Van Voorhis

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

Heuristics & Pattern Databases for Search Dan Weld

COMP5211 Lecture 3: Agents that Search

Game-Playing & Adversarial Search

CSC 396 : Introduction to Artificial Intelligence

5.4 Imperfect, Real-Time Decisions

Foundations of Artificial Intelligence

Artificial Intelligence Ph.D. Qualifier Study Guide [Rev. 6/18/2014]

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

2 person perfect information

Foundations of AI. 3. Solving Problems by Searching. Problem-Solving Agents, Formulating Problems, Search Strategies

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

CS 188 Fall Introduction to Artificial Intelligence Midterm 1

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

Informed search algorithms. Chapter 3 (Based on Slides by Stuart Russell, Richard Korf, Subbarao Kambhampati, and UW-AI faculty)

CS188: Section Handout 1, Uninformed Search SOLUTIONS

CS61B Lecture #22. Today: Backtracking searches, game trees (DSIJ, Section 6.5) Last modified: Mon Oct 17 20:55: CS61B: Lecture #22 1

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

CS188: Artificial Intelligence, Fall 2011 Written 2: Games and MDP s

Informed Search. Read AIMA Some materials will not be covered in lecture, but will be on the midterm.

INF September 25, The deadline is postponed to Tuesday, October 3

22c:145 Artificial Intelligence

Adversarial Search Aka Games

CMPT 310 Assignment 1

Foundations of AI. 3. Solving Problems by Searching. Problem-Solving Agents, Formulating Problems, Search Strategies

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

Artificial Intelligence Adversarial Search

CS 5522: Artificial Intelligence II

CS 188 Introduction to Fall 2014 Artificial Intelligence Midterm

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

Programming Project 1: Pacman (Due )

CS 540: Introduction to Artificial Intelligence

Algorithms for Data Structures: Search for Games. Phillip Smith 27/11/13

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

More on games (Ch )

AI Module 23 Other Refinements

Outline for today s lecture Informed Search Optimal informed search: A* (AIMA 3.5.2) Creating good heuristic functions Hill Climbing

Adversarial Search (Game Playing)

UMBC CMSC 671 Midterm Exam 22 October 2012

Announcements. Homework 1 solutions posted. Test in 2 weeks (27 th ) -Covers up to and including HW2 (informed search)

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

CSE 573 Problem Set 1. Answers on 10/17/08

Game-playing AIs: Games and Adversarial Search I AIMA

CS-171, Intro to A.I. Mid-term Exam Winter Quarter, 2015

More on games (Ch )

CSE 473: Artificial Intelligence Fall Outline. Types of Games. Deterministic Games. Previously: Single-Agent Trees. Previously: Value of a State

Multiple Agents. Why can t we all just get along? (Rodney King)

Game-playing: DeepBlue and AlphaGo

Artificial Intelligence 1: game playing

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

Lecture 14. Questions? Friday, February 10 CS 430 Artificial Intelligence - Lecture 14 1

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

Written examination TIN175/DIT411, Introduction to Artificial Intelligence

Project 1. Out of 20 points. Only 30% of final grade 5-6 projects in total. Extra day: 10%

: Principles of Automated Reasoning and Decision Making Midterm

Game Playing State-of-the-Art

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

Artificial Intelligence. Minimax and alpha-beta pruning

Adversarial Search: Game Playing. Reading: Chapter

CS188 Spring 2014 Section 3: Games

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

CS 331: Artificial Intelligence Adversarial Search II. Outline

Artificial Intelligence

CMPUT 396 Tic-Tac-Toe Game

CSE 573: Artificial Intelligence Autumn 2010

Tree representation Utility function

Parallel Randomized Best-First Search

CS 188: Artificial Intelligence

Theory and Practice of Artificial Intelligence

6.034 Quiz 2 20 October 2010

Transcription:

ECS 170 - Intro to Artificial Intelligence Suggested Solutions Mid-term Examination (100 points) Open textbook and open notes only Show your work clearly Winter 2003 Problem 1. (15 points) Consider the so-called Cryptarithmetic problem shown below. S A V E + M O R E --------- M O N E Y The problem is to figure out the digits (0 thru 9) that should be assigned to these letters so that the indicated arithmetic operation is valid. Your job is to formulate this as a search problem. Clearly indicate a definition of state, initial state, goal state, operators and define a suitable path cost. Estimate the size of the search tree and draw a small segment of the search tree just to show that you understood the procedure. Suggested Solution. Each state represents a partial assignment of numbers to letters. Cryptarithmetic Problem S A V E + M O R E --------- M O N E Y Each state represents a partial assignment of numbers to letters. {no assignments} {S=1}{A=1{V=1} {E=1} {S=1, {S=1,... A=2} A=3}

Goal State: A leaf at which the assignment is consistent and is a solution to the puzzle. Problem 2. (20 points) The following search tree is given. Your job is to find the maximum number located at one of the leaf nodes of the tree. You are asked to compare a newly discovered heuristic search with the Best First search by actually finding the maximum number using both methods on the given search tree. For each of the methods, your answer should show the list of nodes waiting to be expanded after each step. In each case, what is the answer produced by your search method? What is the correct answer? First I will describe the new method and next I will help you by re-stating the Best First method, described in your textbook. New method: Follow the path that looks like it's improving the fastest. Keep going as long as the path is improving. Best First method: Continue working from the "best node on the active list so far" as long as its successors are still improving. New BEST Method FIRST 0 0 (0) / \ (4 2) 4 2 / \ 7 5 1 9 6 / \ / \ 8 10 3 12 34 17 50 Solution: New BEST Method FIRST 0 0 (0) / \ (4 2) 4 2 4 (7 5 2) / \ (8 5 2) 7 5 1 9 6 7 (8 10 2) / \ / \ (8 10 9 6) 8 10 3 12 34 17 8 (8 10 12 6) (New). BF (8 10 12 34 17). 50 (optimal)

Node 8 (marked New) follows fastest improving path. Is efficient. Node 34 (marked BF) pursues best nodes, but will not find path that looks bad at first Obtained a better solution. Problem 3. (25 points) For each of the following statements below, indicate whether the statement is true or false, and give a brief but precise justification for your answer. Correct answers with correct justifications will carry 3 points. No points will be awarded for answers without correct justifications. Example Question: The time and memory requirements of IDA* can be improved by using A* algorithm to do search in individual iterations. Model Answer: False. Because A* in the worst case can take as much memory as breadth-first, and thus using A* in the individual iterations will make IDA* require exponential memory (instead of linear memory). A). Breadth-first search is complete if the state space has infinite depth but finite branching factor. Solution TRUE. It won t return if there is no goal, butcompleteness does not require this nor can any algorithm guarantee it. B). Assume that a king can move one square in any of the 8 directions in a chess board. Manhattan distance is then an admissible heuristic for the problem of moving the king from square A to Square B. Solution. FALSE. For a single diagonal move the Manhattan Distance is 2. C.) For a uniform tree of depth 10 and branching factor b, iterative deepening dept-first search will search at most 5 times more nodes than depth-first search, whatever be the value of b. D.) A* search does b^(d/2) node expansions when searching a unifrom tree of branching factor b and depth d, using a perfect heuristic. E.) Consider a uniform search tree of depth d and branching factor b, where there are many goal nodes, all of which are uniformly distributed at the leaf level d. Assuming that memory consumption is not a problem, we are better off using breadth-first search than depth-first search in this scenario. F.) A* search with heuristic h = 0 will always have to search the entire tree before finding the optimal solution.

G.) Suppose A* search uses an evaluation function f(n) = (1-w) g(n) + w h(n). For any value of w between 0 and 1 (inclusive), A* will terminate and return optimal solution. H.) If h1 and h2 are two admissible heuristics, and h3 is defined as h3(n) = max {h1(n), h2(n)}, then A* search with h3 is guaranteed to return an optimal solution while expanding as many or fewer nodes than either h1 or h2. 4. (20 points) Consider the game tree shown elsewhere on this questi0on paper in which the static scores are from the first player's point of view. (a) Suppose the first player is the maximizing player. What move should be chosen? Justify your answer by showing all work. (b) What nodes would not need to be examined using the alpha-beta pruning procedure. 5. (20 points) Given the following facts, prove that Some who are intelligent cannot read. a. Whoever can read is literate b. Dolphins are not literate c. Some dolphins are intelligent Use the symbols R for Read, L for Literate, D for dolphins and I for intelligent. Show clearly all the work. Suggested Solution The three facts are (for all x) [R(x) L(x)] (for all x) [D(x) ~L(x)] (there exists x) [D(x) ^ L(x)] The goal is (there exists x) [I(x) ^ ~R(x)] Add negated goal to axioms (for all x) [R(x) L(x)] (for all x) [D(x) ~L(x)] (there exists x) [D(x) ^ L(x)] ~(there exists x) [I(x) ^ ~R(x)] Put in clausal form

1. ~R(x) V L(x) 2. ~D(y) V ~L(y) 3. D(F), F is a Skolmenizing constant 4. I(F) 5. ~I(z) V R (z) Develop a Resolution tree 5 and 4 6. R(F) 6. and 1 7. L(F) 7. and 2 8. ~D(F) 8. and 3 Null