Solution representation
A fundamental step is encoding or representing the solution. A solution/chromosome may be encoded as a binary string, integer-valued array, floating-point array, or a permutation of a fixed set of elements. For example:
• the solution of a feature selection problem may be encoded as a binary string where each gene will indicate whether a feature is selected or not;
• the solution of the following fitness function will be encoded as an integer array if x1 and x2 are discrete variables;
• the solution of the above fitness function will be encoded as a floating-point array if x1 and x2 are continuous variables;
• the solution of Travelling Salesman Problem (TSP) will be encoded as a set permutation;