Beispiel #1
0
        static void Main(string[] args)
        {
            state   first = new state(3);
            state   goal  = new state(3);
            problem P     = new problem(first, goal, 3);
            AStar   s     = new AStar(P);

            state[] solution = s.AS();
            Array.Reverse(solution);
            foreach (state st in solution)
            {
                Console.WriteLine(st.lastaction);
            }
            Console.WriteLine("solution Length : " + solution.Length + "\n\n");
            Console.ReadKey();
        }
Beispiel #2
0
 public AStar(problem currentP)
 {
     P = currentP;
 }