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
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;
27 counteffect2_cache.fill(-1);
28 pattern_cache.fill(-1);
29}
30
33{
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
static int count(const NumEffectState &state)
void make(const NumEffectState &new_state)
Definition ratingEnv.cc:32
CArray< signed char, Square::SIZE > counteffect2_cache
Definition ratingEnv.h:23
void update(const NumEffectState &new_state, Move last_move)
Definition ratingEnv.cc:9
CArray< int, Square::SIZE > pattern_cache
Definition ratingEnv.h:24
ProgressN< 16 > Progress16
Definition progress.h:42
constexpr Player alt(Player player)
Definition basic_type.h:13
static SendOff8 find(const NumEffectState &state, Square king_position, Square8 &out)
玉の周囲5x3の領域の利きの数と持駒から計算した進行度.
Definition effect5x3.h:27