python - Chromosome representation for real numbers? -


i trying solve problem using genetic algorithms.

the problem find set of integral , real values optimizes function.

i need represent problem using binary string (simply because understand concept of crossover/mutation etc better when applied binary string chromosomes).

a candidate solution s set {i1, i2, ... in, r1, r2, rm }

where variables integers , r variables floating point numbers.

i want able transform candidate solution s binary string, don't know how encode floating point numbers.

any ideas on how encode set s chromosome?

although solution supposed language agnostic, prefered choice of language (in decreasing order of preference particular task) is:

python, c++, c

btw, coding problem using pyevolve

no, think binary representation wrong problem. basic data not binary, so, why use binary? mutation , crossover on real , integer numbers, not on binary representation.

simplest crossover: first parent: abcde a, b, ... floating points numbers, second parents mnopq. choose randomly d, first spring: abcdq, second: mnope.


Comments

Popular posts from this blog

silverlight - Applying a style to ItemContainerStyle in C# -

c# - NullReferenceException in MySqlClient.NativeDriver -

php - Updating recent updates - Problem in procedure - Any other approach? -