Assignment 2 - Smart Search
This assignment accounts for ine sixth of your internal 316 marks.
Simply use the difference in stones (black-white) as your heuristic function, plus use +100 for a win of black, and -100 for a win of white. For the rules of the game see Reversi on Wikipedia.
Your program should read from standard in and output to standard out (System.in and System.out in Java).
Expect to read-in a game position plus an indicator for which side is to move, where ".", "+", "-" are used for "free", "black" player, and "white" player respectively. For instance, the starting position, where "black" is expected to move, would be represented as:
........
........
........
...-+...
...+-...
........
........
........
+
You should output one line with the coordinates of your move, the number of nodes expanded, the max search depth reached, and the minimax estimate, e.g.
move c 4 nodes 123345 depth 12 minimax 27
move a -1 nodes 0 depth 0 minimax 0
Also implement the AC-3 consistency checker.
For ten different Sudoku puzzles (e.g. from online newspapers), use your solver to find a solution. Report the number of nodes backtracking had to expand and the total runtime for all ten puzzles and 3 different ways of solving:
You may use any of the following languages: Java, C, C++, C#, Python, Ruby, Haskell.