I am using genetic algorithm to optimize something and the binary code is used for encoding variables.
When the varibles represented a sequence of binary numbers were decoded as its corresponding values, the error (ValueError: invalid literal for int() with base 2: '1.0'
was return)
Specifically,
child = 1.0
V = int(child,2)
ValueError: invalid literal for int() with base 2: '1.0'
Could you please give me some clues how to fix this error?