flok99

Untitled

Sep 21st, 2019
157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. if (phase >= 224) { // endgame?
  2. int scores[] = { 20, 10, 5, 0, 0, 5, 10, 20 };
  3.  
  4. libchess::Square kw = pos.king_square(libchess::constants::WHITE);
  5. libchess::Square kb = pos.king_square(libchess::constants::BLACK);
  6. score += scores[kb.rank()] * parameters.tune_edge_black_rank.value();
  7. score += scores[kb.file()] * parameters.tune_edge_black_file.value();
  8.  
  9. score -= scores[kw.rank()] * parameters.tune_edge_white_rank.value();
  10. score -= scores[kw.file()] * parameters.tune_edge_white_file.value();
  11. }
Advertisement
Add Comment
Please, Sign In to add comment