26 #include <opencog/util/dorepeat.h>
27 #include <opencog/util/random.h>
44 const float FITNESS_PARAM = 0.9;
55 Handle create_bindLink(
Handle himplicant,
bool is_quoted =
false)
56 throw (opencog::InvalidParamException);
66 string get_unique_name(
Handle& h);
83 void get_root_links(Handle h,
HandleSeq& parents);
91 Type tournament_select(map<
Type,
float> tfitnes_map) {
93 if (tfitnes_map.empty())
99 size_t pick_size = std::max(static_cast<size_t>(1),
100 tfitnes_map.size() / 2);
101 multimap<float, Type> winners;
104 auto el = rand_element(tfitnes_map);
105 winners.insert( { el.second, el.first });
107 return winners.rbegin()->second;
120 float tv_fitness(
Handle h);
std::vector< Handle > HandleSeq
a list of handles
unsigned short Type
type of Atoms, represented as short integer (16 bits)