GeneticAlgorithmPython icon indicating copy to clipboard operation
GeneticAlgorithmPython copied to clipboard

encoding process

Open mf093087 opened this issue 4 years ago • 1 comments

I am a beginner in programming. May I ask, does this package have encoding and decoding process? For example, binary encoding. where can I see this?

mf093087 avatar Dec 30 '21 21:12 mf093087

The project supports both decimal and binary encoding. But it does not convert one encoding to another. That is a decimal gene will not be encoded in binary and then decoded back to decimal.

To use binary encoding, simply set gene_space=[0, 1] in the constructor of the pygad.GA class.

To know about how to use different representations in PyGAD, please check this article: https://blog.paperspace.com/working-with-different-genetic-algorithm-representations-python

ahmedfgad avatar Jan 01 '22 17:01 ahmedfgad