This is the same change we have already done in search.cpp,
this time for evaluation.cpp
If a variable will be populated reading an UCI option
then do not hard code its default values.
This avoids misleadings when reading the sources.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Centralize in a single object all the global resources
management and avoid a bunch of sparse exit() calls.
This is more reliable and clean and more stick to C++ coding
practices.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Note that some pawns and material info has been switched
to int from int8_t.
This is a waste of space but it is not clear if we have a
faster or slower code (or nothing changed), some test should be
needed.
Few warnings still are alive.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Prune more moves after a null search because of
a lower beta limit then in main search.
In test positions reduces the searched nodes of 30% !!!!
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
They hide the underlying uniform function call with
no benefit.
A little bit more verbose but now is clear what happens.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
For queen mobility could be bigger then 15, so
we need count_1s() not count_1s_max_15().
This bug was introduced by patch:
"Group common evaluate code" of 24/9/2008
So it's almost 4 months and two release old!
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Do not consider squares protected by enemy pawns
in mobility evaluation.
This reduces the mobility value by about 15%
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Is a new evaluation rule that gives bonus in midgame
to the side that has more space behind pawns for its
minor pieces.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
After deep test (1000 games) it seems do not improve anything,
actually seems slightly weaker.
So remove it for now.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
There are subtle differences in the king evaluation
that should be clear to avoid misunderstandings.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
It is more clear, at last for me.
Also cleanup evaluate_rook() and evaluate_queen()
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This removes code redundancy but perhaps
impact performance due to uninlining.
Testing for regression is needed. For now
aim to best code readibility.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
A bunch of Intel C++ warnings removed, other silent out.
Still few remaining but need deeper look.
Also usual whitespace crap removal noise.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>