NQueens Asynchronous Backtracking

Title: NQueens Asynchronous Backtracking Author: Peter S. Gindhart and Paul Buhler Description: This is the N-Queens problem solution using asynchronous backtracking as outlined in

The queens are prioritized. Queens with a lower 'who' value are of higher priority. The links this program are directed from a queen to all queens of lower priority (for the ok messages) and from each queen to the queen of next higher priority (for the nogood messages) There is no link request required because these are all the links that are needed. An agents current-view consists of the locations of queens of higher priority. The locations are discovered through 'ok' messages.

Nogoods will be handled as follows. If there is no good position based on the positions of higher priority agents, the queen will forward it's current-view to the next higher queen. Upon recieving a no good an agent will first check to see if the nogood is consistent with it's current agent view.. if not the nogood is ignored. Otherwise the agent moves to the next available good position. If the agent's current view is changed the agent discards his nogood and calculates a new one. Each agent maintains a list of positions flagged as either acceptable or unacceptable. When no acceptable position is available a nogood message is passed up containing the agents current-view.