Stockfish 7 beta 1

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

Moderators: hgm, Rebel, chrisw

mvk
Posts: 589
Joined: Tue Jun 04, 2013 10:15 pm

Re: Stockfish 7 beta 1

Post by mvk »

zamar wrote:Issue #2 is just normal behaviour.

Issue #1 is a real issue though. I've recorded it in our issue tracker:
https://github.com/official-stockfish/S ... issues/544

It's not of high priority, because position is highly artificial, but we'll fix it at some point...

Thanks for reporting.
Thanks for considering.

The "artificial" position is from a CCRL 40/4 game. (GrayMatter SVN1604 vs POS 1.20, date 2012-07-16). I have stockfish hangups in other positions as well. This is just the first.

Background: I use low-depth searches (depth 1 and 2 currently) for a comparative evaluation study I'm conducting. (An extension of "Texel's tuning method".) These two problems disqualify the recent stockfishes from my experiments. The bad values because of the injected noise. The infinite loop because it takes too long. The workaround is to use an old version and that is ok, but it would be nice to have results with a modern stockfish. I might patch the pruning near tips of the PV myself one day. The resulting evaluations are just wrong.
[Account deleted]
User avatar
lucasart
Posts: 3232
Joined: Mon May 31, 2010 1:29 pm
Full name: lucasart

Re: Stockfish 7 beta 1

Post by lucasart »

mvk wrote: The "artificial" position is from a CCRL 40/4 game. (GrayMatter SVN1604 vs POS 1.20, date 2012-07-16).
POS 1.2 is rated 230 elo weaker than RAM 2.0, which is a RANDOM MOVER! So you're looking at a quality of chess worse than random moves!

The fact that these patzers cannot even mate the opponent with 4 queens should already give you a hint, don't you think ?

Clearly an artificial position.
Theory and practice sometimes clash. And when that happens, theory loses. Every single time.
mvk
Posts: 589
Joined: Tue Jun 04, 2013 10:15 pm

Re: Stockfish 7 beta 1

Post by mvk »

lucasart wrote:
mvk wrote: The "artificial" position is from a CCRL 40/4 game. (GrayMatter SVN1604 vs POS 1.20, date 2012-07-16).
POS 1.2 is rated 230 elo weaker than RAM 2.0, which is a RANDOM MOVER! So you're looking at a quality of chess worse than random moves!

The fact that these patzers cannot even mate the opponent with 4 queens should already give you a hint, don't you think ?

Clearly an artificial position.
Every chess position is artificial.
[Account deleted]
mcostalba
Posts: 2684
Joined: Sat Jun 14, 2008 9:17 pm

Re: Stockfish 7 beta 1

Post by mcostalba »

zamar wrote: It's not of high priority, because position is highly artificial, but we'll fix it at some point...
That point is now :-)

I have open a pull request with the fix: https://github.com/official-stockfish/S ... h/pull/546
mar
Posts: 2554
Joined: Fri Nov 26, 2010 2:00 pm
Location: Czech Republic
Full name: Martin Sedlak

Re: Stockfish 7 beta 1

Post by mar »

lucasart wrote:POS 1.2 is rated 230 elo weaker than RAM 2.0, which is a RANDOM MOVER!
Writing something worse than a random mover requires a lot of effort, I'm quite sure :)
Anyway congrats and hoping to see SF win next TCEC. Fingers crossed.
petero2
Posts: 685
Joined: Mon Apr 19, 2010 7:07 pm
Location: Sweden
Full name: Peter Osterlund

Re: Stockfish 7 beta 1

Post by petero2 »

Compilation fails for android arm when using a standalone toolchain built from NDK r10e. There are two problems.
1. stoi is not supported
2. to_string is not supported

For DroidFish I worked around the problems like this, but maybe there are better ways to do it:

Code: Select all

diff --git a/src/misc.h b/src/misc.h
index 37f1e70..4181461 100644
--- a/src/misc.h
+++ b/src/misc.h
@@ -25,6 +25,7 @@
 #include <ostream>
 #include <string>
 #include <vector>
+#include <sstream>
 
 #include "types.h"
 
@@ -96,4 +97,17 @@ public&#58;
   &#123; return T&#40;rand64&#40;) & rand64&#40;) & rand64&#40;)); &#125;
 &#125;;
 
