/// <summary>
        ///     Constructor which takes an existing maze genome parameters configuration and copies all of the parameters from it.
        /// </summary>
        /// <param name="copyFrom">The existing maze genome parameters configuration to copy.</param>
        public MazeGenomeParameters(MazeGenomeParameters copyFrom)
        {
            MutateWallStartLocationProbability = copyFrom.MutateWallStartLocationProbability;
            MutatePassageStartLocationProbability = copyFrom.MutatePassageStartLocationProbability;
            MutateAddWallProbability = copyFrom.MutateAddWallProbability;
            PerturbanceMagnitude = copyFrom.PerturbanceMagnitude;

            RouletteWheelLayout = new RouletteWheelLayout(copyFrom.RouletteWheelLayout);
        }
        /// <summary>
        ///     Read maze genome parameter settings from the configuration file.
        /// </summary>
        /// <param name="xmlConfig">The reference to the XML configuration file.</param>
        /// <returns>An initialized maze genome parameters object.</returns>
        public static MazeGenomeParameters ReadMazeGenomeParameters(XmlElement xmlConfig)
        {
            // Create new NEAT genome parameters with default values
            MazeGenomeParameters genomeParameters = new MazeGenomeParameters();

            // Get root of neat genome configuration section
            XmlNodeList nodeList = xmlConfig.GetElementsByTagName("MazeGenomeConfig", "");

            // Note that if there are multiple defined (such as would be the case with an experiment that uses multiple EAs),
            // the first one is used here, which will accurately correspond to the current algorithm under consideration
            if (nodeList.Count >= 1)
            {
                // Convert to an XML element
                XmlElement xmlMazeGenomeConfig = nodeList[0] as XmlElement;

                // Read all of the applicable parameters in
                double? wallStartMutationProbability = XmlUtils.TryGetValueAsDouble(xmlMazeGenomeConfig,
                    "MutateWallStartLocationProbability");
                double? passageStartMutationProbability = XmlUtils.TryGetValueAsDouble(xmlMazeGenomeConfig,
                    "MutatePassageStartLocationProbability");
                double? addWallProbability = XmlUtils.TryGetValueAsDouble(xmlMazeGenomeConfig,
                    "MutateAddWallProbability");
                double? perturbanceMagnitude = XmlUtils.TryGetValueAsDouble(xmlMazeGenomeConfig,
                    "PerturbanceMagnitude");

                // Set each if it's specified in the configuration (otherwise, accept the default)
                if (wallStartMutationProbability != null)
                {
                    genomeParameters.MutateWallStartLocationProbability = wallStartMutationProbability ??
                                                                          default(double);
                }
                if (passageStartMutationProbability != null)
                {
                    genomeParameters.MutatePassageStartLocationProbability = passageStartMutationProbability ??
                                                                             default(double);
                }
                if (addWallProbability != null)
                {
                    genomeParameters.MutateAddWallProbability = addWallProbability ?? default(double);
                }
                if (perturbanceMagnitude != null)
                {
                    genomeParameters.PerturbanceMagnitude = perturbanceMagnitude ?? default(double);
                }
            }

            return genomeParameters;
        }