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
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
5. Decisions
Here are two ways to make decisions.
Global decisions: Global decisions have global consequences and need to be made early in the design stage. Making good global decisions lowers overall cost and increases effectiveness. Poor global decisions have the opposite effect.
Local decisions. Local decisions are often called a greedy strategy in that the optimum decision at a local level, when scaled up, does not always result in an optimum effect at a global level.
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.
Eager strategy - do it now in case it is needed - JIC (Just In Case) strategy.
Lazy strategy - delay until just when it is needed - JIT (Just In Time) strategy.
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