Created
May 8, 2018 22:44
-
-
Save dcbark01/9643f0a6ae5b3b1dd8ce35a0048b0ca0 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# Pseudocode for Simulated Annealing Algorithm | |
while t_new > stopping temp: | |
for number of runs at each temp: | |
x_new, y_new = random neighboring value of x_old, y_old | |
calculate the cost c_new of this neighboring solution | |
if c_new β c_old >= 0: | |
This is a better solution, so move to it | |
else: | |
Calculate the probability of moving to the new worse solution | |
Probability moving = π^((π_πππ€ β π_πππ)/π‘_πππ€ ) | |
t_new = t_new * cooling_rate |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment