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 ////////////////////////////////////////////////////////////////////////////////
17 #include "approximer.h"
18 #include "manipulator.h"
23 Manipulator *_manipulator;
24 int _max_memory_tick, _memory_tick;
25 scalar_t *_memory, *_rewards;
27 MappingApproximer **_q_predictors;
28 int _nb_weak_learners;
30 Intelligence(Map *input, Manipulator *manipulator, int max_memory_tick, int nb_weak_learners);
32 void load(istream &is);
33 void save(ostream &os);
34 void update(int last_action, scalar_t last_reward);
35 void save_memory(char *filename);
36 void load_memory(char *filename);
37 void learn(scalar_t proportion_for_training);