Hill Climbing Search - 8 queens In that picture, I am having trouble counting why there are 17 pairs of queens. I can only count 14. I counted 10 diagonal pairs and 5 horizontal pairs. Can someone please elaborate on this?
I am not exactly sure how it was numbered, but I believe the numbers on the board represent the new number of pairs that are attacking each other if a queen in that column were to move to that square.
5 - Horizontal attacks
9 - Diagonal attacks of slope -1
3 - Diagonal attacks of slope +1
-
Total 17 pairs of queens attacking each other.


And yes, the numbers in each square correspond to number of attacking pairs of the queen if the queen in the corresponding column is moves to that location.