Class to represent the Novelty Search Algorithm This specialization is exclusively for EIG because it uses the vector of features of each generated instance to compute novelty.
More...
#include <NSFeatures.h>
|
| NSFeatures (unique_ptr< Distance< float >> dist, const float &threshold=2000, const float &finalThresh=2000, const int &k=15, bool warmUp=false) |
| Construct a new NSFeatures<S>::NSFeatures object If warmUp is set, the NS archive is initialised with random points from the KP space. More...
|
|
virtual json | to_json () override |
| Generates a json object with the relevant information of the class. More...
|
|
| NoveltySearch (unique_ptr< Distance< float >> dist, const float &threshold=2000, const float &finalThresh=0.0001, const int &k=15) |
| Creates a new Novelty Search instance. More...
|
|
Front< S > | getResults () override |
| Returns the results obtained by the Novelty Search in a Front object. More...
|
|
vector< S > | run (vector< S > &population, const Problem< S > *problem) override |
| Novelty Search Algorithm It looks for novelty using the genotypes of the individuals in the population. Computes the sparseness of each individual in the noveltyArchive and population. More...
|
|
virtual void | cmpFinals (vector< S > &population, const Problem< S > *problem=nullptr) |
| Compares the individuals in the population against the neighbors inside the archive of final Ss. If the score is good enough the individual will be included inside the archive of final solutions. More...
|
|
virtual void | insertIntoArchive (const S &solution) |
| Method to insert a new individual into the noveltyArchive of novelty solutions. More...
|
|
const vector< S > & | getArchive () const |
|
float | getThreshold () const |
|
float | getK () const |
|
float | getFinalThresh () const |
|
| Search ()=default |
| Constructs a default Search.
|
|
|
virtual vector< Descriptor > | beforeRun (const vector< S > &population) override |
| Performs computational work necessary for running the NS This method creates a combined population using the individuals from the NS archive and the population. The resulting vector contains the features of each individual. More...
|
|
virtual vector< Descriptor > | beforeCmpFinals (const vector< S > &population) override |
|
virtual void | insertFinal (const S &solution) override |
| Method to insert a new individual into the noveltyArchive of novelty Ss. More...
|
|
|
bool | warmed |
|
unique_ptr< Distance< float > > | distance |
|
vector< S > | noveltyArchive |
|
vector< S > | finalSs |
|
vector< Descriptor > | finalSsDesc |
|
float | threshold |
|
float | finalSThreshold |
|
int | k |
|
template<typename S>
class NSFeatures< S >
Class to represent the Novelty Search Algorithm This specialization is exclusively for EIG because it uses the vector of features of each generated instance to compute novelty.
- Template Parameters
-
◆ NSFeatures()
template<typename S >
NSFeatures< S >::NSFeatures |
( |
unique_ptr< Distance< float >> |
dist, |
|
|
const float & |
threshold = 2000 , |
|
|
const float & |
finalThresh = 2000 , |
|
|
const int & |
k = 15 , |
|
|
bool |
warmUp = false |
|
) |
| |
|
explicit |
Construct a new NSFeatures<S>::NSFeatures object If warmUp is set, the NS archive is initialised with random points from the KP space.
- Template Parameters
-
- Parameters
-
dist | |
iterations | |
threshold | |
k | |
warmUp | |
◆ beforeRun()
template<typename S >
vector< Descriptor > NSFeatures< S >::beforeRun |
( |
const vector< S > & |
population | ) |
|
|
overrideprotectedvirtual |
Performs computational work necessary for running the NS This method creates a combined population using the individuals from the NS archive and the population. The resulting vector contains the features of each individual.
- Template Parameters
-
- Parameters
-
Reimplemented from NoveltySearch< S >.
◆ insertFinal()
template<typename S >
void NSFeatures< S >::insertFinal |
( |
const S & |
solution | ) |
|
|
overrideprotectedvirtual |
Method to insert a new individual into the noveltyArchive of novelty Ss.
- Template Parameters
-
- Parameters
-
Reimplemented from NoveltySearch< S >.
◆ to_json()
Generates a json object with the relevant information of the class.
- Template Parameters
-
- Returns
- json
Reimplemented from NoveltySearch< S >.
The documentation for this class was generated from the following file: