Open weixing1531 opened 5 years ago
Do you have some measurements how much improvement it is?
My (limited) understanding is that for most problems the time is dominated by the function evaluations and not really the genetic algorithm part.
Maybe a proper bitset class could simplify the encode/decode steps.
Four times faster!------------------ 原始邮件 ------------------ 发件人: "Ivan"<notifications@github.com> 发送时间: 2020年9月26日(星期六) 凌晨3:13 收件人: "jacobwilliams/pikaia"<pikaia@noreply.github.com>; 抄送: "weixing1531"<282844965@qq.com>;"Author"<author@noreply.github.com>; 主题: Re: [jacobwilliams/pikaia] use the Binary/Gray encoding methods replace Decimal (#3)
https://github.com/weixing1531/pikaia/tree/Binary I wrote a subclass named pikaia_binary_class. In the class, I change the definition of array gn. integer(IB),dimension(me%n),intent(out) :: gn operate the array gn in subroutine cross,mutate,encode,decode with using fortran's BIT INTRINSIC PROCEDURES ,then save memory and increase speed.