Written examination: Solution suggestions TIN175/DIT411, Introduction to Artificial Intelligence

Similar documents
The exam is closed book, closed calculator, and closed notes except your one-page crib sheet.

CS221 Practice Midterm

Final. Introduction to Artificial Intelligence. CS 188 Spring You have approximately 2 hours and 50 minutes.

Name: UW CSE 473 Final Exam, Fall 2014

Final exam of ECE 457 Applied Artificial Intelligence for the Spring term 2007.

Mock Exam Künstliche Intelligenz-1. Different problems test different skills and knowledge, so do not get stuck on one problem.

Midterm. Introduction to Artificial Intelligence. CS 188 Summer You have approximately 2 hours and 50 minutes.

The exam is closed book, closed calculator, and closed notes except your one-page crib sheet.

Introduction to Spring 2009 Artificial Intelligence Midterm Exam

Lecture 9: Search 8. Victor R. Lesser. CMPSCI 683 Fall 2010

CS 188 Introduction to Fall 2007 Artificial Intelligence Midterm

The exam is closed book, closed calculator, and closed notes except your one-page crib sheet.

CS 4100 // artificial intelligence. Recap/midterm review!

Section Handout 5 Solutions

Final Exam December 12, 2017

Midterm Examination CS540: Introduction to Artificial Intelligence

Final exam of ECE 457 Applied Artificial Intelligence for the Fall term 2007.

The exam is closed book, closed calculator, and closed notes except your one-page crib sheet.

Final Exam December 12, 2017

Constraint satisfaction search. Combinatorial optimization search.

CS360 Homework 12 Solution

Introduction to Spring 2006 Artificial Intelligence Practice Final

Introduction to Fall 2011 Artificial Intelligence Final Exam

HW8. Due: November 1, 2018

Introduction to Spring 2009 Artificial Intelligence Midterm Solutions

Using first-order logic, formalize the following knowledge:

Introduction to Fall 2008 Artificial Intelligence Midterm Exam

Introduction to Fall 2009 Artificial Intelligence Final Exam

The exam is closed book, closed calculator, and closed notes except your one-page crib sheet.

Alpha-Beta Pruning: Algorithm and Analysis

Examination Artificial Intelligence Module Intelligent Interaction Design December 2014

Final. CS 188 Fall Introduction to Artificial Intelligence

Final. CS 188 Fall Introduction to Artificial Intelligence

CSC242: Intro to AI. Lecture 7 Games of Imperfect Knowledge & Constraint Satisfaction

CITS4211 Mid-semester test 2011

Scout and NegaScout. Tsan-sheng Hsu.

Minimax strategies, alpha beta pruning. Lirong Xia

Chapter 6 Constraint Satisfaction Problems

Math 16 - Practice Final

Task Assignment. Consider this very small instance: t1 t2 t3 t4 t5 p p p p p

Alpha-Beta Pruning: Algorithm and Analysis

The Inductive Proof Template

Alpha-Beta Pruning: Algorithm and Analysis

CS 188 Introduction to AI Fall 2005 Stuart Russell Final

Finding optimal configurations ( combinatorial optimization)

CSL302/612 Artificial Intelligence End-Semester Exam 120 Minutes

Scout, NegaScout and Proof-Number Search

Algebra Year 10. Language

Decision Trees. Tirgul 5

Artificial Intelligence

Combining Symmetry Breaking with Other Constraints: lexicographic ordering with sums

Sampling from Bayes Nets

Two hours UNIVERSITY OF MANCHESTER SCHOOL OF COMPUTER SCIENCE. Date: Thursday 17th May 2018 Time: 09:45-11:45. Please answer all Questions.

Algorithms Re-Exam TIN093/DIT600

Constraint Satisfaction Problems

1. Tony and his three best friends (Steven, Donna, and Randy) were each at a different table.

IS-ZC444: ARTIFICIAL INTELLIGENCE

