Skip to content
\n

I was not able to find a statement in the documentation, on how the mutation effects discrete genes.

\n

Are the genes mutated and then rounded to the next discrete value or is there any other mechanism?

\n

Is it furthermore possible, to define an individual mutation range for each gene similar to the gene_space attribute?

","upvoteCount":1,"answerCount":2,"acceptedAnswer":{"@type":"Answer","text":"

When gene_space is used, then mutation happens by replacing the gene value by a value randomly selected from the gene space. This happens for both int and float data types.

\n

Defining a mutation space is a good feature to be supported. Thanks for your suggestion.

","upvoteCount":1,"url":"https://github.com/ahmedfgad/GeneticAlgorithmPython/discussions/198#discussioncomment-5907414"}}}

How does the mutation operation work, when a discrete gene space is given? #198

Answered by ahmedfgad
TiMo3654 asked this question in Q&A
Discussion options

You must be logged in to vote

When gene_space is used, then mutation happens by replacing the gene value by a value randomly selected from the gene space. This happens for both int and float data types.

Defining a mutation space is a good feature to be supported. Thanks for your suggestion.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by TiMo3654
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question Further information is requested
2 participants