My Project
ratingEnv.cc
Go to the documentation of this file.
1/* ratingEnv.cc
2 */
7
9RatingEnv::update(const NumEffectState& new_state, Move last_move)
10{
11 history.push(last_move);
12 make(new_state);
13}
14
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
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:
圧縮していない moveの表現 .
利きを持つ局面
const PieceMask pin(Player king) const
駒番号のビットセット.
Definition pieceMask.h:21
Player turn() const
Square kingSquare() const
Definition simpleState.h:94
void make(const NumEffectState &new_state)
Definition ratingEnv.cc:32
void update(const NumEffectState &new_state, Move last_move)
Definition ratingEnv.cc:9
constexpr Player alt(Player player)
Definition basic_type.h:13
玉の周囲5x3の領域の利きの数と持駒から計算した進行度.
Definition effect5x3.h:27
static const Progress16 progress16(int progress)
0-15 の値を返す
Definition effect5x3.h:54