Presentation is loading. Please wait.

Presentation is loading. Please wait.

ALGORITHMS.

Similar presentations


Presentation on theme: "ALGORITHMS."— Presentation transcript:

1 ALGORITHMS

2 Hill Climbing Algorithm
function hill­climbing(node) node = select­random­node; loop if (node is goal) then return(node); successors = generate­successors(node); best­successor = select­best­node(successors); if (value(best­successor) < value(node)) then return(node); node = best­successor; end loop

3 SA Algorithm Schedule, a mapping from time to temperature
Function SIMULATED-ANNEALING(Problem, Schedule) returns a solution state Inputs: Problem, a problem Schedule, a mapping from time to temperature Local Variables : Current, a node Next, a node T, a “temperature” controlling the probability of downward steps Current = MAKE-NODE(INITIAL-STATE[Problem])

4 SA Algorithm For t = 1 to  do T = Schedule[t]
If T = 0 then return Current Next = a randomly selected successor of Current E = VALUE[Next] – VALUE[Current] if E > 0 then Current = Next else Current = Next only with probability exp(-E/T)

5 Simulated Annealing


Download ppt "ALGORITHMS."

Similar presentations


Ads by Google