Stockfish search: bug or feature?

Discussion of anything and everything relating to chess playing software and machines.

Moderator: Ras

mcostalba
Posts: 2684
Joined: Sat Jun 14, 2008 9:17 pm

Re: Stockfish search: bug or feature?

Post by mcostalba »

Togga wrote:how much elo improvement would it be? and will the next stockfish version have smoothscaling support?
Very small impact on elo, IMHO.

Regarding smoothscaling support has been very much toned down, in our tests it seems original verision of Dann is simply too aggressive, so we have saved a bit of this idea and discarded the remaining.
Pablo Vazquez
Posts: 154
Joined: Thu May 31, 2007 9:05 pm
Location: Madrid, Spain

Re: Stockfish search: bug or feature?

Post by Pablo Vazquez »

Glad I could help :)
Togga

Re: Stockfish search: bug or feature?

Post by Togga »

small test: timecontrol 1+1

Stockfish-1.6.3-32-ja - Stockfish3216sDC : 5,0/10 2-2-6 (0===10=1==) 50% ±0
zamar
Posts: 613
Joined: Sun Jan 18, 2009 7:03 am

Re: Stockfish search: bug or feature?

Post by zamar »

mcostalba wrote: Very small impact on elo, IMHO.
I agree, although I think I've seen a game long time ago when this bug throwed away a win. So it's not completely meaningless, but unlikely more than 1-2 elo points.
Joona Kiiski
mcostalba
Posts: 2684
Joined: Sat Jun 14, 2008 9:17 pm

Re: Stockfish search: bug or feature?

Post by mcostalba »

Pablo Vazquez wrote:Glad I could help :)
Thanks to you :-)

For interested people here is the fixing patch.

Code: Select all

Date: Wed, 24 Feb 2010 20:13:35 +0200
Subject: [PATCH] Fix repetition detection bug

Bug spotted by Jouni Uski and fix suggested by Pablo Vazquez

Also add note that we are not always handling fifty move rule correctly

---
 src/position.cpp |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/position.cpp b/src/position.cpp
index 63029ce..1089c5f 100644
--- a/src/position.cpp
+++ b/src/position.cpp
@@ -1655,6 +1655,7 @@ Value Position::compute_non_pawn_material(Color c) const {
 /// Position::is_draw() tests whether the position is drawn by material,
 /// repetition, or the 50 moves rule. It does not detect stalemates, this
 /// must be done by the search.
+// FIXME: Currently we are not handling 50 move rule correctly when in check
 
 bool Position::is_draw() const {
 
@@ -1668,7 +1669,7 @@ bool Position::is_draw() const {
       return true;
 
   // Draw by repetition?
-  for (int i = 2; i < Min(Min(gamePly, st->rule50), st->pliesFromNull); i += 2)
+  for (int i = 4; i <= Min(Min(gamePly, st->rule50), st->pliesFromNull); i += 2)
       if (history[gamePly - i] == st->key)
           return true;
 
-- 
1.6.5.1.1367.gcd48