-
-
Notifications
You must be signed in to change notification settings - Fork 489
Gene type #155
soheilminer
started this conversation in
General
Gene type
#155
-
Hello everyone,
I'm using this package for my research in stochastic mine planning, and I'm trying to adapt it to my own problem.
I'm just wondering if I can define each gene as a tuple that contains two values, and only perform the crossover/mutation functions on the second value while the first one is fixed. Any help is appreciated.
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 1 comment
-
Hello,
Yes this is possible using the gene_space
parameter. This is an example which makes the value of the first gene fixed (1) and the value of the second one is None
so that it can be randomly changed using the GA.
ga_instance = pygad.GA(..., gene_space=[[1], None], ...)
Beta Was this translation helpful? Give feedback.
All reactions
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment