GeneticAlgoithm
Implementation of the genetic algorithm
|
Test Parent rank-based selection. More...
Functions | |
void | selectParents (TRandom3 *random, int &p1, int &p2, int N) |
Implements the parent selection criteria. | |
void | testParentSelection () |
Tests the parent selection criteria. More... | |
Test Parent rank-based selection.
Objective: test the algorithm to select parents based on the ranking. The probability to be selected should show a linear dependence on the rank.
To run this macro using ROOT:
root -l testParentSelection.C+
Output example:
![]() |
void testParentSelection | ( | ) |
Tests the parent selection criteria.
Run a toy simulation and measure the selection probability as function of the rank.
Definition at line 56 of file testParentSelection.C.