Re:Using Simulated Annealing to Solve Logic Puzzles
by ChronosKey on Monday July 18, 2016 @12:55PM
(#12116303)
Hi, author here:
Yep, this is the sort of thing we study in our cooperative and adaptive algorithms class. Similar techniques to what you suggest are shown here https://books.google.ca/books?id=G5ML5EYch94C&pg=PA88&lpg=PA...
Re:Using Simulated Annealing to Solve Logic Puzzles
by klausnrooster on Sunday July 31, 2016 @11:30PM
(#12200049)
Looks neat but I gave up on it converging on my new laptop. I'm going to port it to rebol2. This bit confuses me:
random.choice(range(0, i) + range(i+1, 4))
how is that different from random.choice(range(0, 4))?
Obviously no Pythonista, but playing around in the REPL I see no diff.
Re:Using Simulated Annealing to Solve Logic Puzzles
by klausnrooster on Monday August 01, 2016 @09:16PM
(#12207249)
Duh. Where is the button that reverses the passage of time?
Re:Using Simulated Annealing to Solve Logic Puzzles
by murbard2 on Monday July 18, 2016 @09:44PM
(#12119029)
This has the advantage of working as a sampling strategy, not just an optimization strategy. It is useful when the mass of your distribution is concentrated in a region that may be hard to find with a random walk.
https://en.wikipedia.org/wiki/Parallel_tempering
Markov-chain Monte-Carlo sampling gives a theoretical underpinning which explains why simulated annealing works in optimization.
Re:Using Simulated Annealing to Solve Logic Puzzles
by tekromancr on Monday July 18, 2016 @12:53PM
(#12116293)
That's actually pretty brilliant. I haven't ever heard of metropolis coupling before, but I can see how it would break the algo out of a local minimum.
Also, klaatu barada nikto.
I once messed with something called "metropolis coupling", where you run multiple threads in parallel, with different thresholds for how often they accept worse solutions, i.e. one thread is "cold", one is slightly "hotter", and so on. If a hot thread's current solution is better than the solution of the neighbouring colder thread, the solutions are swapped. In this way the coldest thread (which is the one we're paying attention to) gets pulled out of the local minimum.
As I say, I messed with this once and it did seem to help. It seems to have been developed for inference in evolutionary phylogenetics, and is perhaps a bit obscure?