Question 1
Question 1
(a)
(b)
BFS and IDS are complete and optimal but highly inefficient due to
expanding too many nodes. Greedy search is more efficient but
sacrifices path optimality. A* search emerges are the best, being both
highly efficient in terms of node expansions and always finding the
optimal path. The results demonstrate the power of an informed,
heuristic-guided search like A* compared to uninformed approaches.
Question 2
(a)
Let h’(n) = wh(n), and h’(n) ≤ h(n) for all n.
And because the A* Search is optimal when 0 ≤ w ≤ 1, so we have :
f’w(n) = g(n) + h’(n)
And we have:
fw(n) = (2 − w)g(n) + wh(n)
= g(n) + g(n) - wg(n) + h’(n)
= g(n) + h’(n) + (1-w)g(n)
And when 0 ≤ w ≤ 1, we have 0 ≤ (1-w)g(n) ≤ g(n), so:
g(n) + h’(n) ≤ fw(n), which is the same as minimizing f’w(n) = g(n) +
h’(n) for some function h’(n) with the property that h’(n) ≤ h(n) for all
n.
So the Heuristic Path Search is optimal when 0 ≤ w ≤ 1.
(b)
(c)
Analyzing the results for all three start states (start4, start5, start6), we
can observe the following trends as the value of w increases from 1.0
to 1.4:
Number of expanded nodes:
For all states, the number of expanded nodes decreases significantly as
the value of w increases from 1.0 to 1.3.This indicates that higher w
values make the search more focused on the heuristic, expanding
fewer nodes.
But the consistent increase in expanded nodes at w=1.4 suggests that
the heuristic may become less informative or even misleading at this
high value, causing the search to explore more nodes before finding a
solution. This could be due to the specific problem structure and how
the heuristic interacts with it.
Path length:
In contrast, the path length generally increases with higher w values.
This shows that focusing more on the heuristic (higher w) leads to
suboptimal, longer paths.
Question 3
(a)
(b)
(c)
First, we consider the situation where the agent starts from position p with speed k. After k steps,
the agent will reach the position:
p + k(k+1)/2
Now we consider the original problem, that is, the agent starts from position 0 at speed k and the
target position is n. We can think of it as part of a larger path: Assume that the starting point of
this larger path is position p, and the agent starts from p at a speed of 0. According to the
conclusion of step 1, for the agent to reach position 0 at speed k, it needs to satisfy:
0 = p + k(k+1)/2 solve for p = -k(k+1)/2
In this larger path, the agent needs to start from position p = -k(k+1)/2 and finally reach position
n. According to the results of question (b), we know that the number of steps required to reach
position n from position p at 0 speed is:
M(n-p, 0) = ¿] = [√ n+k (k +1)/2 ]
However, in the original problem, the agent actually started from position 0 at speed k, which is
equivalent to skipping the first k steps of the larger path. Therefore, the actual number of steps
required by the agent is:
M(n,k) =¿ ] - k
Then the maximum distance for deceleration is:
k(k-1)/2, so n must be: n ≥ k(k-1)/2 and k ≥ 0.
Question 4
(a)
(b)
On my tree, the 10, 11, 8, 15, 14, 7, 5. Total 7 leaves are evaluated.
(c)
(d)
Time complexity : O(bd/2), where b is the branching factor (the average
number of child nodes for each node in the tree) and d is the depth of
the tree.
This is because the algorithm can, through efficient pruning, only check
half of the branches at each level on average.