relearningscheme.h

来自「- XCS for Dynamic Environments + Conti」· C头文件 代码 · 共 58 行

H
58
字号
/*	XCSR_DE1.0
*	--------------------------------------------------------
*	Learning classifier system based on accuracy in dynamic environments
*
*	by  Huong Hai (Helen) Dam
*	z3140959@itee.adfa.edu.au
*	UNSW @ ADFA, Canberra Australia
*	Artificial Life and Adaptive Robotics Laboratory
*	http://www.itee.adfa.edu.au/~alar
*
*	Last modified: 24-11-2005
*
*/
#ifndef AOC_H
#define AOC_H

#include <iostream.h>
#include <fstream.h>
#include "classifier.h"
#include "population.h"
#include "declare.h"
#include "ga.h"
class ReLearningScheme
{
private:
	int rep_type;
	int maxpopsize;
	Random *random;
	int *matchset;
	int *actset;
	double parray[NACTION + 1];
	int naset;
	int nmset;
	int num_cover;
	double beta;
public:
	ReLearningScheme(int rand, int type, int maxpop);
	void getPredictionArray(Population *pop);
	int getMatchSet(Population *pop,  input_t *input);
	int formMatchSet(Population *pop, input_t *input);
	int formActionSet(Population *pop, int action);
	int returnActionSet(int *set);
	int getActionWinner(Population *pop);
	int getRandomAction(Population *pop);
	int performanceComponent(GA *ga, Population *pop, input_t *input);
	int getXCSOutput(Population *pop, input_t *input);
	Classifier* covering(Population *pop,input_t *input, int action, int type);
	void resetCoveringCounter(){num_cover = 0;}
	int getCoveringCounter(){return num_cover;}	
	void adjustActionSet(Population *pop,  double reward);
	void updateFitness(Population *pop);
	double getAvgSystemError(int action, double reward);
	void setFastLearningRate(int);
	void adaptLearningRate(double, double);
	void reinforcementReport();
};
#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?