Cons of Hill Climbing:
Pros of Hill Climbing:
Run algorithm for a Maximum number of iterations m
Variants of Hill climbing can sort out getting stuck on local maxima/ plateaus
Variants of Hill Climbing:
Stochastic Hill Climbing :
First - Choice Hill Climbing
-Randomly generates a single SUCCESSOR neighbour solution & moves to it if it’s better than current solution
Random - Restart Hill Climbing:
What is the only Complete variant of Hill Climbing?
Random - Restart Hill Climbing
It generates a solution if one exists, as eventually random start solution will be OPTIMAL SOLUTION
Pros of Simulating Annealing:
Cons of Simulating Annealing:
Formulating Optimisation Problems:
min / max f(x) => min/max objective functions
s.t g_i(x) <= 0, i = 1,…,m
h_i(x) <= 0, i = 1,…,n => Feasibility Constraint
==> x is the DESIGN VARAIBLE (can be anything)
SEARCH SPACE is space of all possible x values
What is Search Space of a Problem:
is the space of all possible x values ALLOWED by constraints in CANDIDATE SOLUTIONS
Define Explicit Constraint:
Explicitly mentioned
CANNOT BE ASSUMED
Define Implicit Constraint:
Rules that must be in place by the problem definitions in order for solutions to be CONSIDERED FEASIBLE
e.g: x,y > 0
Define A*:
Heuristic path finding algorithm & most used example of Informed Search
What is the Evaluation Function:
f(n) = g(n) + h(n)
g(n) cost to reach node n
h(heuristic from node n to goal)
It determines which node to expand next
Steps of A*:
BASIC
1) Expand the shallowest node in frontier with SMALLEST EVALUATION FUNCTION
2) Node is in the list of visited nodes, DON’T ADD TO FRONTIER
3) Stop when a GOAL node is visited
(KEEP EXPANDING OTHERWISE)
What is the Final Cost of A*?
Sum of g(n) along the paths
Dijkstra’s:
what is h(n)?
Euclidean Distance from each node to destination
Heuristics measure of cost as if a node is physically closer to destination
Good Assumption the cost to the destination will be lower
Pros & Cons of A* :
Pros:
- Doesn’t go through all nodes
Cons:
- Can lead to non-optimal paths (UNLIKELY)
Uninformed Search ?
Define the set of strategies having no additional information about the State Space beyond what is give during Problem formulation
What does Uninformed Search do?
-Only generates successors
-Distinguish a goal state from a non goal-state
What is Breadth First Search ?
-An Uninformed Searching Strategy
FRONTIER NODES ARE EXPANDED LAYER BY LAYER
Expanding shallowest unexpanded node in frontier
Similar to a QUEUE (FIFO)
Steps for BFS?
-Root node is expanded
- Then the successors of the root
- Repeatedly expand all the successors of the all children, till goal node reached