/// <summary> /// Logs the static maze genomes on which all initialization evaluations will be conducted. /// </summary> /// <param name="initializationMazeGenomes">The initialization maze genomes to log.</param> /// <param name="mazeGenomeDataLogger">The maze data logger.</param> public void LogStartingMazeGenomes(List <MazeGenome> initializationMazeGenomes, IDataLogger mazeGenomeDataLogger) { // Open the logger mazeGenomeDataLogger?.Open(); // Write the header mazeGenomeDataLogger?.LogHeader(new List <LoggableElement> { new LoggableElement(PopulationFieldElements.Generation, null), new LoggableElement(PopulationFieldElements.GenomeId, null), new LoggableElement(PopulationFieldElements.SpecieId, null) }); // Write the genome XML for all initialization genomes foreach (MazeGenome mazeGenome in initializationMazeGenomes) { // Write the genome XML mazeGenomeDataLogger?.LogRow(new List <LoggableElement> { new LoggableElement(PopulationFieldElements.Generation, mazeGenome.BirthGeneration), new LoggableElement(PopulationFieldElements.GenomeId, mazeGenome.Id), new LoggableElement(PopulationFieldElements.SpecieId, mazeGenome.SpecieIdx) }); } }
/// <inheritdoc /> /// <summary> /// Initializes the logger and writes header. /// </summary> /// <param name="evaluationLogger">The evaluation logger.</param> public void Initialize(IDataLogger evaluationLogger) { // Set the run phase evaluationLogger?.UpdateRunPhase(RunPhase.Primary); // Log the header evaluationLogger?.LogHeader(new List <LoggableElement> { new LoggableElement(EvaluationFieldElements.Generation, 0), new LoggableElement(EvaluationFieldElements.EvaluationCount, EvaluationCount), new LoggableElement(EvaluationFieldElements.StopConditionSatisfied, StopConditionSatisfied), new LoggableElement(EvaluationFieldElements.RunPhase, RunPhase.Initialization), new LoggableElement(EvaluationFieldElements.IsViable, false) }, _multiMazeWorldFactory.CreateMazeNavigationWorld(new MazeStructure(0, 0, 1), null).GetLoggableElements()); }