+inline int stoi&#40;const std&#58;&#58;string& s&#41; &#123;
+    std&#58;&#58;stringstream ss&#40;s&#41;;
+    int result = 0;
+    ss >> result;
+    return result;
+&#125;
+
+inline std&#58;&#58;string to_string&#40;int v&#41; &#123;
+    std&#58;&#58;stringstream ss;
+    ss << v;
+    return ss.str&#40;);
+&#125;
+
 #endif // #ifndef MISC_H_INCLUDED
diff --git a/src/ucioption.cpp b/src/ucioption.cpp
index 23af481..2c53713 100644
--- a/src/ucioption.cpp
+++ b/src/ucioption.cpp
@@ -113,7 +113,7 @@ Option&#58;&#58;Option&#40;OnChange f&#41; &#58; type&#40;"button"), min&#40;0&#41;, max&#40;0&#41;, on_change&#40;f&#41;
 &#123;&#125;
 
 Option&#58;&#58;Option&#40;int v, int minv, int maxv, OnChange f&#41; &#58; type&#40;"spin"), min&#40;minv&#41;, max&#40;maxv&#41;, on_change&#40;f&#41;
-&#123; defaultValue = currentValue = std&#58;&#58;to_string&#40;v&#41;; &#125;
+&#123; defaultValue = currentValue = to_string&#40;v&#41;; &#125;
 
 Option&#58;&#58;operator int&#40;) const &#123;
   assert&#40;type == "check" || type == "spin");
The current development version of DroidFish already contains Stockfish 7Beta1: https://dl.dropboxusercontent.com/u/896 ... idFish.apk

A separate 32 bit arm executable is available here: https://dl.dropboxusercontent.com/u/896 ... ta1-arm.gz

To build the executable the following Makefile patch is also needed:

Code: Select all

