aarongarrett / inspyred

Python library for bio-inspired computational intelligence
MIT License
190 stars 57 forks source link

Support Gray Codes #12

Open markcoletti opened 6 years ago

markcoletti commented 6 years ago

Description

Inspyred supports a binary representation for individuals. However, binary-based mutation suffers from the Hamming Cliff problem in that flipping higher-order bits will have more impact than flipping lower-order bits. Fortunately, this is an old, well-known problem in the EC community. The typical solution is to encode binary numbers using Gray Codes¹. However, inspyred does not natively support encoding/decoding binary numbers using Gray Codes.

[1] R. A. Caruana and J. D. Schaffer, “Representation and Hidden Bias: Gray vs. Binary Coding for Genetic Algorithms,” in Machine Learning Proceedings 1988, J. Laird, Ed. San Francisco (CA): Morgan Kaufmann, 1988, pp. 153–161.

What I Did

Not applicable because this is a feature request.