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:
Marco Costalba
2015-05-02 02:36:39 +02:00
parent 59f64fda4f
commit 578b21bbee
7 changed files with 46 additions and 40 deletions

View File

@@ -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<>