-
-
Notifications
You must be signed in to change notification settings - Fork 462
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gene_space with condition between genes #37
Comments
Hi @GregBueno, Thank you 👍 Please note that I tried to cover as many general cases as possible in PyGAD. For your request, this is not supported but you can do it with little efforts. One way is to restrict the values of the 2 genes between 0 and 1: If you want to use the full range
Here is an example:
I hope you can find any of these options helpful. Please let me know if I can help in any way. |
Saw this issue and I'm in a similar boat, although with a different twist. So it's safe to assume that the In my situation, I'm using 2 genes that represent a range of numbers, and that range must be incremented up, not down. So for example, if the first gene is 50, than the second gene must be greater than 50, so that my effective range ends up being something like 50 and 100, it can't be 50 and 30, type thing. So I could work in some logic to tweak the genes that need tweaking in I guess too, how would one work in the THANKS! Great work! UPDATE I think I may have answered my own question here. What I plan to do is:
I'm going to work on this this weekend as I'm still a bit unclear as to HOW I'm going to do this, but I have an idea or two. Thanks! |
|
Hi @ahmedfgad,
First, you did an excellent project, congratulations!
Secondly I have a question, my problem has a peculiar condition in gene generation, the sum of two genes must be in range (0,1) like:
0<sum(variable1+variable2)<1
How can I implement ?
My gen space:
[{'low': 0, 'high': 1.0},
{'low': 0, 'high': 1.0},
{'low': 0, 'high': 3.5},
{'low': 0, 'high': 4.0}]
The first and second parameters must be within the range and the sum of the two parameters must be between 0 and 1
Thank you
The text was updated successfully, but these errors were encountered: