Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in acceptance probability? #3

Open
mattiasflodin opened this issue Jul 23, 2018 · 0 comments
Open

Error in acceptance probability? #3

mattiasflodin opened this issue Jul 23, 2018 · 0 comments

Comments

@mattiasflodin
Copy link

Hi,

Are you missing a call to exp() in your acceptance probability function? In the original description by Kirkpatrick et al, (-de / temperature).exp() would be used. In your code, at line 108 of solver.rs, you check whether a random number in range [0, 1) is smaller than -de / temperature. But since we know both de and temperature are positive, -de / temperature must be a negative number and hence the random positive number can never be smaller. In other words, it seems your annealing schedule will never allow the energy to increase.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant