21 template <
typename GeneType>
60 console_logger_m = std::make_unique<utils::ConsoleLogger<GeneType>>(interval);
69 file_logger_m = std::make_unique<utils::FileLogger<GeneType>>(path, interval);
Abstract base class for all optimization algorithms.
std::unique_ptr< utils::ConsoleLogger< GeneType > > console_logger_m
std::unique_ptr< utils::FileLogger< GeneType > > file_logger_m
void notifyLoggers(std::size_t gen, const Population< GeneType > &pop)
Notifies all active loggers to record the current state.
virtual void enableLogging(const std::string &)
Placeholder for generic logging configuration.
virtual ~Algorithm()=default
virtual void enableConsoleLogging(const std::size_t interval)
Enables logging of progress to the standard output.
virtual void run(Population< GeneType > &population)=0
Executes the optimization process on the given population.
virtual void enableFileLogging(const std::string &path, std::size_t interval)
Enables logging of population snapshots to a CSV file.
A container for a group of individuals in the genetic algorithm.