遗传算法的关联记忆方案研究
1. 算法伪代码
以下是AMGA和DAMGA的伪代码:
t := 0 and tM := rand(5, 10)
initialize P(0) randomly and empty memory M(0)
evaluate population P(0)
repeat
evaluate memory M(t)
if environmental change detected then
denote the best memory point <SM(t), DM(t)>
I(t) := create α ∗(n −m) individuals from DM(t)
P ′(t) := swap individuals in I(t) into P(t) randomly
if direct memory combined then
// for DAMGA
P ′(t) := retrieveBestMembersFrom(P ′(t), M(t))
else P ′(t) := P(t)
if t = tM then tM := t + rand(5, 10) // time to update memory
denote the best individual in P ′(t) by SP (t)
extract the allele distribution vector DP (t) from