diff --git a/src/Makefile b/src/Makefile
index 4e4d3d9..58afe6e 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -198,6 +198,11 @@ ifeq ($&#40;COMP&#41;,clang&#41;
 	endif
 endif
 
+ifeq ($&#40;COMP&#41;,androidgcc&#41;
+       comp=gcc
+       CXX=arm-linux-androideabi-g++
+endif
+
 ifeq ($&#40;comp&#41;,icc&#41;
 	profile_prepare = icc-profile-prepare
 	profile_make = icc-profile-make
beram
Posts: 1187
Joined: Wed Jan 06, 2010 3:11 pm

Re: Stockfish 7 beta 1

Post by beram »

First testrun on my i5 4200M, 2 cores, 512mB hash, privat testbook 25 lines

Code: Select all

SF 7beta - - Komodo 9.3  Blitz 3m2s     i5 4200M @2500Mhz, 2 cpu &#40;Fritzmark 5,1&#41;
1   Stockfish 7Beta1 64 BMI2   +24  +22/=63/-15 53.50%   53.5/100
2   Komodo 9.3 64-bit          -24  +15/=63/-22 46.50%   46.5/100
53,5 % out of 100games in line with earlier results of SF devs from dec 2015

Code: Select all

SF 051215 - Komodo 9.3 Blitz 3m2s     i5 4200M @2500Mhz, 2 cpu &#40;Fritzmark 5,1&#41;                                    
1   Stockfish 051215 64 BMI2   +21  +27/=52/-21 53.00%   53.0/100
2   Komodo 9.3 64-bit          -21  +21/=52/-27 47.00%   47.0/100

SF 141215 - Komodo 9.3  Blitz 3m2s     i5 4200M @2500Mhz, 2 cpu &#40;Fritzmark 5,1&#41;                                   
1   Stockfish 141215 64 BMI2    +7  +18/=66/-16 51.00%   51.0/100
2   Komodo 9.3 64-bit           -7  +16/=66/-18 49.00%   49.0/100

SF 201215 - Komodo 9.3  Blitz 3m2s     i5 4200M @2500Mhz, 2 cpu &#40;Fritzmark 5,1&#41;                               
1   Stockfish 201215 64 BMI2   +31  +25/=59/-16 54.50%   54.5/100
2   Komodo 9.3 64-bit          -31  +16/=59/-25 45.50%   45.5/100
FriedmannC
Posts: 273
Joined: Fri Feb 10, 2012 7:58 pm
Location: SUCEAVA, ROMANIA

Re: Stockfish 7 beta 1

Post by FriedmannC »

Great work, Bram, can you post a pgn file of the games? :D
mvk
Posts: 589
Joined: Tue Jun 04, 2013 10:15 pm

Re: Stockfish 7 beta 1

Post by mvk »

mcostalba wrote:
zamar wrote: It's not of high priority, because position is highly artificial, but we'll fix it at some point...
That point is now :-)

I have open a pull request with the fix: https://github.com/official-stockfish/S ... h/pull/546
That is certainly faster than expected. I quickly tested your branch and I can confirm that this works for me: I fed it with 10 million CCRL positions and all "depth 2" searches now terminate, including the one posted.

It is much appreciated to experience such a prompt and positive response to my niche request.

On a side note: It is very positive to see Gary Linscott's appearance in SF7's author list. I think it is very appropriate and well-deserved to see Fishtest more formally recognised as an integral part of SF and a key factor to its success. True advances in computer chess are never from better "programming of the inner loops", an activity which by itself is not at all very elevating in fact. A broader engineering approach and effective team work are required to break new ground, and that is what Gary has managed to demonstrate with great results.

Code: Select all

Stockfish 7Beta1 64 POPCNT by T. Romstad, M. Costalba, J. Kiiski, G. Linscott
uci
id name Stockfish 7Beta1 64 POPCNT
id author T. Romstad, M. Costalba, J. Kiiski, G. Linscott
[Account deleted]
stavros
Posts: 165
Joined: Tue Dec 02, 2014 1:29 am

Re: Stockfish 7 beta 1

Post by stavros »

petero2 wrote:Compilation fails for android arm when using a standalone toolchain built from NDK r10e. There are two problems.
1. stoi is not supported
2. to_string is not supported

For DroidFish I worked around the problems like this, but maybe there are better ways to do it:

Code: Select all

diff --git a/src/misc.h b/src/misc.h
index 37f1e70..4181461 100644
--- a/src/misc.h
+++ b/src/misc.h
@@ -25,6 +25,7 @@
 #include <ostream>
 #include <string>
 #include <vector>
+#include <sstream>
 
 #include "types.h"
 
@@ -96,4 +97,17 @@ public&#58;
   &#123; return T&#40;rand64&#40;) & rand64&#40;) & rand64&#40;)); &#125;
 &#125;;
 
+inline int stoi&#40;const std&#58;&#58;string& s&#41; &#123;
+    std&#58;&#58;stringstream ss&#40;s&#41;;
+    int result = 0;
+    ss >> result;
+    return result;
+&#125;
+
+inline std&#58;&#58;string to_string&#40;int v&#41; &#123;
+    std&#58;&#58;stringstream ss;
+    ss << v;
+    return ss.str&#40;);
+&#125;
+
 #endif // #ifndef MISC_H_INCLUDED
diff --git a/src/ucioption.cpp b/src/ucioption.cpp
index 23af481..2c53713 100644
--- a/src/ucioption.cpp
+++ b/src/ucioption.cpp
@@ -113,7 +113,7 @@ Option&#58;&#58;Option&#40;OnChange f&#41; &#58; type&#40;"button"), min&#40;0&#41;, max&#40;0&#41;, on_change&#40;f&#41;
 &#123;&#125;
 
 Option&#58;&#58;Option&#40;int v, int minv, int maxv, OnChange f&#41; &#58; type&#40;"spin"), min&#40;minv&#41;, max&#40;maxv&#41;, on_change&#40;f&#41;
-&#123; defaultValue = currentValue = std&#58;&#58;to_string&#40;v&#41;; &#125;
+&#123; defaultValue = currentValue = to_string&#40;v&#41;; &#125;
 
 Option&#58;&#58;operator int&#40;) const &#123;
   assert&#40;type == "check" || type == "spin");
The current development version of DroidFish already contains Stockfish 7Beta1: https://dl.dropboxusercontent.com/u/896 ... idFish.apk

A separate 32 bit arm executable is available here: https://dl.dropboxusercontent.com/u/896 ... ta1-arm.gz

To build the executable the following Makefile patch is also needed:

Code: Select all

diff --git a/src/Makefile b/src/Makefile
index 4e4d3d9..58afe6e 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -198,6 +198,11 @@ ifeq ($&#40;COMP&#41;,clang&#41;
 	endif
 endif
 
+ifeq ($&#40;COMP&#41;,androidgcc&#41;
+       comp=gcc
+       CXX=arm-linux-androideabi-g++
+endif
+
 ifeq ($&#40;comp&#41;,icc&#41;
 	profile_prepare = icc-profile-prepare
 	profile_make = icc-profile-make
tnx its working fine,now someone needs to test sf7 b vs sf6 in android