46 void update(vector<size_t> survivors);
60 string print_eqns(
bool just_offspring=
false,
string sep=
"\n");
89 void save(
string filename);
91 void load(
string filename);
individual programs in the population
NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE(Archive, individuals)
holds the hyperparameters for Feat.
check for same fitness and complexity to filter uniqueness.
SameFitComplexity(Population &p)
bool operator()(size_t i, size_t j)
Sort population in increasing complexity.
bool operator()(size_t i, size_t j)
SortComplexity(Population &p)
Defines a population of programs and functions for constructing them.
void load(string filename)
void add(Individual &)
adds a program to the population.
const Individual operator[](size_t i) const
setting and getting from individuals vector
void update(vector< size_t > survivors)
reduce programs to the indices in survivors.
string print_eqns(bool just_offspring=false, string sep="\n")
return population equations.
int size()
returns population size
vector< size_t > sorted_front(unsigned)
return complexity-sorted Pareto front indices.
void resize(int pop_size)
update individual vector size
void init(const Individual &starting_model, const Parameters ¶ms, bool random=false, string filename="")
initialize population of programs with a starting model and/or from file
vector< Individual > individuals
individual programs
void save(string filename)