GeneticAlgoithm
Implementation of the genetic algorithm
Functions
Macro testParentSelection

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...
 

Detailed Description

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:

Parent selection probability as function of parent's rank.
Test Parent Selection.

Function Documentation

◆ testParentSelection()

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.