xcomponent wrote:It is a matter of taste. There is nothing wrong to assign static scoring during generate, as long as it is superseded properly by the dynamic factors later. I like that.
You have an additional probe to board table:
Code: Select all
*values ++ = Board.sq [capture_sq] * 256 + 192;
So it is a bit slower, of course you avoid another scoring loop so at the end can be a bit faster in this way, but just a bit IMHO and I prefer a layered design where you have the following independent and well defined modules:
Code: Select all
- moves generation (movegen.cpp)
- moves scoring (movepick.cpp)
- moves sorting (movepick.cpp)
- next move picking logic (movepick.cpp)
- search loop (search.cpp)
This well modularized and disjoint set of functions is for me more important then a bit of (theoretical) extra speed. I have already done the mistake with unified middlegame and endgame scores (two values in one integer) where I spent almost one week of development and testing and we had very subtle bugs even after release (take a look at value.h) just for a very minimal speed increase.
The point is that because you can score in that way only captures you end up scoring the captures in one file and in one way and scoring non-captures in another file: I want all the scoring stuff to be easily accessible and clear to read and not spread across many files.