N-queens problem objective function
-
04-11-2019 - |
Pergunta
I have read about the N-queens problem and I don't understand the following objective function:
$O(board)=N^2/2-L$
$N$ ... number of queens $L$ ... number of pairs of queens that attack each other
Why they use $N^2/2$? They wrote that it is the number of pairs of queens but I don't understand that can someone maybe explain it to me maybe with visualization
Nenhuma solução correta
Licenciado em: CC-BY-SA com atribuição
Não afiliado a cs.stackexchange