Exemplo n.º 1
0
        // temp. for testing
        /// <summary>
        /// Launches the test.
        /// </summary>
        /// <returns></returns>
        public static int LaunchTest()
        {
            GoBoard    lGoBoard    = new GoBoard(9);
            GameRecord lGameRecord = new GameRecord();

            SGFCollection lSGFCollection = new SGFCollection();

            //lSGFCollection.LoadSGFFromMemory(SGFGameSamples.DYER);
//			lSGFCollection.LoadSGFFile(@"x:\CodePlex\test2.sgf");
//			lSGFCollection.RetrieveGame(lGameRecord);
//			GameRecordBoardAdapter.Apply(lGameRecord, lGoBoard, false);

            lGoBoard.Dump();

            PatternCollection lPatternCollection = new PatternCollection(@"Patterns\test.db");

            NagCoordinator lNagCoordinator = new NagCoordinator(9999, lPatternCollection);

            //ThreadPoolHelperWithParam<int>.Execute(LaunchWorker, 9999);

            Thread.Sleep(1000 * 14);

            SearchEngine lSearchEngine = new SearchEngine(lGoBoard);

            lSearchEngine.SetSearchMethod(SearchMethodType.AlphaBeta_NAG_ID_TT);
            lSearchEngine.SetNagCoordinator(lNagCoordinator);
            lSearchEngine.SearchOptions.MaxPly          = 40;
            lSearchEngine.SearchOptions.MaxSeconds      = 2000;
            lSearchEngine.SearchOptions.PatternDetector = new PatternDetector(lPatternCollection);

            lSearchEngine.SimpleSearch(Color.Black);

            Thread.Sleep(1000 * 10);

            return(0);
        }
Exemplo n.º 2
0
        protected static void SetSearchMethod(GoBoard goBoard, SearchEngine searchEngine, List<string> parameters, string id, Worker.SendResponse proxy)
        {
            searchEngine.SetSearchMethod(SearchMethodFactory.ToType(parameters[0]));

            Respond(proxy, id);
        }
Exemplo n.º 3
0
        // temp. for testing
        /// <summary>
        /// Launches the test.
        /// </summary>
        /// <returns></returns>
        public static int LaunchTest()
        {
            GoBoard lGoBoard = new GoBoard(9);
            GameRecord lGameRecord = new GameRecord();

            SGFCollection lSGFCollection = new SGFCollection();
            //lSGFCollection.LoadSGFFromMemory(SGFGameSamples.DYER);
            //			lSGFCollection.LoadSGFFile(@"x:\CodePlex\test2.sgf");
            //			lSGFCollection.RetrieveGame(lGameRecord);
            //			GameRecordBoardAdapter.Apply(lGameRecord, lGoBoard, false);

            lGoBoard.Dump();

            PatternCollection lPatternCollection = new PatternCollection(@"Patterns\test.db");

            NagCoordinator lNagCoordinator = new NagCoordinator(9999, lPatternCollection);

            //ThreadPoolHelperWithParam<int>.Execute(LaunchWorker, 9999);

            Thread.Sleep(1000 * 14);

            SearchEngine lSearchEngine = new SearchEngine(lGoBoard);

            lSearchEngine.SetSearchMethod(SearchMethodType.AlphaBeta_NAG_ID_TT);
            lSearchEngine.SetNagCoordinator(lNagCoordinator);
            lSearchEngine.SearchOptions.MaxPly = 40;
            lSearchEngine.SearchOptions.MaxSeconds = 2000;
            lSearchEngine.SearchOptions.PatternDetector = new PatternDetector(lPatternCollection);

            lSearchEngine.SimpleSearch(Color.Black);

            Thread.Sleep(1000 * 10);

            return 0;
        }
Exemplo n.º 4
0
        protected static void SetSearchMethod(GoBoard goBoard, SearchEngine searchEngine, List <string> parameters, string id, Worker.SendResponse proxy)
        {
            searchEngine.SetSearchMethod(SearchMethodFactory.ToType(parameters[0]));

            Respond(proxy, id);
        }