A pseudo-random number generator produces a deterministic sequence that appears random. In population-based metaheuristics, it samples candidate solutions across the search space to support exploration. section 7.1
Use pseudo-random initialization when you need inexpensive variation:
- It provides moderate diversity at low computational cost, but usually produces low-quality initial solutions. section 7.1
- Compare it with quasi-random sampling for higher diversity or heuristics for higher-quality, less diverse starting solutions. section 7.1
Generate a reproducible population
In Python, set a seed with np.random.seed(6345245), choose N=200, and generate a 200-by-200 array with np.random.rand(N,N). The seed makes the sequence deterministic while preserving its random-looking sampling behavior. section 7.1
Listing 7.1 Generating initial populations in Python
import math import numpy as np import matplotlib.pyplot as plt np.random.seed(6345245) #1 N=200 #2 P_random_pseudo=np.random.rand(N,N) #3
Inspect the Python listing for seeded pseudo-random population generation, then compare its sampling pattern with alternative methods. section 7.1









