Rev 154 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 154 | Rev 156 | ||
---|---|---|---|
Line 120... | Line 120... | ||
120 | tree->score_eg = tree->score_eg / 16; |
120 | tree->score_eg = tree->score_eg / 16; |
121 | if (tree->score_eg < DrawScore(1) && !(can_win & 1)) |
121 | if (tree->score_eg < DrawScore(1) && !(can_win & 1)) |
122 | tree->score_eg = tree->score_eg / 16; |
122 | tree->score_eg = tree->score_eg / 16; |
123 | #if defined(SKILL) |
123 | #if defined(SKILL) |
124 | if (skill < 100) |
124 | if (skill < 100) |
125 | tree->score_eg = |
125 | tree->score_eg = (int) // Pierre-Marie Baty -- added type cast |
126 | skill * tree->score_eg / 100 + ((100 - |
126 | (skill * tree->score_eg / 100 + ((100 - |
127 | skill) * PAWN_VALUE * (uint64_t) Random32() / |
127 | skill) * PAWN_VALUE * (uint64_t) Random32() / |
128 | 0x100000000ull) / 100; |
128 | 0x100000000ull) / 100); |
129 | #endif |
129 | #endif |
130 | return (wtm) ? tree->score_eg : -tree->score_eg; |
130 | return (wtm) ? tree->score_eg : -tree->score_eg; |
131 | } |
131 | } |
132 | } |
132 | } |
133 | /* |
133 | /* |
Line 303... | Line 303... | ||
303 | */ |
303 | */ |
304 | score = ((tree->score_mg * phase) + (tree->score_eg * (62 - phase))) / 62; |
304 | score = ((tree->score_mg * phase) + (tree->score_eg * (62 - phase))) / 62; |
305 | score = EvaluateDraws(tree, ply, can_win, score); |
305 | score = EvaluateDraws(tree, ply, can_win, score); |
306 | #if defined(SKILL) |
306 | #if defined(SKILL) |
307 | if (skill < 100) |
307 | if (skill < 100) |
308 | score = |
308 | score = (int) // Pierre-Marie Baty -- added type cast |
309 | skill * score / 100 + ((100 - |
309 | (skill * score / 100 + ((100 - |
310 | skill) * PAWN_VALUE * (uint64_t) Random32() / 0x100000000ull) / |
310 | skill) * PAWN_VALUE * (uint64_t) Random32() / 0x100000000ull) / |
311 | 100; |
311 | 100); |
312 | #endif |
312 | #endif |
313 | return (wtm) ? score : -score; |
313 | return (wtm) ? score : -score; |
314 | } |
314 | } |
315 | 315 | ||
316 | /* last modified 10/19/15 */ |
316 | /* last modified 10/19/15 */ |