projects
/
fairystockfish.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
97015af
)
Restore behaviour after count<ALL_PIECES> fix
author
Marco Costalba
<mcostalba@gmail.com>
Tue, 22 Oct 2013 15:27:58 +0000 (17:27 +0200)
committer
Marco Costalba
<mcostalba@gmail.com>
Tue, 22 Oct 2013 15:27:58 +0000 (17:27 +0200)
Because pos.count<ALL_PIECES>(Us) was always zero,
rewrite the formula as if this would still be
the case.
bench: 8510004
src/evaluate.cpp
patch
|
blob
|
history
diff --git
a/src/evaluate.cpp
b/src/evaluate.cpp
index
71120fd
..
f3586f9
100644
(file)
--- a/
src/evaluate.cpp
+++ b/
src/evaluate.cpp
@@
-878,9
+878,7
@@
Value do_evaluate(const Position& pos, Value& margin) {
ebonus -= ebonus / 4;
}
- // Increase the bonus if we have more non-pawn pieces
- if (pos.count<ALL_PIECES>( Us) - pos.count<PAWN>( Us) >
- pos.count<ALL_PIECES>(Them) - pos.count<PAWN>(Them))
+ if (pos.count<PAWN>(Us) < pos.count<PAWN>(Them))
ebonus += ebonus / 4;
score += make_score(mbonus, ebonus);