Skip to content

Latest commit

 

History

History
24 lines (19 loc) · 1.26 KB

Hill-Climbing.md

File metadata and controls

24 lines (19 loc) · 1.26 KB

HILL-CLIMBING

AIMA4e

function HILL-CLIMBING(problem) returns a state that is a local maximum
currentproblem.INITIAL-STATE
loop do
   neighbor ← a highest-valued successor of current
   if VALUE(neighbour) ≤ VALUE(current) then return current
   currentneighbor


Figure 4.2 The hill-climbing search algorithm, which is the most basic local search technique. At each step the current node is replaced by the best neighbor.

AIMA3e

function HILL-CLIMBING(problem) returns a state that is a local maximum
current ← MAKE-NODE(problem.INITIAL-STATE)
loop do
   neighbor ← a highest-valued successor of current
   if neighbor.VALUE ≤ current.VALUE then return current.STATE
   currentneighbor


Figure ?? The hill-climbing search algorithm, which is the most basic local search technique. At each step the current node is replaced by the best neighbor; in this version, that means the neighbor with the highest VALUE, but if a heuristic cost estimate h is used, we would find the neighbor with the lowest h.