Hide Comments
Hide Comments

Comments (0)

Specifies the initial number of individuals to make in the  Population before attempting to solve your solution. Use this property to quickly and easily define the population size. The InitialPopulation property specifies the minimum initial population.

alert_noteTip

Your population size has a substantial bearing on whether the genetic component can find a solution, too small a population may be unable to evolve towards a solution, too large a population wastes processing power.

Namespace: RSGeneticBase

expandingSyntax

Delphi

public
  property InitialPopulation: Integer read FInitialPopulation write SetInitialPopulation default DEFAULT_INIT_POPULATION;
 

Property Value

Type: Integer

expandingExamples

Set InitialPopulation to a positive integer value. For the 8-queens problem, a good initial population is 4 times the number of queens in the problem, e.g., 32 individuals:

Delphi

begin
   RSGeneticAlgorithm1.InitialPopulation := 32;
 end;

expandingSee Also

Comments (0)