Created
September 30, 2015 00:45
-
-
Save Iron-Ham/b1b079c53f4f12f40455 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# schedule = mapping function from time to temperature | |
func SIMULATED_ANNEALING(problem, schedule) | |
current <- MAKE_NODE(problem.INITIAL_STATE) | |
for t = 1 to INF do | |
T <- schedule(t) | |
if T = 0 then return current | |
next <- randomly selected successor of current | |
deltaE <- next.VALUE - current.VALUE | |
if deltaE > 0 then current <- next | |
else current <- next only with probability e^(deltaE/T) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment