Lec 3 | Optimization Flashcards
It is choosing the best option from a set of possible options
Optimization
It is a search algorithm that maintains a single node and searches by moving to a neighboring node. It is interested in finding the best answer to a question.
Local Search
Will local search give an optimal answer?
Local search will bring to an answer that is not optimal but “good enough”.
Although local search algorithms don’t always give the best possible solution, they can often give a good enough solution in situations where considering every possible state is computationally infeasible.
It is a function that we use to maximize the value of the solution.
Objective Function
It is a function that we use to minimize the cost of the solution
Cost Function
It is the state that is currently being considered by the function.
Current State
It is a state that the current state can transition to.
Neighbor State
How do local search algorithms work?
Local search algorithm work is by considering one node in a current state, and then moving the node to one of the current state’s neighbors.
It is one type of a local search algorithm. Where neighbor states are compared to the current state, and if any of them is better, we change the current node from the current state to that neighbor state.
Hill Climbing
What is the pseudocode for Hill Climbing?
function Hill-Climb(problem): current = initial state of problem repeat: neighbor = best valued neighbor of current if neighbor not better than current: return current current = neighbor
It is short-sighted, often settling for solutions that are better than some others, but not necessarily the best of all possible solutions.
hill climbing algorithm
It is a state that has a higher value than its neighboring states
Local Maximum/Maxima
It is a state that has the highest value of all states in the state-space.
Global Maximum
It is a state that has a lower value than its neighboring states.
Local Minimum/Minima
It is a state that has the lowest value of all states in the state-space.
Global Minimum
where multiple states of equal value are adjacent, forming a plateau whose neighbors have a worse value
Flat local maximum/minimum
where multiple states of equal value are adjacent and the neighbors of the plateau can be both better and worse.
shoulder
What is the problem when using the hill climbing algorithm?
The problem with hill climbing algorithms is that they may end up in local minima and maxima. What all variations of the algorithm have in common is that, no matter the strategy, each one still has the potential of ending up in local minima and maxima and no means to continue optimizing.
What are the Hill Climbing Variants?
Steepest-ascent, Stochastic, First-choice, random-restart, and Local Beam Search