CS 188 Fall Introduction to Artificial Intelligence Midterm 1

Artificial Intelligence Methods (G5BAIM) - Examination

Lynch 2017 Page 1 of 5. Math 150, Fall 2017 Exam 2 Form A Multiple Choice

Foundations of Artificial Intelligence

CS 4700: Foundations of Artificial Intelligence Homework 2 Solutions. Graph. You can get to the same single state through multiple paths.

Search and Lookahead. Bernhard Nebel, Julien Hué, and Stefan Wölfl. June 4/6, 2012

CS221 Practice Midterm #2 Solutions

Dialog on Simple Derivatives

Summary. Local Search and cycle cut set. Local Search Strategies for CSP. Greedy Local Search. Local Search. and Cycle Cut Set. Strategies for CSP

Decision Mathematics D1

Introduction to Arti Intelligence

Relative and Absolute Directions

Constraint Technology for Solving Combinatorial Problems

ECS 120 Lesson 23 The Class P

Mathematics Enhancement Programme

Final Examination CS540-2: Introduction to Artificial Intelligence

University of Regina Department of Mathematics and Statistics Math (Fall 2013) Final Exam December 10, 2013

Introduction to Machine Learning Prof. Sudeshna Sarkar Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur

Principles of AI Planning

Integer Programming for Bayesian Network Structure Learning

Data 1 Assessment Calculator allowed for all questions

CMPSCI 611 Advanced Algorithms Midterm Exam Fall 2015

Principles of AI Planning

Pearson Edexcel GCE Decision Mathematics D2. Advanced/Advanced Subsidiary

Lecture 23: More PSPACE-Complete, Randomized Complexity

Physics 2080 Extra Credit Due March 15, 2011

Lynch, October 2016 Page 1 of 5. Math 150, Fall 2016 Exam 2 Form A Multiple Choice Sections 3A-5A

1 [15 points] Search Strategies

Termination Problem of the APO Algorithm

ˆ The exam is closed book, closed calculator, and closed notes except your one-page crib sheet.

I also express my gratitude to all my friends who courage and help me for writing this book.

Summary. Agenda. Games. Intelligence opponents in game. Expected Value Expected Max Algorithm Minimax Algorithm Alpha-beta Pruning Simultaneous Game

AUTOMATED REASONING. Agostino Dovier. Udine, October 2, Università di Udine CLPLAB

Mathematics (Project Maths)

Decision Mathematics D1

Mathematics. Pre-Leaving Certificate Examination, Paper 2 Higher Level Time: 2 hours, 30 minutes. 300 marks L.20 NAME SCHOOL TEACHER

Constraint Satisfaction [RN2] Sec [RN3] Sec Outline

CSE 473: Artificial Intelligence Spring 2014

Final Examination CS 540-2: Introduction to Artificial Intelligence

Foundations of Artificial Intelligence

Andrew/CS ID: Midterm Solutions, Fall 2006

Constraint Satisfaction

Transcription:

Written examination: Solution suggestions TIN175/DIT411, Introduction to Artificial Intelligence Question 1 had completely wrong alternatives, and cannot be answered! Therefore, the grade limits was lowered by 1 point! Tuesday 13 February 2018, 8:30 12:30 Examiner: Peter Ljunglöf This examination consists of 12 questions, each giving 1 point. In total you can get 12 points. Questions 11 12 are slightly more advanced, and they are necessary for getting a higher grade. rades: 6 To get grade 3//pass you need at least 7 points. To get grade 4 you need at least 9 points, including at least 1 point from questions 11 12. To get grade 5 / V/distinction you need at least 11 points, including at least 2 points from questions 11 12. 10 Note: if you are a student from TIN174 or DIT410 you can only get grade 3 / / pass. 8 Tools: Paper and pencil. No extra books, papers or calculators. No red pen! Notes: Answer every question directly on the question paper, and write your ID number at the top of every paper. If you have any extra papers with associated calculations, you should hand in them too. Remember to write legibly! https://www.smbc-comics.com/comic/ai-2

