ratingEnv.cc
Go to the documentation of this file.
1 /* ratingEnv.cc
2  */
3 #include "osl/rating/ratingEnv.h"
7 
8 void osl::rating::
9 RatingEnv::update(const NumEffectState& new_state, Move last_move)
10 {
11  history.push(last_move);
12  make(new_state);
13 }
14 
15 void osl::rating::
17  const PieceMask& my_pin, const PieceMask& op_pin, Progress16 progress)
18 {
19  sendoffs.clear();
20  const Square king_position = state.kingSquare(alt(state.turn()));
21  effect_util::SendOffSquare::find(state.turn(), state, king_position,
22  sendoffs);
23  this->my_pin = my_pin;
24  this->op_pin = op_pin;
25  this->progress = progress;
26  attack_count_for_turn = DefenseKing8::count(state);
27  counteffect2_cache.fill(-1);
28  pattern_cache.fill(-1);
29 }
30 
31 void osl::rating::
33 {
34  progress::Effect5x3 progress(state);
35  make(state,
36  state.pin(state.turn()),
37  state.pin(alt(state.turn())),
38  progress.progress16());
39 }
40 
41 /* ------------------------------------------------------------------------- */
42 // ;;; Local Variables:
43 // ;;; mode:c++
44 // ;;; c-basic-offset:2
45 // ;;; End:
constexpr Player alt(Player player)
Definition: basic_type.h:13
const PieceMask pin(Player king) const
static const Progress16 progress16(int progress)
0-15 の値を返す
Definition: effect5x3.h:54
ProgressN< 16 > Progress16
Definition: progress.h:42
Square kingSquare() const
Definition: simpleState.h:94
void update(const NumEffectState &new_state, Move last_move)
Definition: ratingEnv.cc:9
圧縮していない moveの表現 .
Definition: basic_type.h:1051
駒番号のビットセット.
Definition: pieceMask.h:20
Player turn() const
Definition: simpleState.h:220
利きを持つ局面
void make(const NumEffectState &new_state)
Definition: ratingEnv.cc:32
玉の周囲5x3の領域の利きの数と持駒から計算した進行度.
Definition: effect5x3.h:26