Testing PROLOG Sudoku Solvers

by Lisa Garvey

Sudoku Testing

* Used websudoku.com generated Five Sudoku Puzzles, Four Evil and One Hard.
* Puzzles results in Table Below:


Testfiles

  • Test File Original Code
  • Test File Modified for Triples
  • Test File Heuristic Sudoku


    Sudoku Test Results

    Puzzles Original Code Modified for Triples Heuristic Sudoku
    Puzzle 1 EVIL Failed Failed PASSED
    Puzzle 2 EVIL Failed PASSED --
    Puzzle 3 HARD PASSED -- --
    Puzzle 4 EVIL Failed Failed PASSED
    Puzzle 5 EVIL PASSED -- --

    Assessment of Testing

    * Original Code Testing:
    One Evil Puzzle Passed and Three failed. Does appear to be triples issue
    It is noted that for example Puzzle 1 there is a great deal of repetition of numbers in candidate lists
    especially the numbers 2 and 4: There are 36 instances of 2 as a candidate and 23 instances of 4 as a candidate,
    to a lesser extent there are 18 instances of 6 as a candidate.

    * Modified Code Testing:
    One of the Three Evil Puzzles passed when the code was modified for triples
    If the code was modified correctly, then it could be ascertained that the triples code was a necessary rule for solving
    that puzzle, however, the two remaining unsolved evil puzzles are still in need of rules to help them succeed.

    * Heuristic Sudoku Testing:
    The remaining unsolved Evil puzzles, Evil Puzzle #1 and Evil Puzzle #4, were solved using the Heuristic Sudoku code
    The test file shows the output which demonstrates the guesses that the code is making. There is much less output for Evil Puzzle #1 than for Evil Puzzle #4. One thing noted about Evil Puzzle #4 was there was absolutely no number 9 anywhere in the puzzle. which I think made it a more challenging puzzle for the program. Evil Puzzle #1 had only one two and then at least a couple representatives of each number. For thoroughness tested all previously passed puzzle with the Heuristic Sudoku code.

    ---- Please note Success was determined by inputing Prolog's results back into WebSudoku.com -----


    Websites