Skip to main content
. 2024 Nov 15;14:28232. doi: 10.1038/s41598-024-79141-4

Table 3.

Flash Hill-climbing algorithm.

Flash Hill-Climbing algorithm

1. Initialise multiple climbers positions

x1, y1 = random(X, Y); x2, y2 = random(X, Y);…; xn, yn =random(X, Y)

2. Find locations around each point that can be moved:

if G(temp_x, temp_y) = = 0 and 0 ≤ temp_x ≤ X and 0 ≤ temp_y ≤ Y

3. Calculate the highest position among the movable points around the climber and move over it

xn, yn = arg max(f(xn, yn), f(temp_x, temp_y))

G(xn, yn) = 1

4. If there are no moving points in the vicinity, or if there are no higher points, the position of the point is reset.

xn, yn = random(X, Y) and G(xn, yn) = = 0

5. Repeat 2 ~ 4 steps to a certain number of steps or to reach the set accuracy