Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

2223 CSC14003 21CLC HW02

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 5

Course: CSC14003 – Introduction to Artificial Intelligence

Class 21CLC – Term II/2022-2023

Homework 02

Submission Notices:
● Conduct your homework by filling answers into the placeholders in this file (in Microsoft Word
format).
Questions are shown in black color, instructions/hints are shown in italics and blue color, and your
content should use any color that is different from those.
● After completing your homework, prepare the file for submission by exporting the Word file (filled
with answers) to a PDF file, whose filename follows the following format,
<StudentID-1>_<StudentID-2>_HW01.pdf (Student IDs are sorted in ascending order)
E.g., 2112001_2112002_HW02.pdf
and then submit the file to Moodle directly WITHOUT any kinds of compression (.zip, .rar, .tar, etc.).
● Note that you will get zero credit for any careless mistake, including, but not limited to, the following
things.
1. Wrong file/filename format, e.g., not a pdf file, use “-” instead of “_” for separators, etc.
2. Disorder format of problems and answers
3. Conducted not in English
4. Cheating, i.e., copying other students’ works or letting other students copy your work.

Problem 1. (1pt) Answer the following simple questions.

Please write your answer in the table


Questions (0.25pt each) Filling in the blanks
What is local search in constraint Local search is …
satisfaction?

What is a ridge in the local search A ridge is …


algorithm?

What is the objective of the greedy The goal is …


descent local search in CSPs by
applying the heuristic function?

What is the main drawback of the The answer is …


Hill climbing algorithm, and how
can it be addressed?
Problem 2. (1pt) For each of the following question, please choose either True or False and give a
brief explanation.

Please write your answer in the table


Claims True/False Explanation
Hill climbing can be used for both
optimization and search problems.

It is possible to get stuck in a local


maximum in simulated annealing.

Problem 3. (1pt) 8-puzzle problem. Apply the hill-climbing algorithm with the sum of Manhattan
distance heuristic to find a solution for the following pair of initial and goal states.
Initial state: 1 2 3 Goal state: 1 2 3
7 6 4 5 6
5 4 8 7 8

Your work should address the following requirements


- Draw the search tree including all possible successors of expanded states (except the goal)
- Calculate the heuristic value for every node
- Mark the optimal strategy found
Note that there will be ties at some steps. The hill-climbing search may be stuck after a few moves
if it follows an unpromising branch, and unfortunately, it has no way to predict this. Let's assume
that our search is “smart” enough to pick the correct one among ties.

Please present your work in the table


Problem 4. (3pts) Given the game tree below, note that:
 The max nodes are denoted as upward pointing triangles (∆ ¿ .
 The min nodes are denoted as downward pointing triangles (∇ ¿ .
 The chance nodes are denoted as circles (⊙ ¿.
 The square denotes the leaf nodes (⊡ ¿.
a) (1.5pts) Assuming that the children of a node are visited in left-to-right order, put an ‘X’ on the
branches if there exists an assignment of values to leaf nodes, for which that branch could be
pruned. If no branches can be pruned, please write down “not possible”.
b) (1.5pts) State why these branches are chosen in case they exist.

Please write your answer in the table


Problem 5. (2pts) Given Constraint Satisfaction Problem. You are a map-coloring robot assigned
to color this Southwest USA map. Adjacent regions must be colored a different color (R=Red,
B=Blue, G=Green). The constraint graph is shown below.

Note that the following questions are mutually independent.


a) (0.5pt) Mark all values that would be eliminated by Forward Checking, after variable AZ has
just been assigned value R as shown.
CA NV AZ UT CO NM
R G B R G B R R G B R G B R G B
b) (0.5pt) CA and AZ have been assigned values, but no constraint propagation has been done.
Mark all values that would be eliminated by Arc Consistency AC-3.
CA NV AZ UT CO NM
B R G B R R G B R G B R G B
c) (0.5pt) Consider the assignment below, where. NV is assigned and constraint propagation has
been done. Mark all unassigned variables that might be selected by the Minimum-Remaining-
Values (MRV) Heuristic.
CA NV AZ UT CO NM
R B G R B R B R G B R G B
d) (0.5pt) Consider the assignment below. NV is assigned and constraint propagation has been
done. Mark all unassigned variables that might be selected by the Degree Heuristic.
CA NV AZ UT CO NM
R B G R B R B R G B R G B

Problem 6. (2pts) Alice, Betty, and Carol are in a book club. They’re trying to figure which of five
different books they should read next. The books are:
 (D): Dreams From My Father by Barack Obama, non-fiction
 (L): Lord of the Rings by J.R.R. Tolkein (L), fiction
 (A): Artificial Intelligence: A Modern Approach by Stuart Russell and Peter Norvig, non-
fiction
 (H) Harry Potter and The Sorceror’s Stone, by J.K. Rowling, fiction, and
 (F): The Fabric of the Cosmos: Space, Time, and the Texture of Reality by Brian Greene,
non-fiction.
In this book club, they can’t read the same book because there is only one copy for each book.
Betty only reads non-fiction. Alice won’t read whatever either Betty or Carol are reading, while
Betty and Carol always read the same type of book.
a) (1pt) Formulate this problem as a CSP, stating the variables, domains, and constraints.
Constraints should be specified formally and precisely but may be implicit rather than explicit.

Please write your answer in the table


Variables Alice Betty Carol

Initial domains (after


enforcing unary constraints)

Binary constraints (each


constraint is represented as a
pair of variables
participating in the relation

b) (0.5pt) Draw the constraint graph associated with your CSP.

Please present your work in the table

c) (0.5pt) Assume that Betty asked you to choose a book for her. Starting from the domains in a),
show the resulting domains after running arc-consistency.

Please write your answer in the table


Variables Alice Betty Carol

Domains

You might also like