charlsonso / cs4200_project2_n_queens

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Examples of successful outputs are in the file sa_metrics.txt and genetic_algo_metrics.txt

Simulated Annealing

  1. Navigate to the simulated_annealing directory
  2. If you wish to compile the code, navigate to src/ and type in your console with java sdk 8 javac Board.java SA.java SARunner.java
  3. In the folder with the compiled binary run simulated annealing by typing java SARunner This should be done either in the src folder where you have compiled the code or simply run the command in the bin directory.

Genetic Algorithm

  1. Navigate to genetic_algorithm directory.
  2. If you wish to compile the code, navigate to src/ and type in your console with java sdk 8 javac GeneticRunner.java Genetic.java Board.java
  3. In the folder with the compiled binary run the genetic algorithm by typing java GeneticRunner This should be done either in the src folder where you have compiled the code or simply run the command in the bin directory.

Note: The algorithm is run three times on different initial states and may take a while to complete.

About


Languages

Language:Java 100.0%