Eight Queens Applet Instructions

Click here to run Eight Queens Applet

In order to use the applet, Java must be enabled in your browser. Internet Explorer or Netscape Navigator are the two recommended browsers to use. If you receive a message to download a plug-in, click yes and the process to download it will begin. (The download is necessary in order to use the applet). Next, pick the closest location to you and click the install button. After the file is downloaded, click yes to accept the licence agreement and then click next to complete the installation.

Your video display must have a resolution of at least 800x600 pixels for the applet to work properly.

This applet uses a recursive backtracking algorithm to arrange eight queens on a chess board in such a way that no queen is under attack from any other queen. In the game of chess, the queen is the most powerful piece: she can attack any piece in her row, any piece in her column, and any piece in either of her diagonals. To use the applet, enter the start coordinates of the box where you want the first queen to be placed. (The numbers surrounding the board represent the row and column values of each box). Then, click the enter initial position button. To start the animation button, click the start animation button. A red queen represents the backtracking that occurs when an invalid position is detected. Then, the queen is taken away.

Please do not resize the browser window during the animation.

To restart the applet, click the broswer's refresh/reload button. To quit, just close the browser.