]> git.sesse.net Git - stockfish/commit
Cache evaluation score in qsearch
authorMarco Costalba <mcostalba@gmail.com>
Tue, 24 Mar 2009 14:48:14 +0000 (15:48 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Tue, 24 Mar 2009 17:28:42 +0000 (18:28 +0100)
commit5a0581498cde3d0904924d8ef7ed25ea1a2c855a
treed61919751b4fbbf6debb749d700141eac31f7eb7
parent1c087dd806b65c5d6668706f0c8fddf14f6fcd41
Cache evaluation score in qsearch

Instead of just drop evaluation score after stand pat
logic save it in TT so to be reused if the same position
occurs again.

Note that we NEVER use the cached value apart to avoid an
evaluation call, in particulary we never return to caller
after a succesful tt hit.

To accomodate this a new value type VALUE_TYPE_EVAL has been
introduced so that ok_to_use_TT() always returns false.

With this patch we cut about 15% of total evaluation calls.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
src/movepick.cpp
src/movepick.h
src/search.cpp
src/tt.cpp
src/tt.h
src/value.h