Homework 15: N Queens

The “N Queens” problem is pretty well-known. The task is to find a placement of N queens on an N by N chess board such that no queen can attack any other queen. This means no two queens will share the same row, column, or diagonal.

I like the problem because it can be solved using a wide variety of algorithms.

Your task is to write a program that can solve the “N Queens” problem using whatever method you find the most interesting. I hope you will choose something other than brute-force or backtracking, because I think those are the least interesting.

I’m going to try the genetic algorithm approach, not because I think it is the best approach, but because I want to learn something about genetic algorithms.

Bring your solution to our June meeting.

Feel free to discuss the problem or any other topics you are interested in on our mailing list (accessible via our Meetup Group).

Provided Solutions

Frank W.

Bill R.