GEGELATI

Loading...
Searching...
No Matches
Public Member Functions | List of all members
Log::CycleDetectionLALogger Class Reference

Detector for connected cycles in TPGs. More...

`#include <cycleDetectionLALogger.h>`

Inheritance diagram for Log::CycleDetectionLALogger:

## Public Member Functions
| CycleDetectionLALogger (Learn::LearningAgent &la, std::ostream &out=std::cerr, bool logOnSuccess=false)
| Same constructor as LALogger. Default output is cerr.
virtual void | logHeader () override
| Does nothing in this logger.
virtual void | logNewGeneration (uint64_t &generationNumber) override
| Does nothing in this logger.
virtual void | logAfterPopulateTPG () override
| Checks the presence of directed cyclic path in the TPG. Loggs an output if there is one.
virtual void | logAfterEvaluate (std::multimap< std::shared_ptr< Learn::EvaluationResult >, const TPG::TPGVertex * > &results) override
| Does nothing in this logger.
virtual void | logAfterDecimate () override
| Does nothing in this logger.
virtual void | logAfterValidate (std::multimap< std::shared_ptr< Learn::EvaluationResult >, const TPG::TPGVertex * > &results) override
| Logs the min, avg and max score of the generation.
virtual void | logEndOfTraining () override
| Does nothing in this logger.
Public Member Functions inherited from Log::LALogger
| LALogger (Learn::LearningAgent &la, std::ostream &out=std::cout)
| Constructor defining a given output and setting start and checkpoint as now. Default output is cout.
void | chronoFromNow ()
| Updates checkpoint to now.
Public Member Functions inherited from Log::Logger
| Logger (std::ostream &out=std::cout)
| Constructor initializing a specific output. Default is cout.
virtual | ~Logger ()=default
| Virtual default destructor for polyphormism support.
Logger | operator<< (std::ostream &(*manip)(std::ostream &))
| << operator to manipulate stream and enter stream-specific elements (like std::endl).
template<typename T >
Logger | operator<< (const T &val)
| << operator allowing to log elements that ostream actually accepts (char, int...).

## Additional Inherited Members
Public Attributes inherited from Log::LALogger
bool | doValidation = false
bool | useUtility = false
Protected Member Functions inherited from Log::LALogger
double | getDurationFrom (const std::chrono::time_point< std::chrono::system_clock, std::chrono::nanoseconds > &begin) const
| Computes the duration from a given time to now.
std::chrono::time_point< std::chrono::system_clock, std::chrono::nanoseconds > | getTime () const
| Gets the current time value, for example to set checkpoint.
Protected Attributes inherited from Log::LALogger
std::shared_ptr< std::chrono::time_point< std::chrono::system_clock, std::chrono::nanoseconds > > const | start
std::shared_ptr< std::chrono::time_point< std::chrono::system_clock, std::chrono::nanoseconds > > | checkpoint
double | mutationTime = 0
double | evalTime = 0
double | validTime = 0
double | decimationTime = 0
Learn::LearningAgent & | learningAgent
| LearningAgent logged by the LALogger.

## Detailed Description

Detector for connected cycles in TPGs.

This utility class implement a depth-first search algorithm for detecting the presence of directed cyclic paths in TPGs.

## Constructor & Destructor Documentation

## ◆ CycleDetectionLALogger()

Log::CycleDetectionLALogger::CycleDetectionLALogger | ( | Learn::LearningAgent & | la,
|  | std::ostream & | out = std::cerr,
|  | bool | logOnSuccess = false )
| inline explicit

Same constructor as LALogger. Default output is cerr.

Parameters

  [in] | la | LearningAgent whose TPG will be analyzed by the CycleDetectionLALogger.
  [in] | out | The output stream the logger will send elements to.
  [in] | logOnSuccess | When true, the logger will log the absence of cycles.

## Member Function Documentation

## ◆ logAfterDecimate()

void Log::CycleDetectionLALogger::logAfterDecimate | ( |  | ) |
| override virtual

Does nothing in this logger.

Inherited via LaLogger.

Implements Log::LALogger.

## ◆ logAfterEvaluate()

void Log::CycleDetectionLALogger::logAfterEvaluate | ( | std::multimap< std::shared_ptr< Learn::EvaluationResult >, const TPG::TPGVertex * > & | results | ) |
| override virtual

Does nothing in this logger.

Inherited via LaLogger.

Parameters

  [in] | results | scores of the evaluation.

Implements Log::LALogger.

## ◆ logAfterPopulateTPG()

void Log::CycleDetectionLALogger::logAfterPopulateTPG | ( |  | ) |
| override virtual

Checks the presence of directed cyclic path in the TPG. Loggs an output if there is one.

Inherited via LALogger.

Implements Log::LALogger.

## ◆ logAfterValidate()

void Log::CycleDetectionLALogger::logAfterValidate | ( | std::multimap< std::shared_ptr< Learn::EvaluationResult >, const TPG::TPGVertex * > & | results | ) |
| override virtual

Logs the min, avg and max score of the generation.

Inherited via LaLogger.

If doValidation is true, no eval results are logged so that the logger can only show validation results.

Parameters

  [in] | results | scores of the validation.

Implements Log::LALogger.

## ◆ logEndOfTraining()

void Log::CycleDetectionLALogger::logEndOfTraining | ( |  | ) |
| override virtual

Does nothing in this logger.

Inherited via LaLogger

Implements Log::LALogger.

## ◆ logHeader()

void Log::CycleDetectionLALogger::logHeader | ( |  | ) |
| override virtual

Does nothing in this logger.

Inherited via LALogger

Copyright or © or Copr. IETR/INSA - Rennes (2022) :

Karol Desnos kdesn.nosp@m.os@i.nosp@m.nsa-r.nosp@m.enne.nosp@m.s.fr (2022)

GEGELATI is an open-source reinforcement learning framework for training artificial intelligence based on Tangled Program Graphs (TPGs).

This software is governed by the CeCILL-C license under French law and abiding by the rules of distribution of free software. You can use, modify and/ or redistribute the software under the terms of the CeCILL-C license as circulated by CEA, CNRS and INRIA at the following URL "http://www.cecill.info".

As a counterpart to the access to the source code and rights to copy, modify and redistribute granted by the license, users are provided only with a limited warranty and the software's author, the holder of the economic rights, and the successive licensors have only limited liability.

In this respect, the user's attention is drawn to the risks associated with loading, using, modifying and/or developing or reproducing the software by the user in light of its specific status of free software, that may mean that it is complicated to manipulate, and that also therefore means that it is reserved for developers and experienced professionals having in-depth computer knowledge. Users are therefore encouraged to load and test the software's suitability as regards their requirements in conditions enabling the security of their systems and/or data to be ensured and, more generally, to use and operate it in the same conditions as regards security.

The fact that you are presently reading this means that you have had knowledge of the CeCILL-C license and that you accept its terms.

Implements Log::LALogger.

## ◆ logNewGeneration()

void Log::CycleDetectionLALogger::logNewGeneration | ( | uint64_t & | generationNumber | ) |
| override virtual

Does nothing in this logger.

Inherited via LALogger.

Implements Log::LALogger.

The documentation for this class was generated from the following files:

- D:/a/gegelati/gegelati/gegelatilib/include/log/cycleDetectionLALogger.h
- D:/a/gegelati/gegelati/gegelatilib/src/log/cycleDetectionLALogger.cpp