Esempio n. 1
0
    int RunTest()
    {
        nodeSearchCount = 0;


        BoardGround.SetPositionFromFen(fen);
        TimerGround.Start("PerftGround");
        PerfTest(searchDepth);
        TimerGround.Stop("PerftGround");
        TimerGround.Print("PerftGround");
        print("Leaf nodes at depth " + searchDepth + ": " + nodeSearchCount);
        return(nodeSearchCount);
    }
Esempio n. 2
0
    public static void GenerateBook()
    {
        TimerGround.Start("Book Generation");
        string[] gmGames  = Directory.GetFiles("Assets/Opening Book/GM Games", "*.txt");
        string[] openings = Directory.GetFiles("Assets/Opening Book/Openings", "*.txt");

        ProcessFiles(gmGames, 60, 20);          // for any gm game in database that lasted more than x ply, record first y ply
        ProcessFiles(openings, 0, 50);          // record first n ply from specially prepared openings database
        WriteToFile();

        TimerGround.Stop("Book Generation");
        TimerGround.Print("Book Generation");
    }
Esempio n. 3
0
    void Iterate()
    {
        TimerGround.Start("Move Time");

        int startDepth = 4;

        for (int i = startDepth; i <= startDepth; i++)
        {
            searchDepth            = i;
            bestScoreThisIteration = (findingMoveForWhite)?int.MinValue:int.MaxValue;

            AlphaBetaSearch(searchDepth, int.MinValue, int.MaxValue, findingMoveForWhite);
            bestMoveSoFar = bestMoveThisIteration;
        }

        finishedSearch = true;
        TimerGround.Print("Move Time");
        TimerGround.Reset("Move Time");
        //TimerGround.Print ("Eval");
        TimerGround.Reset("Eval");
        //UnityEngine.Debug.Log ("hash hits: " + debug_hashHits);
    }