CORE-13: Artificial Intelligence (Unit-2) Problem Solving and Searching Techniques
CORE-13: Artificial Intelligence (Unit-2) Problem Solving and Searching Techniques
Bidirectional search
Features of Hill Climbing: Following are some of the main features of Hill Climbing
Algorithm:
Generate and Test variant: Hill Climbing is the variant of Generate and Test
method. The Generate and Test method produce feedback which helps to
decide which direction to move in the search space.
Greedy approach: Hill-climbing algorithm search moves in the direction which
optimizes the cost.
No backtracking: It does not back-track the search space, as it does not
remember the previous states.
Generate and Test: We generate one by one all possible complete variable
assignments and for each we test if it satisfies all constraints. The corresponding
program structure is very simple, just nested loops, one per variable. In the
innermost loop we test each constraint.
Backtracking: We order the variables in some fashion, trying to place first the
variables that are more highly constrained or with smaller ranges. This order has a
great impact on the efficiency of solution algorithms and is examined elsewhere. We
start assigning values to variables. We check constraint satisfaction at the earliest
possible time and extend an assignment if the constraints involving the currently
bound variables are satisfied.
The main condition for alpha-beta pruning is that if α ≥ β at any node then the
right branch of that node is pruned.
Step 7: Node F returns the node value 1 to node C, at C α= 3 and β= +∞, here the
value of beta will be changed, it will compare with 1 so min (∞, 1) = 1. Now at C, α=3
and β= 1, and again it satisfies the condition α>=β, so the next child of C which is G
will be pruned, and the algorithm will not compute the entire sub-tree G.
Time Complexity: The worst case time complexity of alpha-beta pruning is O(bd).
But the best and average case time complexity is O(bd/2).