Method: FeldtRuby::Optimize::DE_MutationStrategy_Best_2#mutate

Defined in:
lib/feldtruby/optimize/differential_evolution.rb

#mutate(targetIndex, donorParentsIndices) ⇒ Object



196
197
198
199
200
# File 'lib/feldtruby/optimize/differential_evolution.rb', line 196

def mutate(targetIndex, donorParentsIndices)
	p1, p2, p3, p4 = get_candidates_with_indices(donorParentsIndices)
	f = scale_factor(targetIndex)
	candidate_from_array(best) + (f * (p1 - p2)) + (f * (p3 - p4))
end