/// <inheritdoc /> /// <summary> /// Initializes the MCC maze navigation experiment by reading in all of the configuration parameters and /// setting up the bootstrapping/initialization algorithm. /// </summary> /// <param name="name">The name of the experiment.</param> /// <param name="xmlConfig">The reference to the XML configuration file.</param> /// <param name="navigatorEvolutionLogger">The navigator evolution data logger.</param> /// <param name="navigatorPopulationLogger">The navigator population logger.</param> /// <param name="navigatorGenomeLogger">The navigator genome logger.</param> /// <param name="mazeEvolutionLogger">The maze evolution data logger.</param> /// <param name="mazePopulationLogger">The maze population logger.</param> /// <param name="mazeGenomeLogger">The maze genome logger.</param> public override void Initialize(string name, XmlElement xmlConfig, IDataLogger navigatorEvolutionLogger = null, IDataLogger navigatorPopulationLogger = null, IDataLogger navigatorGenomeLogger = null, IDataLogger mazeEvolutionLogger = null, IDataLogger mazePopulationLogger = null, IDataLogger mazeGenomeLogger = null) { // Initialize boiler plate parameters base.Initialize(name, xmlConfig, navigatorEvolutionLogger, navigatorPopulationLogger, navigatorGenomeLogger, mazeEvolutionLogger, mazePopulationLogger, mazeGenomeLogger); // Read in log file path/name _navigatorEvolutionDataLogger = navigatorEvolutionLogger ?? ExperimentUtils.ReadDataLogger(xmlConfig, LoggingType.Evolution, "NavigatorLoggingConfig"); _navigatorPopulationDataLogger = navigatorPopulationLogger ?? ExperimentUtils.ReadDataLogger(xmlConfig, LoggingType.Population, "NavigatorLoggingConfig"); _navigatorGenomeDataLogger = navigatorGenomeLogger ?? ExperimentUtils.ReadDataLogger(xmlConfig, LoggingType.Genome, "NavigatorLoggingConfig"); _mazeEvolutionDataLogger = mazeEvolutionLogger ?? ExperimentUtils.ReadDataLogger(xmlConfig, LoggingType.Evolution, "MazeLoggingConfig"); _mazePopulationDataLogger = mazePopulationLogger ?? ExperimentUtils.ReadDataLogger(xmlConfig, LoggingType.Population, "MazeLoggingConfig"); _mazeGenomeDataLogger = mazeGenomeLogger ?? ExperimentUtils.ReadDataLogger(xmlConfig, LoggingType.Genome, "MazeLoggingConfig"); // Create new evolution field elements map with all fields enabled _navigatorLogFieldEnableMap = EvolutionFieldElements.PopulateEvolutionFieldElementsEnableMap(); // Add default population logging configuration foreach (var populationLoggingPair in PopulationFieldElements.PopulatePopulationFieldElementsEnableMap()) { _navigatorLogFieldEnableMap.Add(populationLoggingPair.Key, populationLoggingPair.Value); } // Add default genome logging configuration foreach (var genomeLoggingPair in GenomeFieldElements.PopulateGenomeFieldElementsEnableMap()) { _navigatorLogFieldEnableMap.Add(genomeLoggingPair.Key, genomeLoggingPair.Value); } // Disable logging fields not relevant to agent evolution in MCC experiment _navigatorLogFieldEnableMap[EvolutionFieldElements.SpecieCount] = false; _navigatorLogFieldEnableMap[EvolutionFieldElements.AsexualOffspringCount] = false; _navigatorLogFieldEnableMap[EvolutionFieldElements.SexualOffspringCount] = false; _navigatorLogFieldEnableMap[EvolutionFieldElements.InterspeciesOffspringCount] = false; _navigatorLogFieldEnableMap[EvolutionFieldElements.MinimalCriteriaThreshold] = false; _navigatorLogFieldEnableMap[EvolutionFieldElements.MinimalCriteriaPointX] = false; _navigatorLogFieldEnableMap[EvolutionFieldElements.MinimalCriteriaPointY] = false; _navigatorLogFieldEnableMap[EvolutionFieldElements.MaxFitness] = false; _navigatorLogFieldEnableMap[EvolutionFieldElements.MeanFitness] = false; _navigatorLogFieldEnableMap[EvolutionFieldElements.MeanSpecieChampFitness] = false; _navigatorLogFieldEnableMap[EvolutionFieldElements.MinSpecieSize] = false; _navigatorLogFieldEnableMap[EvolutionFieldElements.MaxSpecieSize] = false; _navigatorLogFieldEnableMap[EvolutionFieldElements.ChampGenomeGenomeId] = false; _navigatorLogFieldEnableMap[EvolutionFieldElements.ChampGenomeFitness] = false; _navigatorLogFieldEnableMap[EvolutionFieldElements.ChampGenomeBirthGeneration] = false; _navigatorLogFieldEnableMap[EvolutionFieldElements.ChampGenomeConnectionGeneCount] = false; _navigatorLogFieldEnableMap[EvolutionFieldElements.ChampGenomeNeuronGeneCount] = false; _navigatorLogFieldEnableMap[EvolutionFieldElements.ChampGenomeTotalGeneCount] = false; _navigatorLogFieldEnableMap[EvolutionFieldElements.ChampGenomeEvaluationCount] = false; _navigatorLogFieldEnableMap[EvolutionFieldElements.ChampGenomeBehaviorX] = false; _navigatorLogFieldEnableMap[EvolutionFieldElements.ChampGenomeBehaviorY] = false; _navigatorLogFieldEnableMap[EvolutionFieldElements.ChampGenomeDistanceToTarget] = false; _navigatorLogFieldEnableMap[EvolutionFieldElements.ChampGenomeXml] = false; _navigatorLogFieldEnableMap[EvolutionFieldElements.MinWalls] = false; _navigatorLogFieldEnableMap[EvolutionFieldElements.MaxWalls] = false; _navigatorLogFieldEnableMap[EvolutionFieldElements.MeanWalls] = false; _navigatorLogFieldEnableMap[EvolutionFieldElements.MinWaypoints] = false; _navigatorLogFieldEnableMap[EvolutionFieldElements.MaxWaypoints] = false; _navigatorLogFieldEnableMap[EvolutionFieldElements.MeanWaypoints] = false; _navigatorLogFieldEnableMap[EvolutionFieldElements.MinJunctures] = false; _navigatorLogFieldEnableMap[EvolutionFieldElements.MaxJunctures] = false; _navigatorLogFieldEnableMap[EvolutionFieldElements.MeanJunctures] = false; _navigatorLogFieldEnableMap[EvolutionFieldElements.MinTrajectoryFacingOpenings] = false; _navigatorLogFieldEnableMap[EvolutionFieldElements.MaxTrajectoryFacingOpenings] = false; _navigatorLogFieldEnableMap[EvolutionFieldElements.MeanTrajectoryFacingOpenings] = false; _navigatorLogFieldEnableMap[EvolutionFieldElements.MinHeight] = false; _navigatorLogFieldEnableMap[EvolutionFieldElements.MaxHeight] = false; _navigatorLogFieldEnableMap[EvolutionFieldElements.MeanHeight] = false; _navigatorLogFieldEnableMap[EvolutionFieldElements.MinWidth] = false; _navigatorLogFieldEnableMap[EvolutionFieldElements.MaxWidth] = false; _navigatorLogFieldEnableMap[EvolutionFieldElements.MeanWidth] = false; // Create a maze logger configuration with the same configuration as the navigator one _mazeLogFieldEnableMap = new Dictionary <FieldElement, bool>(_navigatorLogFieldEnableMap) { [EvolutionFieldElements.RunPhase] = false, [PopulationFieldElements.RunPhase] = false, [EvolutionFieldElements.MinWalls] = true, [EvolutionFieldElements.MaxWalls] = true, [EvolutionFieldElements.MeanWalls] = true, [EvolutionFieldElements.MinWaypoints] = true, [EvolutionFieldElements.MaxWaypoints] = true, [EvolutionFieldElements.MeanWaypoints] = true, [EvolutionFieldElements.MinJunctures] = true, [EvolutionFieldElements.MaxJunctures] = true, [EvolutionFieldElements.MeanJunctures] = true, [EvolutionFieldElements.MinTrajectoryFacingOpenings] = true, [EvolutionFieldElements.MaxTrajectoryFacingOpenings] = true, [EvolutionFieldElements.MeanTrajectoryFacingOpenings] = true, [EvolutionFieldElements.MinHeight] = true, [EvolutionFieldElements.MaxHeight] = true, [EvolutionFieldElements.MeanHeight] = true, [EvolutionFieldElements.MinWidth] = true, [EvolutionFieldElements.MaxWidth] = true, [EvolutionFieldElements.MeanWidth] = true }; // Read in the number of batches between population logging _populationLoggingBatchInterval = XmlUtils.TryGetValueAsInt(xmlConfig, "PopulationLoggingBatchInterval"); }