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(); }
public AStar(problem currentP) { P = currentP; }