Class: EvoSynth::Recombinations::OrderedRecombination

Inherits:
Object
  • Object
show all
Defined in:
lib/evosynth/operators/recombinations/ordered_recombination.rb

Overview

ORDNUNGSREKOMBINATION (Weicker page 29)

this can only recombine permutations (see partially mapped crossover). at least it only works on genomes without duplicate genes!

Instance Method Summary collapse

Instance Method Details

#recombine(parent_one, parent_two) ⇒ Object



38
39
40
41
42
43
44
45
# File 'lib/evosynth/operators/recombinations/ordered_recombination.rb', line 38

def recombine(parent_one, parent_two)
	shorter = EvoSynth::Recombinations.individual_with_shorter_genome(parent_one, parent_two)

	child_one = recombine_to_one(parent_one, parent_two, shorter)
	child_two = recombine_to_one(parent_two, parent_one, shorter)

	[child_one, child_two]
end

#to_sObject



47
48
49
# File 'lib/evosynth/operators/recombinations/ordered_recombination.rb', line 47

def to_s
	"ordered recombination"
end