Tech moves fast! Stay ahead of the curve with Techopedia!
Join nearly 200,000 subscribers who receive actionable tech insights from Techopedia.
Hill climbing is a mathematical optimization heuristic method used for solving computationally challenging problems that have multiple solutions. It is an iterative method belonging to the local search family which starts with a random solution and then iteratively improves that solution one element at a time until it arrives at a more or less optimized solution.
Hill climbing is an optimization technique that is used to find a "local optimum" solution to a computational problem. It starts off with a solution that is very poor compared to the optimal solution and then iteratively improves from there. It does this by generating "neighbor" solutions which are relatively a step better than the current solution, picks the best and then repeats the process until it arrives at the most optimal solution because it can no longer find any improvements.
Hill climbing is done iteratively — it goes through an entire procedure and the final solution is stored. If a different iteration finds a better final solution, the stored solution or state is replaced. This is also called shotgun hill climbing, as it simply tries out different paths until it hits the best one, just like how a shotgun is inaccurate but may still hit its target because of the wide spread of projectiles. This works very well in many cases because at it turns out, it is better to spend CPU resources exploring different paths than carefully optimizing from an initial condition.