-
Notifications
You must be signed in to change notification settings - Fork 92
Selection
The selection process is a key step in Evolutionary Algorithms. Selection drives the search process towards specific areas of the search space. The selection process operates on a population of individuals, and produces a population of "parents". These parents are then traditionally used by variation operators (detailed in the next section).
The linear genome mapping process in Grammatical Evolution can generate "invalid" individuals. Only valid individuals are selected by default in PonyGE2, however this can be changed with the argument:
--invalid_selection
or by setting the parameter INVALID_SELECTION
to True
in either a parameters file or in the params dictionary.
Tournament selection selects TOURNAMENT_SIZE
individuals from the overall population, sorts them, and then returns the single individual with the best fitness. Since no individuals are removed from the original population, it is possible that the same individuals may be selected multiple times to appear in multiple tournaments, although the same individual may not appear multiple times in the same tournament.
Activate with:
--selection tournament
or by setting the parameter SELECTION
to tournament
in either a parameters file or in the params dictionary.
Tournament size is set by default at 2. This value can be changed with the argument:
--tournament_size [INT]
or by setting the parameter TOURNAMENT_SIZE
to [INT]
in either a parameters file or in the params dictionary, where [INT]
is an integer which specifies the tournament size.
Truncation selection takes an entire population, sorts it, and returns the best SELECTION_PROPORTION
of that population.
Activate with:
--selection truncation
or by setting the parameter SELECTION
to truncation
in either a parameters file or in the params dictionary.
Selection proportion is set by default at 0.5 (i.e. return the top 50% of the population). This value can be changed with the argument:
--selection_proportion [NUM]
or by setting the parameter SELECTION_PROPORTION
to [NUM]
in either a parameters file or in the params dictionary, where [NUM]
is a float between 0 and 1.
NOTE that unless the specified SELECTION_PROPORTION
is 1.0 (i.e. 100%), truncation selection necessarily returns a selected parent population that is smaller in size than the original population.