9.4 Gene and Population Classes

Gene is in Antares system implemented in the class TGen. Each instance of this class contains an array of bits and the fitness value. The bit array encodes a solution candidate, which this gene represents. The TGen class contains methods for bit array and fitness value maintenance. For details see Reference Manual. The gene's fitness value is not computed after each change of the bit array, because the fitness evaluation can be time-consuming. Instead the gene object has a special flag (TGen::dirty), which specifies whether the fitness value is valid. The fitness value is refreshed only when needed during the computation.

Population is implemented in the class TPopulation. Each population object contains a set of gene objects. This class implements various methods for maintaining the set of genes i.e. method enabling to insert and delete a gene or to move or copy a gene from another population object. The population object is able to save its contents to a parameter file (method SaveToParamFile()) and to initialize itself from a parameter file (method LoadFromParamFile()). The format is specified in section Result And Initialization Interface.

Programmer's Guide Project Antares