Definition of individual class with decimal encoding.
Individual with decimal encoding.
- ranges (tuple list) – value ranges for all entries in solution.
- eps (float or float list (with the same length with ranges)) – decrete precisions for binary encoding, default is 0.001.
Clone a new individual from current one.
Decode gene sequence to decimal solution
Encode solution to gene sequence
Initialize the individual by providing chromsome or solution.
- chromsome (list of (float / int)) – chromesome sequence for the individual
- solution (list of float) – the variable vector of the target function.
If both chromsome and solution are provided, only the chromsome would be used. If neither is provided, individual would be initialized randomly.