Eight Queens Problem in Java


The Eight Queens problem is pretty famous as far as math puzzles go. To solve the Eight Queens problem, one must place eight queens on a standard 8x8 chessboard such that none of the queens have the ability to take any other queen, using its' standard moves (up and down, side to side, and diagonally). The problem has a pretty simple solution, which is posted at wikipedia. It's written in Python, which to me has an unfamiliar syntax, but I eventually understood the gist of what it did and wrote my own version in Java. The source code has extensive comments if you want to try this yourself, and I made a standalone app version as well. Enjoy! (nQueens - someday)

Version 1.0.4:
-Applet now works in OSX with Aqua!
-There are some refresh problems...
-License updated to GPLv3.


NOTE: Since launching this page about a year ago, I have been flattered by the amount of people
worldwide who have visited. To these I address a small disclaimer: this applet clearly could have
been developed a lot more cleanly in many different ways (e.g. using a 1D array instead of 'QueenRecord')
but the focus here was on playing around with Swing and threads as much as it was on creating
a functional version of EightQueens, which has been done many times over. Keep this in mind
when trying to develop your own versions or looking through my code. -eli b.

Source Code and Jars for Older Versions:
1.0.3: Source, Jar | 1.0.2: Source, Jar | 1.0.1: Source , Jar | 1.0: Source, Jar

Take a look at my other efforts while you're here.

Current Version: 1.0.4 Updated: 5 July 2007
This page © 2007 Eli Bildirici. Source code is released under version 3 of the GPL.
Questions? Comments? Contact Eli (that's me) at eb1167@nyu.edu
Is Barack Obama A Muslim? (No.)
This page now uses XHTML and CSS, and should load correctly in the latest versions of all major browsers.