Wednesday, January 11, 2012

The 8-Queen Problem

The 8-Queen problem is also solved using complete search, but illustrates the useful principle of pruning impossible solutions.

Briefly, the problem is to use a program to determine all the possible combinations of 8 queens on a chess board so that no queen can be taken by another. I'm working through each possibility for each queen, while skipping those cases in which a queen is horizontally, vertically, or diagonally aligned with another.

No comments:

Post a Comment