Closed seallard closed 3 years ago
It is not due to interspecies mating (the best fitness observed still decreases sometimes when it is disabled). Not due to stagnation either. The best species might stagnate -> removed. But that is not the case here.
Got it! The breeder mutated the state of genome link weights when crossover was done using averaging:
def average_link(self, link1, link2):
new_weight = (link1.weight + link2.weight)/2
link1.weight = new_weight
return link1
Why side-effects, why... So when the species leader was crossed with another genome, the weights of its links were changed.
Sometimes, the best solution found is deleted. Maybe: assigned a large number of offspring which under performs? But the species leader should always be copied into the new population. Maybe: species not sorted correctly? Or wrong leader? Or leader is not copied?