public BoardSolver(int[,] board, heuristic heuristic = heuristic.nMisplaced)
        {
            this.currentBoard = board;

            boardsSeen            = new HashSet <string>();
            boardHeuristicTracker = new Dictionary <string, Tuple <int, int> >();
            parentMap             = new Dictionary <string, string>();

            boardsSeen.Add(boardToString(board));
            boardHeuristicTracker[boardToString(currentBoard)] = new Tuple <int, int>(0, -1);
            parentMap.Add(boardToString(solvedBoard), boardToString(solvedBoard));

            currentHeuristic = heuristic;
        }
Exemple #2
0
 public void setManhattan()
 {
     Admissible = ManhattanDist;
 }
Exemple #3
0
        private void heuristicinfo_Click(object sender, EventArgs e)
        {
            heuristic information = new heuristic();

            information.Show();
        }