A stopping criterion determines when an iterative algorithm should stop. It can mark task completion, recognize an adequate solution, limit computation, or detect stalled improvement. section 1.4.1 section 7.3
Common stopping criteria include:
- Reaching a defined goal, such as picking up a defective workpiece, placing it in a waste box, and returning the robot to its home position. section 1.4.1
- Completing a maximum number of iterations, generations, fitness evaluations, or moves. section 6.3 section 7.3
- Reaching a satisfactory fitness level or adequate solution threshold. section 7.3 section 9.1
- Stopping after a specified period without improvement, or when memory and time constraints are reached. section 6.3 section 7.3
Adding a solution-quality stop to tabu search
A 7-queens tabu search may stop after 2,000 iterations or 50 moves without improvement. It can also terminate immediately when the number of attacks reaches zero, indicating a valid solution. section 6.3
Algorithm 7.1 Genetic algorithm
Initialization: Randomly generate an initial population M(0)
Evaluate all individuals: Compute and save the fitness f(m) for each individual in the current population M(t)
While termination criteria are not met
Select parents: Define selection probabilities p(m)for each individual p in M(t)
Apply crossover: Generate M(t+1) by probabilistically selecting individuals from M(t) to produce offspring via genetic operators
Apply mutation: Introduce random changes to individuals
Evaluate: evaluate the fitness of the new individuals
Select survivors: select individuals to form the next generation
Use the genetic algorithm pseudocode to locate the stopping condition around initialization, evaluation, reproduction, mutation, and survivor selection. section 7.3










