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

📄 learn.c

📁 这个代码是policy iteration算法关于强化学习的. 请您用winzip 解压缩
💻 C
字号:


#include <stdlib.h>
#include <stdio.h>
#include <math.h>


#ifdef PGRL_NO_FA
#include "lrn_DirectQ.h"
#endif

#ifdef PGRL_FA
#include "lrn_PIFA.h"
#endif

#include "learn.h"
#include "misc.h"



extern int step;
double **s_hist;
extern double **gauss_center, **gauss_var, **g_hist;
extern int *mode_hist;
extern double *r;


double alpha = 0.01;
double gam = 0.999;

void learn(void)
{
#ifdef PGRL_NO_FA
	PGRL_DirectQ(step, s_hist, g_hist, gauss_center, gauss_var, mode_hist, alpha, gam, r);
#endif
#ifdef PGRL_FA
	PGRL_PIFA(step,s_hist, g_hist, gauss_center, gauss_var, mode_hist, alpha, gam, r);
#endif
}


void Initialize_Learning(void)
{
#ifdef PGRL_NO_FA
	Initialize_PGRL_DirectQ();
#endif
#ifdef PGRL_FA
	Initialize_PGRL_PIFA();
#endif
}

⌨️ 快捷键说明

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