80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
Control Strategies.pptx
1. Control strategies
Helps usdecidewhich rule toapply next.
What todowhen there are more than 1 matching
rules?
Good control strategyshould:
1.cause motion
2.Systematic
2. Control strategies are classified as:
1. Uninformed/blind search controlstrategy
Do not haveadditional infoaboutstates beyond problem def.
Total search space is looked for solution
No info is used todetermine preference of onechild over
other.
Example: 1. Breadth First Search(BFS), Depth First
Search(DFS).
4. 2. Informed/Directed Search Control Strategy
Some info about problem space(heuristic) is used to
computepreference among thechildren forexploration
and expansion.
Examples: 1. Best First Search, 2. ProblemDecomposition,
A*, Mean end Analysis
Heuristic function:
It mapseach state toa numerical valuewhich depicts
goodness of anode.
H(n)=value
Where ,
H() is a heuristicfunctionand ‘n’ is the currentstate.
5. Ex: in travelling salesperson problem heuristic value
associated with each node(city) might reflect
estimated distanceof thecurrent node from thegoal
node.
The heuristic we use hereis called HSLD Straight line
Distance heuristic.
7. Breadth First Search (BFS)
Algorithm:
1. Createavariable NODE_LISTand set it to
initial state.
2.Until a Goal State is found or NODE_LIST is
empty:
A) Remove the first element from NODE_LIST
amd call itas ‘E’. If the node listwas empty then
Quit.
B) Foreach way thateach rulecan match thestate
described in ‘E’ do:
i) Apply the rule togenerate the new state
Ii) If the new state is agoal state, quitand return this
state.
Iii) otherwiseadd the newstateat theend of
NODE_LIST.
8. Considerthe following State Space to be searched:
A
B
C
E
D H
F
G
Let A be thestartstateand G be the final orgoal state to be searched.
NODE_LIST={A} A is not goal node it isexpanded .
16. Depth First Search
Algorithm:
1) If initial state isa goal state, quitand return success.
2) Otherwisedo the following until successor failure is
reported:
a. Generate successor ‘E’ of the initial state. If thereare no
more successors signal failure.
b. Call Depth-First-Searchwith ‘E’ as he start state. If there
are no more successors then , signalfailure.
c. If success is obtained, return success, otherwisecontinue
in this loop.
27. Advantages of BFS:
1. BFS is a systematicsearch strategy- all nodesat level n are
considered before going to n+1 thlevel.
2. If anysolutionexists then BFS guarentees to find it.
3. If thereare many solutions , BFS will always find the
shortest pathsolution.
4. Nevergets trapped exploring a blind alley
Disadvantages of BFS:
1.
2.
All nodes are to be generated at any level. So even
unwanted nodes are to be remembered. Memory
wastage.
Timeand spacecomplexity is exponential type- Hurdle.
28. Advantages of DFS:
1. Memory requirements in DFS are lesscompared to BFS as
only nodeson thecurrent path are stored.
2. DFS may find a solutionwithoutexamining much of the
search space of all.
Disadvantages of BFS:
1. This search can goon deeperand deeper into the search
space and thus can get lost. This is referred to as blind
alley.