3 #ifndef EVAL_MINORPIECEBONUS_H
4 #define EVAL_MINORPIECEBONUS_H
9 #include <boost/static_assert.hpp>
39 result -= (black_pawn - 1) * progress16.value() *
42 else if (black_pawn == 0 && black_pawn_total < white_pawn_total)
48 result -= (black_pawn - 8) * progress16.value() *
53 result += (white_pawn - 1) * progress16.value() *
56 else if (white_pawn == 0 && white_pawn_total < black_pawn_total)
62 result += (white_pawn - 8) * progress16.value() *
103 if (white_knight > 1)
107 if (white_knight > 2)
122 else if (white_gold >= 3)
145 i < PtypeTraits<PAWN>::indexLimit; i++)
147 const Piece pawn = state.pieceOf(i);
155 i < PtypeTraits<GOLD>::indexLimit; i++)
157 const Piece gold = state.pieceOf(i);
164 Progress16 white)
const
180 if (ptype ==
LANCE) {
216 int expect(
const SimpleState& state,
Move move, Progress16 progress16,
218 Progress16 white)
const
228 else if (ptype ==
LANCE) {
231 else if (ptype ==
KNIGHT) {
234 return new_eval.
value(progress16, black, white);
240 new_eval.
pawns[state.turn()]++;
241 new_eval.
pawns[
alt(state.turn())]--;
253 new_eval.
golds[state.turn()]++;
254 new_eval.
golds[
alt(state.turn())]--;
258 return new_eval.
value(progress16, black, white);
262 Progress16 black, Progress16 white)
const