Example #1
0
        private static void TimeOneMove(IAlgorithmInterface uct, Board board)
        {
            var stopwatch = Stopwatch.StartNew();
            var move      = uct.SelectMove(board);

            stopwatch.Stop();
            board.PutToken(move);
            Console.WriteLine($"Selected move {move}");
            Console.WriteLine($"Time UCT {stopwatch.ElapsedMilliseconds / (double)1000}");
        }
Example #2
0
 private void PlayMove()
 {
     if (vs == VS.AlphaBeta)
     {
         ab.MakeMove(firstPlayer, firstPlayer, board);
     }
     else
     {
         var move = algorithm.SelectMove(board);
         board.PutToken(move);
     }
 }