Skip to content

Get parents from population

Martin Vyšňovský edited this page Mar 16, 2014 · 2 revisions

You can select parents from population using method getParents of EAPopulation object.

var parents = population.getParents(method, number_of_parents, options);

Parameters:

method

Method to use. Available options:

  • random Randomly select parents from population.
  • best Select best parents from population.
  • roulette Uses roulette method for selecting parents. You can select roulette method using rouletteMethod variable of options argument. Available roulette methods are:
  • with_replacement
  • without_replacement
  • remainder_with_replacement
  • remainder_without_replacement
  • univerzal

number_of_parents

Number of parents you want to select.

options

This argument is used only for some methods. See description for methods.

Clone this wiki locally