It is an iterative algorithm that starts with an arbitrary solution to a problem and attempts to find a better solution by changing a single element of the solution incrementally. If the change produces a better solution, an incremental change is taken as a new solution. This process is repeated until there are no further improvements.
function Hill-Climbing (problem), returns a state that is a local maximum.
inputs: problem, a problem
local variables: current, a node
neighbor, a node
current ←Make_Node(Initial-State[problem])
loop
do neighbor ← a highest_valued successor of current
if Value[neighbor] ≤ Value[current] then
return State[current]
current ← neighbor
end
Disadvantage: This algorithm is neither complete, nor optimal.
Latest posts by FreelancingGig (see all)
- Brand strategy: secrets that are not shared - February 2, 2024
- Crafting Visual Narratives: The Role of Motion Graphic Design in Digital Storytelling - January 23, 2024
- Unleashing Insights: Navigating the World of Data Science for Informed Decision-Making - January 23, 2024