GA_DECODE Function
Decodes an individual’s chromosome into its binary, nominal, integer and real phenotypes.
Usage
result = GA_DECODE(individual)
Input Parameters
individual—An existing individual that will have its chromosome information decoded.
Returned Value
result—The GA_DECODE function returns the decoded data structure.
Input Keywords
Double—If present and nonzero, then double precision is used.
Discussion
Normally decoding is required after crossover or mutation. By default, if GENETIC_ALGORITHM Function is used, mutation, crossover and decoding is done automatically. If a custom genetic algorithm is being written to replace GENETIC_ALGORITHM, then 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.