Manual merge

This commit is contained in:
Marco Costalba
2008-10-26 21:44:58 +01:00
6 changed files with 44 additions and 37 deletions

View File

@@ -8,6 +8,7 @@
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Stockfish is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@@ -233,25 +234,25 @@ void MovePicker::score_noncaptures() {
// First score by history, when no history is available then use
// piece/square tables values. This seems to be better then a
// random choice when we don't have an history for any move.
Move m;
int hs;
for (int i = 0; i < numOfMoves; i++)
{
m = moves[i].move;
if (m == killer1)
hs = HistoryMax + 2;
else if (m == killer2)
hs = HistoryMax + 1;
else
hs = H.move_ordering_score(pos.piece_on(move_from(m)), m);
// Ensure moves in history are always sorted as first
if (hs > 0)
hs += 1000;
moves[i].score = hs + pos.mg_pst_delta(m);
Move m;
int hs;
for (int i = 0; i < numOfMoves; i++)
{
m = moves[i].move;
if (m == killer1)
hs = HistoryMax + 2;
else if (m == killer2)
hs = HistoryMax + 1;
else
hs = H.move_ordering_score(pos.piece_on(move_from(m)), m);
// Ensure moves in history are always sorted as first
if (hs > 0)
hs += 1000;
moves[i].score = hs + pos.mg_pst_delta(m);
}
}