-
Notifications
You must be signed in to change notification settings - Fork 0
/
PPC.hpp
40 lines (33 loc) · 1.06 KB
/
PPC.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#ifndef PPC_H
#define PPC_H
#include <fstream>
#include "Rand.hpp"
#include "SHCWeightCollection.hpp"
#include "GEPNN.hpp"
#include "CfgFile.hpp"
#include "ProbabilisticModelElement.hpp"
class PrototypeChromosome
{
private:
int num_functions, tail_length, weight_domain_length, gene_length, head_tail_length;
ProbabilisticModelElement **elements;
static CfgFile *config;
public:
static void set_config( CfgFile& cfg );
PrototypeChromosome();
~PrototypeChromosome();
void print( std::ostream &fout );
void init();
bool in_use( int offset, int position );
double get_probability( GepNN *gep );
void normalize( GepNN *gep );
void pipe_adapt( GepNN *gep, int fitness_best, int fitness_elite );
void pbil_adapt( GepNN *gep );
void pipe_increment( GepNN *gep );
void pipe_mutate( GepNN *gep, RandomNumberGenerator& rng );
void pbil_increment( GepNN *gep );
void pbil_mutate( GepNN *gep, RandomNumberGenerator& rng );
void guided_mutation( GepNN *gep, GepNN *new_gep, RandomNumberGenerator& rng );
GepNN* get_genotype( RandomNumberGenerator& rng );
};
#endif