Next: About this document
CODING FOR GENETIC ALGORITHMS
Sushil J. Louis
Computer Science Department
University of Nevada, Reno
Binary encodings, One parameter
- Example:
-
- In the range [0 .. 31]
-
- Easy
- In the range [0 .. 50]
- How do you do this?
One parameter
- In general: X ranges from
- How many bits do you need?
-
-
-
-
-
-
- How do you decode?
-
-
- b bit string needs to be converted to a number between and
- b bit string defines distinct values
-
-
- b bit string decodes to val
- Decoded value:
-
-
One parameter
- In general: X ranges from
- How many bits do you need?
-
-
-
-
-
- Mapping [... ] to
- What is the precision?
- Precision is
-
-
- 0000..00 =
- 0000..01 = + precision
- 0000..10 = + precision * 2
Example:
- X = [0...6]
- Needs 3 bits at least
- 011 = ?
-
- 100 = ?
-
- 000 = ?
-
- 111 = ?
-
Encoding Many Parameters
- Suppose we have n parameters
-
-
-
- Encode each parameter in a binary string
- Concatenate encoded parameters to form a chromosome
-
-
-
-
-
-
Decoding Many Parameters
- Decode each parameter
- Calculate function value
Sushil J. Louis
Wed Apr 3 18:19:05 PST 1996