Questions tagged [hill-climbing]

Hill climbing is a mathematical optimization technique which belongs to the family of local search. It is an iterative algorithm that starts with an arbitrary solution to a problem, then attempts to find a better solution by incrementally changing a single element of the solution. If the change produces a better solution, an incremental change is made to the new solution, repeating until no further improvements can be found.

Hill climbing is a mathematical optimization technique which belongs to the family of local search. It is an iterative algorithm that starts with an arbitrary solution to a problem, then attempts to find a better solution by incrementally changing a single element of the solution. If the change produces a better solution, an incremental change is made to the new solution, repeating until no further improvements can be found.

For example, hill climbing can be applied to the travelling salesman problem. It is easy to find an initial solution that visits all the cities but will be very poor compared to the optimal solution. The algorithm starts with such a solution and makes small improvements to it, such as switching the order in which two cities are visited. Eventually, a much shorter route is likely to be obtained.

Hill climbing is good for finding a local optimum (a solution that cannot be improved by considering a neighbouring configuration) but it is not guaranteed to find the best possible solution (the global optimum) out of all possible solutions (the search space). The characteristic that only local optima are guaranteed can be cured by using restarts (repeated local search), or more complex schemes based on iterations, like iterated local search, on memory, like reactive search optimization and tabu search, on memory-less stochastic modifications, like simulated annealing.

The relative simplicity of the algorithm makes it a popular first choice amongst optimizing algorithms. It is used widely in artificial intelligence, for reaching a goal state from a starting node. Choice of next node and starting node can be varied to give a list of related algorithms. Although more advanced algorithms such as simulated annealing or tabu search may give better results, in some situations hill climbing works just as well. Hill climbing can often produce a better result than other algorithms when the amount of time available to perform a search is limited, such as with real-time systems. It is an anytime algorithm: it can return a valid solution even if it's interrupted at any time before it ends.

Source: Wikipedia(Hill Climbing)

70 questions
0
votes
0 answers

Hill climbing search algorithm stopping criteria for job assignment

Let's say there are 10 jobs and 15 workers. The objective is to assign jobs to workers which could satisfy the jobs’ requirement and minimizing total job processing time. For each iteration, a job is selected randomly and assigned to worker with…
0
votes
1 answer

Scheme - Solving NQueens using hill-climbing/min-conflict method

I'm trying to solve the N-Queens problem in Scheme by randomly populating the board with queens such that no two queens are on the same row or column, then moving queens within their column to the row that is being attacked by the fewest number of…
Christian Baker
  • 375
  • 2
  • 7
  • 22
0
votes
1 answer

Late Acceptance Hill Climbing Algorithm

I am writing code to address the Nurse Restoring Problem I have implemented Simulated Annealing and I am interested in comparing the results to Late Acceptance Hill Climbing I have found some pseudo code for Late Acceptance but need a little help to…
0
votes
0 answers

Simple 1D Continuous Space Hill Climbing Algorithm

I am searching for a simple hill climbing Algorithm It is for a large scale simulation, This is an example of how the "CurrentLocation" is changing. import time targ = 1.5 # target of t location = 1 #starting point step = 0.9 # step change…
Oren
  • 4,711
  • 4
  • 37
  • 63
0
votes
1 answer

Can I implement robot path planning using hill climbing algorithm?

I want to implement the robot path planning program applying hill climbing algorithm. I understand the basic of hill climbing algorithm but I cannot think any idea! I also Googled the hill climbing algorithm, but I cannot find any information about…
0
votes
2 answers

Search space data

I was wondering if anyone knew of a source which provides 2D model search spaces to test a GA against. I believe i read a while ago that there are a bunch of standard search spaces which are typically used when evaluating these type of…
Hans Rudel
  • 3,433
  • 5
  • 39
  • 62
-2
votes
1 answer

Not printing same output

Simply not printing the same output as the line above and I can't figure out why this is happening, I've noticed that it's printing the last N numbers from the end backwards, whatever i input into the parameter it prints that amount a second…
Galfi
  • 1
  • 4
-3
votes
1 answer

How to speed up an algorithm that try to decide which Node go to which Nodelist so it ended up with a best score in hill climbing algorithm

Assume you have written a hill climbing algorithm which is very slow. Your smallest data unit is a Node. You have another class called NodeList which contains a list of Nodes plus some other data. You have a list of NodeLists, and their number or…
-3
votes
1 answer

How do I optimize parameters in my code?

I have some code written in c++ that simulates a prefetcher for a CPU. In the code I have some definitions that look like this #define x 5 ... for(int i = 0; i < x; i++) ... At the end of the simulation the simulator outputs the average access…
-3
votes
1 answer

Hill climbing in 7D space

I have below function in 7D space (means x=(x1,x2,x3,x4,x5,x6,x7)) and I want find the minimum point of this function with hill climbing in matlab. I found this link useful but I don't know how can I implement my function in Matlab. Update: I…
Yuseferi
  • 7,931
  • 11
  • 67
  • 103
1 2 3 4
5