Inheritance: IAdversarialState
コード例 #1
0
ファイル: TicTacToeTests.cs プロジェクト: sethjuarez/numl
 public void SuperSimpleWinMinimax()
 {
     var m = new Minimax<IState, ISuccessor>();
     m.Depth = 1;
     var initial = new TicTacToe(false, new[] { -1, 0, -1, -1, 1, 1, 1, 0, 1 });
     m.Find(initial);
 }
コード例 #2
0
        public void SuperSimpleWinMinimax()
        {
            var m = new Minimax <IState, ISuccessor>();

            m.Depth = 1;
            var initial = new TicTacToe(false, new[] { -1, 0, -1, -1, 1, 1, 1, 0, 1 });

            m.Find(initial);
        }
コード例 #3
0
ファイル: TicTacToeTests.cs プロジェクト: sethjuarez/numl
 public void Test_Expansion()
 {
     TicTacToe t = new TicTacToe(false, new[] { -1, 0, -1, 1, 0, 0, 0, 1, 0 });
     Console.WriteLine(t);
     foreach (var successor in t.GetSuccessors())
     {
         PrintSuccessor(successor);
     }
 }
コード例 #4
0
        public void Test_Expansion()
        {
            TicTacToe t = new TicTacToe(false, new[] { -1, 0, -1, 1, 0, 0, 0, 1, 0 });

            Console.WriteLine(t);
            foreach (var successor in t.GetSuccessors())
            {
                PrintSuccessor(successor);
            }
        }
コード例 #5
0
        public bool IsEqualTo(IVertex state)
        {
            if (state == null)
            {
                return(false);
            }
            if (!(state is TicTacToe))
            {
                return(false);
            }

            TicTacToe tictactoe = (TicTacToe)state;

            for (int i = 0; i < _board.Length; i++)
            {
                if (_board[i] != tictactoe._board[i])
                {
                    return(false);
                }
            }

            return(true);
        }