Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Binary encoding in Pygad#302

Answeredbyahmedfgad
smkhalid asked this question inQ&A
Discussion options

I am currently working with Genetic Algorithm based optimization and using the Pygad library to execute genetic operation.
I am working with floating point numbers as my input variables. My plan is to use 8 bit binary representation of the floating number (input variable) in genetic operation as it will allow more stable change in the chromosome after a crossover and mutation operation. I have found a very nice blog written by you on "Paperspace" about the use of binary numbers in PyGad. Unfortunately, this process works with integer number by restrict the gene space between 0 to 1 rather than actually working with binary representation. Both the chromosome and gene are considered one single entity in the process described above, where my goal is to have 8 gene for each chromosome.
Is it possible in current PyGad version to represent floating number to 8 bit binary and execute the genetic operation instead of converting the floating number to integer and restricting the gene space from 0 to 1?

Thank you very much for the magnificent library for genetic operation.

You must be logged in to vote

This is not supported yet. You have to add extra code to do the float-to-binary and binary-to-float conversion.

Replies: 1 comment

Comment options

This is not supported yet. You have to add extra code to do the float-to-binary and binary-to-float conversion.

You must be logged in to vote
0 replies
Answer selected bysmkhalid
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Category
Q&A
Labels
questionFurther information is requested
2 participants
@smkhalid@ahmedfgad

[8]ページ先頭

©2009-2025 Movatter.jp