CSci 4511 - Homework 2
Homework 2 -- due Thursday February 21
This homework will be graded out of 100 points. It will count 6% of the
grade. Please submit it from the canvas page.
Written questions (70 points)
- [10 points]
What are the disadvantages of using a heuristic function for A*
which is not consistent? Be precise and provide an example to
support the points you are making.
- [15 points]
The functions g and h each play a different role in A*.
What are those roles? What happens when you emphasize or de-emphasize
one of them by using different weights in f(n)?
Consider the case in which f(n) = (1 - w)g(n) + wh(n), with 0 ≤ w
≤ 1.
Be specific and analyze what happens for different values of w.
- [15 points]
Discuss the possible advantages of the following state-space search
strategy: obtain by some method a path to a goal node and
its associated cost f(Goal)=C.
This cost is not necessarily minimal but it gives
an upper bound on the minimal cost. Now use A* with an admissible $h$
function and discard immediately any OPEN nodes reached
whose f values are greater than C.
- Explain if the modified A* algorithm with this strategy is
guaranteed to find an optimal solution if one exists or not. Be
short but precise.
- Explain if the fact that the algorithm discards some of the
OPEN nodes (i.e. nodes in the frontier) means that fewer nodes
are expanded. Be short but precise.
- Does this strategy reduce the total storage requirements? Explain
your reasoning.
- [10 points]
Answer the following questions on Uniform Cost search briefly but precisely:
- Is it possible for Uniform Cost to expand more nodes than Depth-First
search? Feel free to use an example to support your answer.
-
Does Uniform Cost search expand more nodes than A*? Why (or why not)?
- [20 points]
Answer the following questions explaining your reasoning briefly but precisely.
- Why any node in OPEN with f(n) < f^*(n) (the cost of the optimal solution
path) will eventually be selected for expansion by A*?
- Is it true that all admissible heuristics are equal in the sense that
A* will search the states in the same order no matter what the heuristic is?
- Is Breadth-First search complete if the state space has infinite depth
but a finite branching factor?
- Does the fact that A* is ``optimally efficient'' mean that A* will never
expand more nodes than any other algorithm?
Programming questions (30 points)
For this question we will use the software for search (either Lisp or python).
For this programming assignment you will use the Romanian map shown in
the texbook and already defined in the aima code.
- [5 points]
Compare the performance of the following uninformed search algorithms:
- breadth_first_tree_search,
- breadth_first_graph_search,
- depth_first_graph_search,
- iterative_deepening_search,
- depth_limited_search
on the Romanian map to solve these problems:
- find a path from Arad to Bucharest
- find a path from Oradea to Neamt
- find a path from Eforie to Timisoara
To compare the performance, you can use the Lisp function
compare-search-algorithms
or the python function
compare_graph_searchers()
.
- [10 points]
Add or modify the code in the search functions to compute the
cost of the solution found by each algorithm and print the cost
for each algorithm when you compare the algorithms.
- [5 points]
Print the solution path found by the search functions.
- [10 points]
Compute the average cost and standard deviation
of the cost of the paths found by the different algorithms
you used in the first programming question when you use them
to solve the same problem. Write the code
so that it will work for any number of algorithms and will
print the average and standard deviation at the bottom of
the table printed by the comparison function.
You need to submit one or more files with your program and a file
that shows the output.
Specify which lisp or python files you used. Do not modify the
existing files, but create a new file with your changes.
Copyright: © 2019 by the Regents of the University
of Minnesota
Department of Computer Science and
Engineering. All rights reserved.
Comments to: Maria Gini
Changes and corrections are in red.