In the last two posts we explored three different algorithms for solving the n-queens problem. If we wanted to actually implement one of them, we would need to consider which one performs the best. However, performance can be measured in…
N-Queens Part 2: More Algorithms
Last time we were considering the following n-queens board with a current heuristic cost of 5:By making just one move, the best decision would be to move the second queen to the space marked 2. However, to find that move,…
N-Queens Part 1: Steepest Hill Climbing
The n-queens problem was first invented in the mid 1800s as a puzzle for people to solve in their spare time, but now serves as a good tool for discussing computer search algorithms. In chess, a queen is the only…