-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathhoo.hh
65 lines (46 loc) · 971 Bytes
/
hoo.hh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
/*
* Code by Chris Mansley
*/
#ifndef HOO_HH
#define HOO_HH
/* Definition dependencies */
#include <gsl/gsl_rng.h>
#include <gsl/gsl_randist.h>
#include "domain.hh"
#include "chopper.hh"
#include "action.hh"
class Node;
class HOO
{
public:
/** Constructor */
HOO(Domain *d, Chopper *c);
/** Destructor */
~HOO();
/** Insert a selected action and value */
void insertAction(Action a, double q);
/** Return current best action */
Action queryAction(bool greedy);
/** Destroy structure */
void clear();
void print();
private:
/** Current HOO domain */
Domain *domain;
/** Current chopper */
Chopper *chopper;
/** For randomness */
gsl_rng *rng;
/** HOO Tree */
Node *tree;
/** Total number of samples to date */
int totalSamples;
/** Number of action dimensions */
int numDim;
/** HOO parameters */
double v1;
double rho;
/** Allow Node to access HOO */
friend class Node;
};
#endif // HOO_HH