The source code using neural network methods to solve the N-Queen problem as well as a data preparation file are given below. They are both written in C and C++ and are designed for any environment, preferably UNIX.

These programs run using the following command line: $ dataprep num1 num2 | queen > output where num1 and num2 are floating point numbers representing alpha and znaut. These range between 0.05 and 1.00. dataprep and queen are the executables for dataprep.c and Nqasyned.c. dataprep.c was created to pipe the alpha and znaut numbers into queen. Details on how to set this up to run with Clustor are given later. A problem encountered was that the path to the ranum files (files containing specific random number ranges) was different to that of the authors of Nqasyned.c (the N-queen problem solving program). This means that to setup the program to run correctly, care must be taken to alter the C code in Nqasyned.c so that when the line: char ranFileName[]=".../ranum01.txt"; is executed, the directory stated within quotation marks matches that of the present ranums directory. Two lines a further down through the code: ranFileName[x]='0' + run/10; ranFileName[y]='0' + run%10; also have to be altered. Here x stands for the integer position of the first digit in  the ranum file name, and y stands for the second. For example, say the  ranum files were located in the following directory: /monash/linux/usr/john/ranums/ranum00.txt then x would be set to 35 and y to 36, as the 00 parts of the string are at positions  35 and 36. This would make the code: ranFileName[35]='0' + run/10; ranFileName[36]='0' + run%10;

The program wasn't flexible with regard to opening the ranum files.

The next step is optional, but is recommended as it helps when analyzing the data. The output method of the program should be changed so that it only outputs 4 numbers: Alpha, Znaut, Feasibility and Average iterations, where alpha and znaut represent the input arguments and Feasibility represents the chance of finding a solution to the N-queen problem from that starting point. The average number of iterations is the average number of calculations required to get that solution. Example output of the program from a single job is:

0.05 0.05 8/100 3454 Alpha and Znaut are both 0.05, the feasibility of a solution at this point is 8/100 and the average number of iterations was 3454. This example was taken from the results of the 10x10 size chessboard. These changes have already been made in the program. The way in which the program outputs data can be easily tailored to any requirements.

Lastly, to change the size of the chessboard the line:

#define Nmax Q; where Q is an integer representing the size of the chessboard, needs to be changed. The program is currently set to solve a 10x10 chessboard. For any other size, alterations need to be made.

When all of the above is running, Clustor can be introduced to help speed up the process of getting through all the jobs. A file called clustor.nodes must be created to tell clustor which computers (nodes) to use and where to find them (ie. through telnet). This allows clustor to login to each machine and run the jobs on them. The file should also have the login name and possibly the password for each node. If you want to run the program in background mode, then the password needs to entered.

This picture shows the first screen in Clustor. To prepare a plan for clustor click on the preparator button. The wizard appears to help you make a plan. For this application you should first enter the parameters alpha and znaut.

Enter the name and label, click on range next to floating point, as the variables for alpha are from 0.05 to 1.00. Set the values for alpha by clicking on set value.

This is repeated for parameter znaut.

Skip the next few windows until the User Command window appears.

The command line shown should include the exact directory locations of dataprep and queen otherwise clustor will not be able to find these files. $jobname is a number representing which job is being completed. The file output.$jobname contains the results for that job. For example, if job 035 is being executed, the results will be placed in "output.035".

Skip the rest of the windows to complete the plan file.

Save this file and move to the generator phase. This phase compiles the plan to create a run file for the dispatcher to execute.

The generator window will open, stating that 361 jobs have been created. If everything is correct, move to the dispatch phase.

From here Clustor executes the jobs on the specified nodes in the clustor.nodes file.

While running, a status window gives the estimated finishing time, how many nodes are available and whether or not jobs were successful.

When all jobs are complete the output files are copied back to the root machine.