Checkers board problem n black checkers pieces occupy the white squares at the bottom row of an 2n 2n checkers board. The pieces must be moved to the top row but in reverse order; so that piece i that starts in square (2i, 1) must end up in square (2n 2i+1, 2n). At each time step, all n pieces move simultaneously. A piece can move one square diagonally (up/down, left/right), or stay where it is. Two pieces cannot occupy the same square. 1. State space and branching factor Note: This question has the wrong answer suggestions, so the pass limit of the exam was reduced What is the size of the state space (approximately)? n n 2 n 3 n 4 2 n n + n 2 Correct answer is approximately n 2n What is the branching factor (approximately)? 5 n 5n 5 + n n 2 5n 2 Correct answer is approximately 5 n 2. Dominating and admissible heuristics If we assume that there are no other pieces on the board, then the following is a nontrivial admissible heuristic for moving piece i to its goal location (2n 2i+1, 2n): h i = 2n y i = the number of vertical rows between the piece's current row and the top row Describe an admissible heuristic h for the complete problem with n pieces, which dominates every heuristics h i (1 i n). The max of all h i : max i (h i ) = 2n min i (y i ) Note that the sum of all h i is not admissible, since all bricks move simultaneously and this is considered one move.

Heuristic search The following search problem has only three states, and three directed edges. S is the start node and is the goal node. To the right, three different heuristic functions are defined, h 1, h 2 and h 3. S 4 2 1 2 6 3 h 1 h 2 h 3 S 8 7 3 A 3 4 0 A 4 C 7 5 4 C 2 2 0 0 0 0 3. Which heuristics is admissible? Which (if any) of the heuristics are admissible? Check all that apply. h 1 h 2 h 3 none Note that none of the heuristics are consistent (e.g., h i (S) h i (A) > cost(s, A) for all h i ) 4. What path is returned? What solutions will be returned by (a) breadth-first tree search, and (b) A* tree search using the h 3 heuristics? readth-first tree search A* tree search using using h 3 Final solotion path found S S A C Cost of final path 10 8 A* search will return the optimal path, since h 3 is admissible

Heuristic search (cont.) 5 6. What would a search algorithm do? The generic search algorithm uses a frontier of nodes that are waiting to be expanded. At each iteration, one node is removed from the frontier, and its neighbors are added to the frontier. Fill the table below, for (a) A* tree search using the h 1 heuristics, and (b) for uniform-cost tree search. Important: Write the frontier in order with the head to the left, and write the f-values together with the nodes in the frontier, like this: "X(3) Y(3) Z(7)". reak all ties in the frontier alphabetically (this is why X came before Y in the example before). Question 5. A* tree search using h 1 Question 6. Uniform-cost tree search Initial frontier S(8) S(0) Node removed from frontier Nodes added to frontier Frontier after one iteration Node removed from frontier Nodes added to frontier Frontier after two iterations Node removed from frontier Nodes added to frontier Frontier after three iterations Node removed from frontier S S A, A, A(5 = 2+3) (11 = 4+7) A(2) (4) A A, C, C C(8 = 6+2) (10 = 3+7) (11 = 4+7) (3) (4) C(6) C C, (9 = 9+0) (10 = 3+7) (11 = 4+7) (4) C(5) C(6) (10) I split the A* f-values into cost+heuristics, to make it clearer. If you used tree search where duplicate frontier nodes are updated instead of added again, that was ok too. If you showed graph search, you got 1/2 point. If you used the cost of the latest edge only, you got 0 points. If you used breadth-first search in question 6, you got 0 points.

