CNL Stat : Data Mining : ga_decode
ga_decode
Decodes an individual’s chromosome into its binary, nominal, integer and real phenotypes.
Synopsis
#include <imsls.h>
void imsls_f_ga_decode(Imsls_f_individual *individual)
The type double function is imsls_d_ga_decode.
Required Arguments
Imsls_f_individual *individual (Input/Output)
An existing individual that will have its chromosome information decoded.
Description
Normally decoding is required after crossover or mutation. By default, if imsls_f_genetic_algorithm is used, mutation, crossover and decoding is done automatically. If a custom genetic algorithm is being written to replace imsls_f_genetic_algorithm, then imsls_f_ga_decode can be used within the fitness function prior to fitness calculations.
Binary and nominal phenotypes are copied directly from their chromosome values. Integer and real phenotypes are encoded as binary bits using either Gray or Base-2 encoding. This function decodes those bits into their integer or real representations using the Gray or Base-2 encoding specification contained in the individual’s chromosome.