Initial Board: [5, 3, 4, 1, 0, 6, 1, 2], score=6 (6 conflicting positions) Generate 4 boards from this Initial Board: Top4= [[3, [5, 3, 4, 7, 0, 6, 1, 2]], [conflicts, board] [3, [5, 7, 4, 1, 0, 6, 1, 2]], [4, [5, 0, 4, 1, 0, 6, 1, 2]], [7, [7, 5, 3, 4, 1, 4, 4, 1]] i=0 GENERATION 0 Clone the first board to the last (dropping the last place board): New Top4 after cloning first board to last = [[3, [5, 3, 4, 7, 0, 6, 1, 2]], Pos 0 [3, [5, 7, 4, 1, 0, 6, 1, 2]], Pos 1 [4, [5, 0, 4, 1, 0, 6, 1, 2]], Pos 2 [3, [5, 3, 4, 7, 0, 6, 1, 2]]] Pos 3 Parent 1 is the board at Pos 0. Choose Parent 2 randomly from Pos 1 or Pos 2: Choose a random crossover point and crossover parents 1 and 2 at this point: Combining [5, 3, 4, 7, 0, 6, 1, 2] with [5, 0, 4, 1, 0, 6, 1, 2] at pos=2 Crossover point=2 After crossover: Offspring 1: [5, 3, 4, 1, 0, 6, 1, 2], Offspring 2: [5, 0, 4, 7, 0, 6, 1, 2] Parent 3 is clone of Parent 1 at Pos 3 Choose Parent 4 randomly from Pos 1 or Pos 2: Choose a random crossover point and crossover parents 3 and 4 at this point: Combining [5, 3, 4, 7, 0, 6, 1, 2] with [5, 7, 4, 1, 0, 6, 1, 2] at pos=1 Crossover point=1 After crossover: Offspring 3: [5, 7, 4, 1, 0, 6, 1, 2], Offspring 4: [5, 3, 4, 7, 0, 6, 1, 2] Adding offspring 1: [5, 3, 4, 1, 0, 6, 1, 2] to top4: [[6, [5, 3, 4, 1, 0, 6, 1, 2]]] Adding offspring 2: [5, 0, 4, 7, 0, 6, 1, 2] to top4: [[6, [5, 3, 4, 1, 0, 6, 1, 2]], [2, [5, 0, 4, 7, 0, 6, 1, 2]]] Adding offspring 3: [5, 7, 4, 1, 0, 6, 1, 2] to top4: [[6, [5, 3, 4, 1, 0, 6, 1, 2]], [2, [5, 0, 4, 7, 0, 6, 1, 2]], [3, [5, 7, 4, 1, 0, 6, 1, 2]]] Add offspring 4 to top4 and sort: New top4: [[2, [5, 0, 4, 7, 0, 6, 1, 2]], Pos 0 [3, [5, 3, 4, 7, 0, 6, 1, 2]], Pos 1 [3, [5, 7, 4, 1, 0, 6, 1, 2]], Pos 2 [6, [5, 3, 4, 1, 0, 6, 1, 2]]] Pos 3 i=1 GENERATION 2 New Top4 after cloning first board to last, dropping last place board = [[2, [5, 0, 4, 7, 0, 6, 1, 2]], Pos 0 [3, [5, 3, 4, 7, 0, 6, 1, 2]], Pos 1 [3, [5, 7, 4, 1, 0, 6, 1, 2]], Pos 2 [2, [5, 0, 4, 7, 0, 6, 1, 2]]] Pos 3 Parent 1 is the board at Pos 0. Choose Parent 2 randomly from Pos 1 or Pos 2: Choose a random crossover point and crossover parents 1 and 2 at this point: Combining [5, 0, 4, 7, 0, 6, 1, 2] with [5, 3, 4, 7, 0, 6, 1, 2] at pos=1 Crossover point=2 After crossover: Offspring 1: [5, 0, 4, 7, 0, 6, 1, 2], Offspring 2: [5, 3, 4, 7, 0, 6, 1, 2] Parent 3 is clone of Parent 1 at Pos 3 Choose Parent 4 randomly from Pos 1 or Pos 2: Choose a random crossover point and crossover parents 3 and 4 at this point: Combining [5, 0, 4, 7, 0, 6, 1, 2] with [5, 3, 4, 7, 0, 6, 1, 2] at pos=1 Crossover point=4 After crossover: Offspring 3: [5, 0, 4, 7, 0, 6, 1, 2], Offspring 4: [5, 3, 4, 7, 0, 6, 1, 2] Adding offspring 1: [5, 0, 4, 7, 0, 6, 1, 2] to top4: [[2, [5, 0, 4, 7, 0, 6, 1, 2]]] Adding offspring 2: [5, 3, 4, 7, 0, 6, 1, 2] to top4: [[2, [5, 0, 4, 7, 0, 6, 1, 2]], [3, [5, 3, 4, 7, 0, 6, 1, 2]]] Offspring 3: [5, 0, 4, 7, 0, 6, 1, 2] is already in top4 Mutate offspring 3 to [5, 0, 4, 7, 0, 6, 1, 7] Add mutated offspring 3: [5, 0, 4, 7, 0, 6, 1, 7] to top4: [[2, [5, 0, 4, 7, 0, 6, 1, 2]], [3, [5, 3, 4, 7, 0, 6, 1, 2]], [2, [5, 0, 4, 7, 0, 6, 1, 7]]] Offspring 4: [5, 3, 4, 7, 0, 6, 1, 2] is already in top4 Mutate offspring 4 to [5, 7, 4, 7, 0, 6, 1, 2] Add mutated offspring 4 and sort New top4: [[2, [5, 0, 4, 7, 0, 6, 1, 2]], [2, [5, 0, 4, 7, 0, 6, 1, 7]], [2, [5, 7, 4, 7, 0, 6, 1, 2]], [3, [5, 3, 4, 7, 0, 6, 1, 2]]] i=2 GENERATION 2 New Top4 after cloning first board to last = [[2, [5, 0, 4, 7, 0, 6, 1, 2]], Pos 0 [2, [5, 0, 4, 7, 0, 6, 1, 7]], Pos 1 [2, [5, 7, 4, 7, 0, 6, 1, 2]], Pos 2 [2, [5, 0, 4, 7, 0, 6, 1, 2]]] Pos 3 Parent 1 is the board at Pos 0. Choose Parent 2 randomly from Pos 1 or Pos 2: Choose a random crossover point and crossover parents 1 and 2 at this point: Combining [5, 0, 4, 7, 0, 6, 1, 2] with [5, 0, 4, 7, 0, 6, 1, 7] at pos=1 Crossover point=2 After crossover: Offspring 1: [5, 0, 4, 7, 0, 6, 1, 7], Offspring 2: [5, 0, 4, 7, 0, 6, 1, 2] Parent 3 is clone of Parent 1 at Pos 3 Choose Parent 4 randomly from Pos 1 or Pos 2: Choose a random crossover point and crossover parents 3 and 4 at this point: Combining [5, 0, 4, 7, 0, 6, 1, 2] with [5, 7, 4, 7, 0, 6, 1, 2] at pos=2 Crossover point=5 After crossover: Offspring 3: [5, 0, 4, 7, 0, 6, 1, 2], Offspring 4: [5, 7, 4, 7, 0, 6, 1, 2] Adding offspring 1: [5, 0, 4, 7, 0, 6, 1, 7] to top4: [[2, [5, 0, 4, 7, 0, 6, 1, 7]]] Adding offspring 2: [5, 0, 4, 7, 0, 6, 1, 2] to top4: [[2, [5, 0, 4, 7, 0, 6, 1, 7]], [2, [5, 0, 4, 7, 0, 6, 1, 2]]] Offspring 3: [5, 0, 4, 7, 0, 6, 1, 2] is already in top4 Mutate offspring3 to [5, 0, 4, 7, 0, 6, 1, 7], but it is already in top4 Mutate offspring3 to [5, 0, 4, 7, 0, 6, 1, 5] for count=2 Add mutated offspring3 to top4: [[2, [5, 0, 4, 7, 0, 6, 1, 7]], [2, [5, 0, 4, 7, 0, 6, 1, 2]], [2, [5, 0, 4, 7, 0, 6, 1, 5]]] Add offspring4 to top4 and sort New top4: [[2, [5, 0, 4, 7, 0, 6, 1, 2]], [2, [5, 0, 4, 7, 0, 6, 1, 5]], [2, [5, 0, 4, 7, 0, 6, 1, 7]], [2, [5, 7, 4, 7, 0, 6, 1, 2]]] i=3 GENERATION 3 New Top4 after cloning first board to last = [[2, [5, 0, 4, 7, 0, 6, 1, 2]], Pos 0 [2, [5, 0, 4, 7, 0, 6, 1, 5]], Pos 1 [2, [5, 0, 4, 7, 0, 6, 1, 7]], Pos 2 [2, [5, 0, 4, 7, 0, 6, 1, 2]]] Pos 3 Parent 1 is the board at Pos 0. Choose Parent 2 randomly from Pos 1 or Pos 2: Choose a random crossover point and crossover parents 1 and 2 at this point: Combining [5, 0, 4, 7, 0, 6, 1, 2] with [5, 0, 4, 7, 0, 6, 1, 5] at pos=1 Crossover point=4 After crossover: Offspring 1: [5, 0, 4, 7, 0, 6, 1, 5], Offspring 2: [5, 0, 4, 7, 0, 6, 1, 2] Parent 3 is clone of Parent 1 at Pos 3 Choose Parent 4 randomly from Pos 1 or Pos 2: Choose a random crossover point and crossover parents 3 and 4 at this point: Combining [5, 0, 4, 7, 0, 6, 1, 2] with [5, 0, 4, 7, 0, 6, 1, 5] at pos=1 Crossover point=3 After crossover: Offspring 3: [5, 0, 4, 7, 0, 6, 1, 5], Offspring 4: [5, 0, 4, 7, 0, 6, 1, 2] Adding offspring1: [5, 0, 4, 7, 0, 6, 1, 5] to top4: [[2, [5, 0, 4, 7, 0, 6, 1, 5]]] Adding offspring2: [5, 0, 4, 7, 0, 6, 1, 2] to top4: [[2, [5, 0, 4, 7, 0, 6, 1, 5]], [2, [5, 0, 4, 7, 0, 6, 1, 2]]] Offspring3: [5, 0, 4, 7, 0, 6, 1, 5] is already in top4 Mutate offspring3 to [3, 0, 4, 7, 0, 6, 1, 5] Add mutated offspring3 to top4: [[2, [5, 0, 4, 7, 0, 6, 1, 5]], [2, [5, 0, 4, 7, 0, 6, 1, 2]], [1, [3, 0, 4, 7, 0, 6, 1, 5]]] Offspring4: [5, 0, 4, 7, 0, 6, 1, 2] is already in top4 Mutate offspring4 to [5, 0, 4, 7, 0, 6, 1, 7] Add mutated offspring4 to top4 and sort: New top4: [[1, [3, 0, 4, 7, 0, 6, 1, 5]], [2, [5, 0, 4, 7, 0, 6, 1, 2]], [2, [5, 0, 4, 7, 0, 6, 1, 5]], [2, [5, 0, 4, 7, 0, 6, 1, 7]]] i=4 GENERATION 4 New Top4 after cloning first board to last = [[1, [3, 0, 4, 7, 0, 6, 1, 5]], Pos 0 [2, [5, 0, 4, 7, 0, 6, 1, 2]], Pos 1 [2, [5, 0, 4, 7, 0, 6, 1, 5]], Pos 2 [1, [3, 0, 4, 7, 0, 6, 1, 5]]] Pos 3 Parent 1 is the board at Pos 0. Choose Parent 2 randomly from Pos 1 or Pos 2: Choose a random crossover point and crossover parents 1 and 2 at this point: Combining [3, 0, 4, 7, 0, 6, 1, 5] with [5, 0, 4, 7, 0, 6, 1, 2] at pos=1 Crossover point=2 After crossover: Offspring 1: [3, 0, 4, 7, 0, 6, 1, 2], Offspring 2: [5, 0, 4, 7, 0, 6, 1, 5] Parent 3 is clone of Parent 1 at Pos 3 Choose Parent 4 randomly from Pos 1 or Pos 2: Choose a random crossover point and crossover parents 3 and 4 at this point: Combining [3, 0, 4, 7, 0, 6, 1, 5] with [5, 0, 4, 7, 0, 6, 1, 5] at pos=2 Crossover point=2 After crossover: Offspring 3: [3, 0, 4, 7, 0, 6, 1, 5], Offspring 4: [5, 0, 4, 7, 0, 6, 1, 5] Adding offspring1 [3, 0, 4, 7, 0, 6, 1, 2] to top4: [[2, [3, 0, 4, 7, 0, 6, 1, 2]]] Adding offspring2 [5, 0, 4, 7, 0, 6, 1, 5] to top4: [[2, [3, 0, 4, 7, 0, 6, 1, 2]], [2, [5, 0, 4, 7, 0, 6, 1, 5]]] Adding offspring3 [3, 0, 4, 7, 0, 6, 1, 5] to top4: [[2, [3, 0, 4, 7, 0, 6, 1, 2]], [2, [5, 0, 4, 7, 0, 6, 1, 5]], [1, [3, 0, 4, 7, 0, 6, 1, 5]]] Offspring4 [5, 0, 4, 7, 0, 6, 1, 5] is already in top4 Mutate offspring4 to [3, 0, 4, 7, 0, 6, 1, 5], but this is already in top4 Mutate offspring4 to [3, 0, 4, 7, 4, 6, 1, 5]. Add to the list and sort: New top4: [[1, [3, 0, 4, 7, 0, 6, 1, 5]], [1, [3, 0, 4, 7, 4, 6, 1, 5]], [2, [3, 0, 4, 7, 0, 6, 1, 2]], [2, [5, 0, 4, 7, 0, 6, 1, 5]]] i=5 GENERATION 5 New Top4 after cloning first board to last = [[1, [3, 0, 4, 7, 0, 6, 1, 5]], [1, [3, 0, 4, 7, 4, 6, 1, 5]], [2, [3, 0, 4, 7, 0, 6, 1, 2]], [1, [3, 0, 4, 7, 0, 6, 1, 5]]] Parent 1 is the board at Pos 0. Choose Parent 2 randomly from Pos 1 or Pos 2: Choose a random crossover point and crossover parents 1 and 2 at this point: Combining [3, 0, 4, 7, 0, 6, 1, 5] with [3, 0, 4, 7, 4, 6, 1, 5] at pos=1 Crossover point=4 After crossover: Offspring 1: [3, 0, 4, 7, 4, 6, 1, 5], Offspring 2: [3, 0, 4, 7, 0, 6, 1, 5] Parent 3 is clone of Parent 1 at Pos 3 Choose Parent 4 randomly from Pos 1 or Pos 2: Choose a random crossover point and crossover parents 3 and 4 at this point: Combining [3, 0, 4, 7, 0, 6, 1, 5] with [3, 0, 4, 7, 0, 6, 1, 2] at pos=2 Crossover point=4 After crossover: Offspring 3: [3, 0, 4, 7, 0, 6, 1, 2], Offspring 4: [3, 0, 4, 7, 0, 6, 1, 5] Adding offspring1 [3, 0, 4, 7, 4, 6, 1, 5] to top4: [[1, [3, 0, 4, 7, 4, 6, 1, 5]]] Adding offspring2 [3, 0, 4, 7, 0, 6, 1, 5] to top4: [[1, [3, 0, 4, 7, 4, 6, 1, 5]], [1, [3, 0, 4, 7, 0, 6, 1, 5]]] Adding offspring3 [3, 0, 4, 7, 0, 6, 1, 2] to top4: [[1, [3, 0, 4, 7, 4, 6, 1, 5]], [1, [3, 0, 4, 7, 0, 6, 1, 5]], [2, [3, 0, 4, 7, 0, 6, 1, 2]]] Offspring4 [3, 0, 4, 7, 0, 6, 1, 5] already in top4 Mutate offspring4 to [3, 0, 4, 7, 4, 6, 1, 5], this is already on the list Mutate offspring4 to [3, 0, 4, 7, 1, 6, 1, 5], add this to the list and sort: New top4: [[1, [3, 0, 4, 7, 0, 6, 1, 5]], [1, [3, 0, 4, 7, 1, 6, 1, 5]], [1, [3, 0, 4, 7, 4, 6, 1, 5]], [2, [3, 0, 4, 7, 0, 6, 1, 2]]] i=6 GENERATION 6 New Top4 after cloning first board to last = [[1, [3, 0, 4, 7, 0, 6, 1, 5]], Pos 0 [1, [3, 0, 4, 7, 1, 6, 1, 5]], Pos 1 [1, [3, 0, 4, 7, 4, 6, 1, 5]], Pos 2 [1, [3, 0, 4, 7, 0, 6, 1, 5]]] Pos 3 Parent 1 is the board at Pos 0. Choose Parent 2 randomly from Pos 1 or Pos 2: Choose a random crossover point and crossover parents 1 and 2 at this point: Combining [3, 0, 4, 7, 0, 6, 1, 5] with [3, 0, 4, 7, 4, 6, 1, 5] at pos=2 Crossover point=2 After crossover: Offspring 1: [3, 0, 4, 7, 4, 6, 1, 5], Offspring 2: [3, 0, 4, 7, 0, 6, 1, 5] Parent 3 is clone of Parent 1 at Pos 3 Choose Parent 4 randomly from Pos 1 or Pos 2: Choose a random crossover point and crossover parents 3 and 4 at this point: Combining [3, 0, 4, 7, 0, 6, 1, 5] with [3, 0, 4, 7, 4, 6, 1, 5] at pos=2 Crossover point=4 After crossover: Offspring 3: [3, 0, 4, 7, 4, 6, 1, 5], Offspring 4: [3, 0, 4, 7, 0, 6, 1, 5] Adding offspring1 [3, 0, 4, 7, 4, 6, 1, 5] to top4: [[1, [3, 0, 4, 7, 4, 6, 1, 5]]] Adding offspring2 [3, 0, 4, 7, 0, 6, 1, 5] to top4: [[1, [3, 0, 4, 7, 4, 6, 1, 5]], [1, [3, 0, 4, 7, 0, 6, 1, 5]]] Offspring3 [3, 0, 4, 7, 4, 6, 1, 5] is already in top4 Mutate offspring3 to [3, 0, 4, 7, 1, 6, 1, 5], add to top4: [[1, [3, 0, 4, 7, 4, 6, 1, 5]], [1, [3, 0, 4, 7, 0, 6, 1, 5]], [1, [3, 0, 4, 7, 1, 6, 1, 5]]] Offspring4 [3, 0, 4, 7, 0, 6, 1, 5] is already in top4 Mutate offspring4 to [3, 0, 4, 7, 4, 6, 1, 5], but this is already in top4 Mutate offspring4 to [3, 0, 4, 7, 1, 6, 1, 5], but this is already in top4 Mutate offspring4 to [3, 0, 4, 7, 1, 6, 2, 5], add this to the list and sort: New top4: [[0, [3, 0, 4, 7, 1, 6, 2, 5]], [1, [3, 0, 4, 7, 0, 6, 1, 5]], [1, [3, 0, 4, 7, 1, 6, 1, 5]], [1, [3, 0, 4, 7, 4, 6, 1, 5]]] Solution board found at GENERATION 6: [0, [3, 0, 4, 7, 1, 6, 2, 5]]