Possible naive implementation in Polynomial mutation

11 views
Skip to first unread message

sai_ng

unread,
Mar 22, 2021, 8:26:41 PM3/22/21
to deap-users

Hi all,
I've been working on genetic algorithms for a while , and I noticed a possible naive implementation in the deap/mutation.py file. More specifically

We calculate this
delta_1 = (x - xl) / (xu - xl)

delta_2 = (xu - x) / (xu - xl)
...


if rand < 0.5:

   xy = 1.0 - delta_1  # 1 - delta_1 is delta_2, why xy again?
   ....


Let me know your thoughts, cheers!
Reply all
Reply to author
Forward
0 new messages