GetSuccessors() public method

public GetSuccessors ( ) : IEnumerable
return IEnumerable
Exemplo n.º 1
0
        public void Test_Square_Expansion()
        {
            for (int i = 0; i < 9; i++)
            {
                int[]  square = CreateSquare(i);
                IState init   = new Square(square);
                Console.WriteLine(init.ToString());
                foreach (var s in init.GetSuccessors())
                {
                    Console.WriteLine("---------\n{0} ({1}{2})", s.Action, s.Cost, s.State.IsTerminal ? ", Goal" : "");
                    Console.WriteLine(s.State);
                }

                Console.WriteLine("------------------------------------------");
            }
        }
Exemplo n.º 2
0
        public void Test_Square_Expansion()
        {
            for (int i = 0; i < 9; i++)
            {
                int[] square = CreateSquare(i);
                IState init = new Square(square);
                Console.WriteLine(init.ToString());
                foreach (var s in init.GetSuccessors())
                {
                    Console.WriteLine("---------\n{0} ({1}{2})", s.Action, s.Cost, s.State.IsTerminal ? ", Goal" : "");
                    Console.WriteLine(s.State);
                }

                Console.WriteLine("------------------------------------------");
            }
        }