Initialization

Population initialization methods generate the starting set of candidate solutions for the genetic algorithm, ensuring diversity and a suitable search space for optimization.

GeneticAlgorithms.RealUniformInitializationType
RealUniformInitialization(population_size::Int64, chromosome_size::Int64, interval::Tuple{T,T})

RealUniformInitialization(population_size::Int64, chromosome_size::Int64, intervals::Vector{Tuple{T,T}})

Creates a population of population_size including chromosomes of chromosome_size. The chromosome-values are drawn from a uniform distribution over interval. In the second constructor, the intervals vector specifies the interval for each gene. The current implementation supports Float64 and Integer types. The type is determined by the interval. The struct must be called to create a population.

source
GeneticAlgorithms.SudokuInitializationType
SudokuInitialization(population_size::Int64, initial::Vector{Vector{Int64}})

Creates a population of population_size including chromosomes of 9x9 size. Each gene resembles a column in a Sudoku puzzle. The initial values are taken from the initial grid. initial must be of size 9x9. The remaining values are filled with the missing random values. The initialization ensure that each column contains the values 1-9 exactly once.

source