My Project
eval/progress.h
Go to the documentation of this file.
1 #ifndef EVAL_ML_PROGRESS_H
2 #define EVAL_ML_PROGRESS_H
3 
4 #include "osl/progress.h"
5 #include "osl/eval/weights.h"
6 
7 namespace osl
8 {
9  namespace eval
10  {
11  namespace ml
12  {
14  {
15  public:
16  enum { DIM = 256 };
17  static int eval(Progress16 black, Progress16 white);
18  static void setUp(const Weights &weights);
19  private:
20  static int index(Progress16 black, Progress16 white)
21  {
22  return black.value() * 16 + white.value();
23  }
25  };
27  {
28  public:
29  enum { DIM = 256 };
30  static int eval(Progress16 black_attack, Progress16 white_defense,
31  Progress16 white_attack, Progress16 black_defense);
32  static void setUp(const Weights &weights);
33  private:
34  static int index(Progress16 attack, Progress16 defense)
35  {
36  return attack.value() * 16 + defense.value();
37  }
39  };
40 
42  {
43  public:
44  enum { DIM = 65536 };
45  static int eval(Progress16 black_attack,
46  Progress16 white_defense,
47  Progress16 white_attack, Progress16 black_defense);
48  static void setUp(const Weights &weights);
49  private:
50  static int index(Progress16 black_attack, Progress16 white_defense,
51  Progress16 white_attack, Progress16 black_defense)
52  {
53  return white_attack.value() +
54  16 * (black_defense.value() +
55  16 * (black_attack.value() * 16 + white_defense.value()));
56  }
58  };
59  }
60  }
61 }
62 
63 #endif // EVAL_ML_PROGRESS_H
64 // ;;; Local Variables:
65 // ;;; mode:c++
66 // ;;; c-basic-offset:2
67 // ;;; End:
68 
static CArray< int, 65536 > table
Definition: eval/progress.h:57
static void setUp(const Weights &weights)
static int index(Progress16 black_attack, Progress16 white_defense, Progress16 white_attack, Progress16 black_defense)
Definition: eval/progress.h:50
static int eval(Progress16 black_attack, Progress16 white_defense, Progress16 white_attack, Progress16 black_defense)
static CArray< int, 256 > table
Definition: eval/progress.h:38
static int index(Progress16 attack, Progress16 defense)
Definition: eval/progress.h:34
static int eval(Progress16 black_attack, Progress16 white_defense, Progress16 white_attack, Progress16 black_defense)
static void setUp(const Weights &weights)
static CArray< int, 256 > table
Definition: eval/progress.h:24
static int eval(Progress16 black, Progress16 white)
Definition: eval_progress.cc:5
static void setUp(const Weights &weights)
static int index(Progress16 black, Progress16 white)
Definition: eval/progress.h:20
ProgressN< 16 > Progress16
Definition: progress.h:42