Simulated annealing: Difference between revisions

Content added Content deleted
(→‎{{header|J}}: added zkl)
m (fixed typo)
Line 55: Line 55:


For k = 0 to kmax by step kmax/10 , display k, T, E(s). Display the final state s_final, and E(s_final).
For k = 0 to kmax by step kmax/10 , display k, T, E(s). Display the final state s_final, and E(s_final).

You will see that the Energy may grow to a local optimum, before decreasing to a global optimum.


'''Illustrated example'''
'''Illustrated example'''
Line 68: Line 70:
k: 200000 T: 0.8 Es: 178.1723
k: 200000 T: 0.8 Es: 178.1723
k: 300000 T: 0.7 Es: 154.7069
k: 300000 T: 0.7 Es: 154.7069
k: 400000 T: 0.6 Es: 148.1412
k: 400000 T: 0.6 Es: 158.1412 <== local optimum
k: 500000 T: 0.5 Es: 133.856
k: 500000 T: 0.5 Es: 133.856
k: 600000 T: 0.4 Es: 129.5684
k: 600000 T: 0.4 Es: 129.5684