2 ////////////////////////////////////////////////////////////////////////////////
3 // This program is free software; you can redistribute it and/or //
4 // modify it under the terms of the GNU General Public License //
5 // version 2 as published by the Free Software Foundation. //
7 // This program is distributed in the hope that it will be useful, but //
8 // WITHOUT ANY WARRANTY; without even the implied warranty of //
9 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //
10 // General Public License for more details. //
12 // Written and (C) by François Fleuret //
13 // Contact <francois.fleuret@epfl.ch> for comments & bug reports //
14 ////////////////////////////////////////////////////////////////////////////////
16 // $Id: intelligence.h,v 1.20 2006-07-26 06:52:30 fleuret Exp $
19 #include "approximer.h"
20 #include "manipulator.h"
25 Manipulator *_manipulator;
26 int _max_memory_tick, _memory_tick;
27 scalar_t *_memory, *_rewards;
29 MappingApproximer **_q_predictors;
30 int _nb_weak_learners;
32 Intelligence(Map *input, Manipulator *manipulator, int max_memory_tick, int nb_weak_learners);
34 void load(istream &is);
35 void save(ostream &os);
36 void update(int last_action, scalar_t last_reward);
37 void save_memory(char *filename);
38 void load_memory(char *filename);
39 void learn(scalar_t proportion_for_training);