Skip to content

Latest commit

 

History

History
17 lines (13 loc) · 684 Bytes

ex11.md

File metadata and controls

17 lines (13 loc) · 684 Bytes

Exercise 11

"Inspired" by the code of OnePlusOneEAForKnapsack and HillClimbingForQueens, write a (1+1)EA implementation OnePlusOneEAForQueens for the Queens problem. Make particular attention on how to implement the mutation operator, as you cannot use a simple bit flip.

Write a test suite OnePlusOneEAForQueensTest similarly to what done in QueensProblemTest for the HC algorithm, i.e., write tests for boards of followings sizes: 8, 16, 20 and 100. If your implementation of (1+1)EA is correct, those board sizes should be very quick to solve.

Solutions

Solutions to this exercise can be found in the solutions module, under the org.pg4200.sol11 package.