Send Close Add comments: (status displays here)
Got it!  This site "robinsnyder.com" uses cookies. You consent to this by clicking on "Got it!" or by continuing to use this website.  Note: This appears on each machine/browser from which this site is accessed.
Hill climbing algorithms
by RS  admin@robinsnyder.com : 1024 x 640


1. Hill climbing algorithms
Many algorithms can be described as hill-climbing algorithms.

That is, they go from some point in solution space to a "better" point in solution space by "hill climbing".

That is, based on the slope of a change, the algorithm takes the change that would increase (or decrease) some objective function.

2. Python program
Here is the Python code [#1]


3. Text output
Here is the output of the Python code.


4. Image output
Hill climbing

5. Decisions
Here are two ways to make decisions.

6. Greedy
A "greedy" algorithm is an algorithm that always takes the best local approach to improving a solution.

Whenever a greedy algorithm works, it usually works well.

However, "hill climbing" algorithms may not work so well with a greedy approach as they may get stuck on a "local" hill and not find a "global" optimum solution.

7. Eager and lazy
This greedy approach as is often in algorithms should not be confused with lazy and eager approaches.

8. Dissertation thesis
Aside: My Ph.D. dissertation was Issues in the implementation of lazy functional languages (1990), and which was intimately involved with the ideas of copy-update problems, sharing properties, and eager and lazy evaluation in both sequential and parallel modes of execution for functional languages.

9. Randomization
Back to the problem of a greedy strategy not yielding an optimal global solution.

In many cases, some form of randomization helps in avoiding local minimum (or maximum) solutions.

10. End of page

by RS  admin@robinsnyder.com : 1024 x 640