0
Ladies Problem
I want to write an evolutionary algorithm, which is able to solve the ladies problem. Do you have any ideas how to rate the fitness of one individual?
3 Antworten
+ 6
Do you mean the n-queens problem?
http://introcs.cs.princeton.edu/java/23recursion/Queens.java.html
+ 3
if it is the 8 queens problem tou are talking about
then here is a nice site with detailed explanation
http://kushalvyas.github.io/gen_8Q.html
in the above, the fitness is evaluated by the total possible clashes of queens on the 8x8 board (28) minus the actual clashes that occured:
fitness=28−clashes
also, you can try here
http://www.cs.bc.edu/~alvarez/ML/GA/nQueensGA.html
in this example, the fitness is measured as the ratio of nonattacking pairs of queens and is between 0 and 1
+ 1
yes i meant the n-queens problem. I am sorry but I am not a native speaker. Thank you very much for your help