Over to You
You used simple hill climbing to get your turtle to the bottom of the bag. He moves left or right, provided such a point is at least as good as the current spot. He gets to the bottom of the bag, provided you use the right step size, get lucky with the starting point, and you don’t crumple up the bag too much. You then moved on to simulated annealing, allowing you to hit things with a (virtual) hammer until they work. The algorithms are similar, both considering a left or right step. However, SA will try a random, perhaps worse point, once in a while. As with many of the algorithms you’ve seen in this book, trying something random can help you solve problems. As the systems cool, random jumps become less likely.
You can try various ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access