Ejemplo n.º 1
0
        private void LearnSession(int bestof)
        {
            if (bestNet == null)
            {
                bestNet = new NeuralNet(11, 6, NUM_NEURONS, 1, new Random());
            }
            bestNet.LearnSession(lessonplan, bestof);

            Console.WriteLine("-\t-\t- FINAL -\t-\t-\n\nSUCCESS\t\tACC [MIN " + NeuralNet.ACC_THRESHOLD.ToString("f2") + "]");
            Console.WriteLine(bestNet.Test(new float[] { 4, 3, 2, 3, 4, 5 }, new float[] { 0 }));
            Console.WriteLine(bestNet.Test(new float[] { 4, 4, 2, 2, 3, 3 }, new float[] { 0 }));
            Console.WriteLine(bestNet.Test(new float[] { 9, 9, 9, 9, 9, 9 }, new float[] { 0 }));
            Console.WriteLine(bestNet.Test(new float[] { 7, 8, 2, 3, 4, 5 }, new float[] { 1 }));
            Console.WriteLine(bestNet.Test(new float[] { 0, 8, 2, 3, 4, 1 }, new float[] { 1 }));
            Console.WriteLine(bestNet.Test(new float[] { 5, 3, 2, 0, 9, 1 }, new float[] { 1 }));

            Console.WriteLine(bestNet.Test(new float[] { 1, 2, 9, 8, 4, 5 }, new float[] { 1 }));
            Console.WriteLine(bestNet.Test(new float[] { 1, 0, 2, 3, 4, 6 }, new float[] { 1 }));
            Console.WriteLine(bestNet.Test(new float[] { 8, 7, 7, 8, 8, 7 }, new float[] { 0 }));

            Console.WriteLine("\nDone! Type 'help' for commands.\n");
            string cmd;

            while ((cmd = Console.ReadLine().ToLower()) != "")
            {
                string[] args = cmd.Split(' ');
                Commands(args);
            }
        }