All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
simplePredictor.h
Go to the documentation of this file.
1 /* simplePredictor.h
2  */
3 #ifndef _SIMPLE_PREDICTOR_H
4 #define _SIMPLE_PREDICTOR_H
6 #include "osl/player.h"
7 
8 namespace osl
9 {
10  namespace enter_king
11  {
12  // 入玉を予測/判定
13  // 宣言法での入玉予測/判定は名前の末尾に27 をつけている
14  static const int winning_threshold_black = 24;
15  static const int winning_threshold_white = 24;
16  static const int winning_threshold_black_27 = 28;
17  static const int winning_threshold_white_27 = 27;
18 
20  public:
21  template<Player Turn>
22  double getProbability(const osl::state::NumEffectState& state);
23  double getProbability(const osl::state::NumEffectState& state, const Player Turn);
24 
25  template<Player Turn>
26  double getProbability27(const osl::state::NumEffectState& state);
27  double getProbability27(const osl::state::NumEffectState& state, const Player Turn);
28 
29  template <Player Turn>
30  bool predict(const osl::state::NumEffectState& state, double threshold=0.5);
31  bool predict(const osl::state::NumEffectState& state, const Player Turn, double threshold=0.5);
32 
33  template <Player Turn>
34  bool predict27(const osl::state::NumEffectState& state, double threshold=0.5);
35  bool predict27(const osl::state::NumEffectState& state, const Player Turn, double threshold=0.5);
36  };
37  } //namespace enter_king
38 } //namespace osl
39 #endif /* _SIMPLE_PREDICTOR_H */
40 // ;;; Local Variables:
41 // ;;; mode:c++
42 // ;;; c-basic-offset:2
43 // ;;; End: