Esempio n. 1
0
        public void CreateKnowledge()
        {
            //int endGameDepth = Math.Min((Constants.StoneCount - 4) / 2, 20);

            int initialCount = 6;
            int leftEmpthCount = initialCount;

            while (leftEmpthCount <= Constants.StoneCount - 4) {

                string knowFile = string.Format("{0}-{1}-{2:yyyy-MM-dd}.know",
                                            Constants.Line,
                                            leftEmpthCount,
                                            DateTime.Now);
                IEngine engine;
                if(leftEmpthCount > initialCount+1  ) {
                     engine = new NeuralEngine();
                }
                else {
                    engine = new EndGameEngine();
                }

                var know = new Knowledge(1000000, leftEmpthCount, leftEmpthCount > initialCount+1 ? 2 : 12);
                know.Engine = engine;
                know.Generate(knowFile);

                var networkFile = Learn(knowFile);

                leftEmpthCount++;
            }
        }
Esempio n. 2
0
 private static void GenKnowledge_Test()
 {
     var know = new Knowledge(1000000, Math.Min((Constants.StoneCount - 4) / 2, 20), 6);
     know.Generate();
 }