mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-19 00:26:33 +08:00
Split PSQT init from Position init
Easier for tuning psq tables: TUNE(myParameters, PSQT::init); Also move PSQT code in a new *.cpp file, and retire the old and hacky psqtab.h that required to be included only once to work correctly, this is not idiomatic for a header file. Give wide visibility to psq tables (previously visible only in position.cpp), this will easy the use of psq tables outside Position, for instance in move ordering. Finally trivial code style fixes of the latest patches. Original patch of Lucas Braesch. No functional change.
This commit is contained in:
@@ -147,9 +147,9 @@ void MovePicker::score<CAPTURES>() {
|
||||
// badCaptures[] array, but instead of doing it now we delay until the move
|
||||
// has been picked up in pick_move_from_list(). This way we save some SEE
|
||||
// calls in case we get a cutoff.
|
||||
for (auto& m : *this){
|
||||
m.value = PieceValue[MG][pos.piece_on(to_sq(m))] - 200*relative_rank(pos.side_to_move(), to_sq(m));
|
||||
}
|
||||
for (auto& m : *this)
|
||||
m.value = PieceValue[MG][pos.piece_on(to_sq(m))]
|
||||
- 200 * relative_rank(pos.side_to_move(), to_sq(m));
|
||||
}
|
||||
|
||||
template<>
|
||||
|
||||
Reference in New Issue
Block a user