Esempio n. 1
0
        private void SaveSettings()
        {
            listedNetworkSettings.SaveSettings();
            networkSettings.numberOfWeights = networkSettings.CalculateNumberOfWeights();
            geneticSettings.GeneCount       = networkSettings.numberOfWeights;
            listedGeneticSettings.SaveSettings();
            listedSnakeSettings.SaveSettings();

            MessageBox.Show("Settings applied!");
        }
Esempio n. 2
0
        public void TestIfCalculateNumberOfWeightsReturnsCorrectValue()
        {
            int expectedResult = 17;

            int inputStructure = 2;

            int[] hiddenStructure = { 3 };
            int[] outputStructure = { 1, 2 };

            NetworkSettings networkSettings = new NetworkSettings(inputStructure, hiddenStructure, outputStructure);

            int actualResult = networkSettings.CalculateNumberOfWeights();

            Assert.AreEqual(expectedResult, actualResult);
        }