Lecture 03
Lecture 03
C 2
B 9
2
3 F goal state
start state A D E
4
3 4
Searching for a Solution
C 2
B 9
2
3 F goal state
start state A D
3
Search Tree
state = A,
cost = 0
state = B, state = D,
cost = 3 cost = 3
state = C, state = F,
cost = 5 cost = 12
goal state!
state = A,
cost = 7
state = B, state = D,
cost = 3 cost = 3
state = A,
state = F,
cost = 7
cost = 11
goal state!
state = B, state = D,
.. cost = 10
.. cost = 10
. .
Linking Search to Trees
You can begin to visualize the concept of a
graph
Searching along different paths of the graph
the states
The whole graph can be the state space
The links can be congruous to the actions……
Find solution:
◦ Sequence of cities, e.g., Arad, Sibiu, Fagaras, Bucharest.
16
Tuesday, May 23, 2023
Example: Traveling in Romania
2. Possible actions available, ACTIONS(s) returns the set of actions that can be
executed in s.
3. A successor function S(x) = the set of all possible {Action–State} pairs from
some state, e.g., Succ(Arad) = {<Arad Zerind, In Zerind>, … }
Random Search
Breadth-first search
Uniform-cost search
Depth-first search
Iterative deepening search