|
GEGELATI
|
Selection class that will do a selection with a truncation. This is the classic selection methods used in the earliest works of TPGs. More...
#include <truncationSelector.h>
Public Member Functions | |
| TruncationSelector (std::shared_ptr< TPG::TPGGraph > graph, const Learn::LearningParameters ¶ms) | |
| Constructor for Selector. | |
| virtual void | doSelection (std::multimap< std::shared_ptr< Learn::EvaluationResult >, const TPG::TPGVertex * > &results, Mutator::RNG &rng) override |
| override of doSelection method | |
Public Member Functions inherited from Selector::Selector | |
| Selector (std::shared_ptr< TPG::TPGGraph > graph, const Learn::LearningParameters ¶ms) | |
| Constructor for Selector. | |
| virtual void | launchSelection (std::multimap< std::shared_ptr< Learn::EvaluationResult >, const TPG::TPGVertex * > &results, Mutator::RNG &rng) |
| This method execute the doSelection method. | |
| virtual std::shared_ptr< SelectionMetrics > | createSelectionMetrics () |
| virtual void | keepBestPolicy () |
| This method keeps only the bes tRoot policy in the TPGGraph. | |
| virtual void | updateEvaluationRecords (const std::multimap< std::shared_ptr< Learn::EvaluationResult >, const TPG::TPGVertex * > &results) |
| Update the bestRoot and resultsPerRoot attributes. | |
| virtual void | updateResultsPerRoot (const std::multimap< std::shared_ptr< Learn::EvaluationResult >, const TPG::TPGVertex * > &results) |
| Update the resultsPerRoot. | |
| virtual void | updateBestRoot (const std::multimap< std::shared_ptr< Learn::EvaluationResult >, const TPG::TPGVertex * > &results) |
| Update the bestRoot attribute. | |
| virtual const std::pair< const TPG::TPGVertex *, std::shared_ptr< Learn::EvaluationResult > > & | getBestRoot () const |
| Get the best root TPG::Vertex encountered since the last init. | |
| virtual std::shared_ptr< TPG::TPGGraph > | getGraph () |
| Getter for the TPGGraph built by the LearningAgent. | |
| virtual void | forgetPreviousResults () |
| This method resets the previous registered scores per root. | |
| virtual const std::map< const TPG::TPGVertex *, std::shared_ptr< Learn::EvaluationResult > > & | getResultsPerRoot () const |
| Return the resultsPerRoot map. | |
| virtual const SelectionContext & | updateContext () |
| Update the SelectionContext structure and return it. | |
| virtual void | updateAfterPopulate () |
| Method to call at the end of TPGMutator::populateTPG. | |
Additional Inherited Members | |
Protected Attributes inherited from Selector::Selector | |
| std::shared_ptr< TPG::TPGGraph > | graph |
| TPGGraph on which the TPGVertex can be selected or deleted. | |
| const Learn::LearningParameters & | params |
| Parameters for the selection. | |
| std::pair< const TPG::TPGVertex *, std::shared_ptr< Learn::EvaluationResult > > | bestRoot {nullptr, nullptr} |
| std::map< const TPG::TPGVertex *, std::shared_ptr< Learn::EvaluationResult > > | resultsPerRoot |
| Map associating root TPG::TPGVertex to their EvaluationResult. | |
| SelectionContext | context |
| context used by the TPGMutator to populate the TPGGraph. | |
Selection class that will do a selection with a truncation. This is the classic selection methods used in the earliest works of TPGs.
|
inline |
|
overridevirtual |
override of doSelection method
Removed the worst agents from the population with a truncation process where the worst proportion set in the parameters is deleted.
| [in,out] | results | a multimap containing root TPGVertex associated to their score during an evaluation. |
| [in] | rng | Random Number Generator used in the mutation process. |
Copyright or © or Copr. IETR/INSA - Rennes (2025) :
Quentin Vacher qvach.nosp@m.er@i.nosp@m.nsa-r.nosp@m.enne.nosp@m.s.fr (2025)
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.
Reimplemented from Selector::Selector.