Map colouring The map to the right shows the altic countries with their neighbours. We want to paint them using only the colours red, green, blue and yellow, so that no bordering countries have the same colour. Russia has already decided that it wants to be red, and since is is bordering every other country, noone else can be red. This leaves us with the possible colours ()reen, ()lue and (Y)ellow for the variables EST, LAT, LIT, EL and POL. Furthermore, Estonia does not want to be yellow, and elarus does not want to be blue! (Don't ask why, but it might be because of some people's fondness of constrait satisfaction problems). Russia (Kaliningrad) Poland Estonia Lativa Lithuania Russia elarus 7. Formulate this problem as a CSP Draw the constraint graph below, and write the constraints at the graph edges. Enforce all unary constraints by reducing the initial domains. Circle every graph node and write the resulting domain inside the circle. EST {,} EST LAT POL LIT LIT {,,Y} LIT LAT LIT EL EL LAT LAT {,,Y} POL {,,Y} POL EL EL {,Y} If you addded a node for Russia (with the correct constraints, and only Red as the domain), that was also considered correct.

Map colouring (cont.) 8. Which variable should we choose next? Now we want to colour the rest of the countries using the backtracking algorithm. We need to select a variable which we can assign a value. Which one should we choose? a) Which variable(s) does the Minimum Remaining Values* heuristic suggest that you try next? (*i.e, choose the variable with the fewest legal values). Check all that apply: EL EST LAT LIT POL b) Which variable(s) does the Degree Heuristic* suggest that you try next? (*i.e, choose the variable with most constraints on remaining variables). Check all that apply: EL EST LAT LIT POL It is also ok to only answer EL, because then we assume that we only choose between MRV variables 9. Make the graph arc consistent Assume that we colour Poland yellow. What are the resulting domains after enforcing arc consistency on the graph? (If you want you can show your calculations below). Here's one possibility: 1. POL=Y implies EL= 2. POL=Y and EL= implies LIT= 3. EL= and LIT= implies LAT=Y Note: This is a simplification of how the AC-3 algorithm would make the graph arc consistent. Variable EST LAT LIT EL POL Domain after arc consistency, Y Y

Minimax search In the following minimax game tree, are maximising nodes, and are minimising nodes. Note that two leaves are unspecified and marked x and y. m p s a 3 r 7 t 6 x 1 4 7 y 1 6 5 1 3 3 1 4. When will the minimax value be x or y? a) For which values of x will the minimax value of the topmost node be x? (Assuming that y = 0) 1 x 3, because: r = max(x, 1) implies x 1 p = min(r, 3) implies x 3 m = max(p, s) implies x 0 (s = t = y = 0) b) For which values of y will the minimax value of the topmost node be y? (Assuming that x = 0) 1 y 6, because: s = min(y, 6) implies y 6 m = max(p, s) implies y 1 (p = min(3, 1, 7) = 1) 11.* When will alpha-beta prune a branch? For which values of x and y will minimax with α-β pruning not consider branch a? (In other words: For which values of x and y will branch a be pruned away?) x < 1 & y 1 3 < x & y 3 1 x 3 & y x Alternatively: y min(max(x, 1), 3) = max(min(x, 3), 1)

Non-consistent heuristics 12.* Create an admissible but non-consistent heuristics elow is a search graph with starting state S and goal state. It also has a heuristics h, but unfortunately it is not specified in all places. For which values of h(a) and h() will the heuristics be admissible but not consistent? S h: 5 4 2 C h: 3 2 1 h:? 4 3 A h:? h: 0 Admissibility requires: 0 h 4 & 0 h A 5 Consistency requires: h S 2 h A h S +2 & h S 4 h h S +4 & h C 2 h h C +2 & h A 1 h h A +1 3 h A 7 & 1 h 9 & 1 h 5 & h A 1 h h A +1 So, admissibility but non-consistency means: 0 h A 5 & 0 h 4 & (3 h A 7 & 1 h 9 & 1 h 5 & h A 1 h h A +1) which can be simplified to: 0 h A 5 & 0 h 4 & (h A < 3 h A > h + 1)