⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 relearningscheme.h

📁 - XCS for Dynamic Environments + Continuous versions of XCS + Test problem: real multiplexer +
💻 H
字号:
/*	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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -