4#include "../Algorithm.h"
5#include "../bitstring/BitString.h"
10#include "Classifier.h"
11#include "ClassifierParams.h"
12#include "Environment.h"
38 SelectionOperatorP selRandomOp, selWorstOp, selFitPropOp;
41 void test (DemeP deme);
43 unsigned long long int time;
44 std::vector<ClassifierP> populationSet;
45 EnvironmentP environment;
49 std::vector<ClassifierP> generateMatchSet(StateP state, DemeP deme, GenotypeP input);
50 ClassifierP cover (StateP state, DemeP deme, GenotypeP input, std::vector<ClassifierP> matchSet);
51 std::map<int, double> generatePA(std::vector<ClassifierP> matchSet);
52 int selectActionId(StateP state, std::map<int, double> PA);
53 std::vector<ClassifierP> generateActionSet(std::vector<ClassifierP> matchSet,
int actionId);
54 void updateActionSet(std::vector<ClassifierP> actionSet, DemeP deme,
double reward, StateP state);
55 void runGA(std::vector<ClassifierP> actionSet, GenotypeP input, DemeP deme, StateP state);
57 void printPopulation();
58 std::pair<int, double> getMaxFromPA(std::map<int, double> PA);
59 std::set<int> getActionsFromMs (std::vector<ClassifierP> matchSet);
60 double getAsTimeSum(std::vector<ClassifierP> as);
62 void deleteFromPopulation(StateP state, DemeP deme);
63 void actionSetSubsumption(std::vector<ClassifierP> *actionSet, DemeP deme, StateP state);
64 void removeFromPopSet(ClassifierP cl, DemeP deme);
66typedef boost::shared_ptr<XCS> XCSP;
bool advanceGeneration(StateP state, DemeP deme)
Perform a single generation on a single deme.
bool initialize(StateP state)
Initialize the algorithm, read parameters from the system, do a sanity check.
void registerParameters(StateP state)
Register algorithm's parameters (if any).