CSCI3230_Lecture9_Uninformed Search
CSCI3230_Lecture9_Uninformed Search
Part 1. Introduction
Part 7. Summary
Start state (initial state): indicate which state that the agent starts in.
State space: the set of all states reachable from the initial state by
any sequence of actions.
Path: a path in the state space is simply any sequence of actions
leading from one state to another.
Path cost function: the sum of the costs of the individual actions
along the path. For example, if consider how much time do you need
to eat all dots, then, the cost is the time.
The goal test: the agent can apply the goal test to a single state to
determine if it is a goal state.
For example, does Pac-Man already eat all dots?
Together, given the initial state, state space, successor function, and
goal test, we can define a search problem.
In other words, a problem is a collection of information that the agent
will use to decide what to do.
These information will be the input to the search algorithms.
The output of a search algorithm is a solution, that is, a path from
the initial state to a state that satisfies the goal test.
In order to find the solution to a problem, we can form a search tree from
the state space of the problem.
Search tree is superimposed over the state space.
Search tree root is a search node corresponding to the initial state.
Search tree leaf nodes correspond to states that do not have
successors in the tree, either because they have not been expanded, or
because they are expanded but generated the empty set.
At each step, the search algorithm chooses one leaf node to expand.
Answer: D
CSCI3230 (ESTR3108) 2024-2025 (Term 1) 33 / 64
Part 3. Uniform-cost search
C∗
Time complexity is O(b )
When depth is 0, yielding b0 node
When depth is 1, yielding b1 nodes
When depth is 2, ∗yielding b2 nodes
When depth is C , time complexity is
C∗ C∗
1 + b+b2 +b3 +...+b =O(b ).
C∗
Space complexity is O(b )
Similar to breadth-first search, it
stores every node that is generated.
Because it is either part of the fringe
or is an ancestor of a fringe node.
Depth-first search always expands the deepest node in the current fringe of
the search tree.
The search proceeds immediately to the deepest level of the search
tree, where the nodes have no successors.
In other words, only when the search hits a dead end (a non-goal
node with no expansion) does the search go back, and expand nodes
at shallower level, and so on.
Answer: A
CSCI3230 (ESTR3108) 2024-2025 (Term 1) 48 / 64
Part 5. Depth-limited search
Assume that the goal node is the node J , the depth limit ` is 2.
First, start from root node S and expand node A.
Then, expand node C. As node C is not the goal node, but its depth
is 2, we go back to node A.
Then, we expand node D. As node D is not the goal node, but its
depth is 2, we go back to node S and expand node B.
Repeat the above steps, until reach the goal node J .