Stockfish 1.4, the final weapon

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

Moderators: Harvey Williamson, bob, hgm

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
mcostalba
Posts: 2684
Joined: Sat Jun 14, 2008 7:17 pm

Re: Stockfish 1.4, the final weapon

Post by mcostalba » Mon Jul 06, 2009 8:47 am

gladius wrote:That's almost certainly a bug, good catch by the compiler :).

Code: Select all

if (square_rank(to) == TRank8BB)

// should be (or something like this):

if (square_rank(to) == (Us == WHITE ? RANK_8 : RANK_1))
This is the patch I have applied to Stockfish dev tree, I don't plan a fixing release because the bug is so rare that should have no impact in real games.

Code: Select all

diff --git a/src/movegen.cpp b/src/movegen.cpp
index 33da450..ff8f6c6 100644
--- a/src/movegen.cpp
+++ b/src/movegen.cpp
@@ -864,7 +864,7 @@ namespace {
                                              Bitboard blockSquares, MoveStack* mlist) {
 
     // Calculate our parametrized parameters at compile time
-    const Bitboard TRank8BB = (Us == WHITE ? Rank8BB : Rank1BB);
+    const Rank TRANK_8 = (Us == WHITE ? RANK_8 : RANK_1);
     const Bitboard TRank3BB = (Us == WHITE ? Rank3BB : Rank6BB);
     const SquareDelta TDELTA_N = (Us == WHITE ? DELTA_N : DELTA_S);
 
@@ -882,7 +882,7 @@ namespace {
 
         assert(pos.piece_on(to) == EMPTY);
 
-        if (square_rank(to) == TRank8BB)
+        if (square_rank(to) == TRANK_8)
         {
             (*mlist++).move = make_promotion_move(to - TDELTA_N, to, QUEEN);
             (*mlist++).move = make_promotion_move(to - TDELTA_N, to, ROOK);

matejst
Posts: 216
Joined: Mon May 14, 2007 6:20 pm
Full name: Boban Stanojević

Re: Stockfish 1.4, the final weapon

Post by matejst » Mon Jul 06, 2009 4:25 pm

I have already tested the previous versions of Stockfish and Glaurung at 5'5", using the Nunn suite, with excellent results (because there are closed positions enough in the suite). What are your results for Stockfish 1.4? I have an initial result against Stockfish 1.3 at a faster time control (1'2", Noomen test suite) with an improvement of at least ~50 elos. How much do you expect?

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

Re: Stockfish 1.4, the final weapon

Post by mcostalba » Mon Jul 06, 2009 4:55 pm

matejst wrote:I have already tested the previous versions of Stockfish and Glaurung at 5'5", using the Nunn suite, with excellent results (because there are closed positions enough in the suite). What are your results for Stockfish 1.4? I have an initial result against Stockfish 1.3 at a faster time control (1'2", Noomen test suite) with an improvement of at least ~50 elos. How much do you expect?
We normally test with tournments at blitz times so to accumulate at least 1000 games to validate each change. We discard changes that yield an improvment within the error bar, if the change is "nice" we continue the test narrowing the error bar and hoping for the change to go in ;-)

We use different opening books, as example I normally use HS-Book.ctg

Expected ELO gain it is always a difficult question to ask because testing for development is a completely different subject then testing for correctly position the engine in some public list.

The goals are different. For development you need

- Reliability
- Fast tournaround
- Avoid false positives: changes that seem good but are not

Other poinst are less important for development testing while, on the contrary, are a must for the public ELO lists, as example

- Absolute ELO gain of a change
- Coverage of testing with many engines (of similar strenght)
- Coverage of many hardware conditions: single core/smp 32/64 bit


Neverthless I expect around 30 (+-10) ELO points of gain from Stockfish 1.3

matejst
Posts: 216
Joined: Mon May 14, 2007 6:20 pm
Full name: Boban Stanojević

Re: Stockfish 1.4, the final weapon

Post by matejst » Mon Jul 06, 2009 5:28 pm

Marco,

you are answering from the point of view of a programmer, and I am just a chess player. I like Stockfish because it plays a very humanlike kind of chess, and the gap in elos, for me, in this case, means mostly a better evaluation.

Very grateful for this engine to Tord Romstad, Joona Kiisky and you.

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

Re: Stockfish 1.4, the final weapon

Post by mcostalba » Mon Jul 06, 2009 5:51 pm

matejst wrote: and the gap in elos, for me, in this case, means mostly a better evaluation.
Your chess player sensibility has got it right !

I, of course, am a chess player too, but a rather weak one, but from the programmer point of view I can confirm that the changes in this version were almost only in the evaluation parameters.

matejst
Posts: 216
Joined: Mon May 14, 2007 6:20 pm
Full name: Boban Stanojević

Re: Stockfish 1.4, the final weapon

Post by matejst » Mon Jul 06, 2009 6:22 pm

Just a little question: why is the exe almost three times smaller, when the sources are about the same size?

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

Re: Stockfish 1.4, the final weapon

Post by mcostalba » Mon Jul 06, 2009 6:51 pm

matejst wrote:Just a little question: why is the exe almost three times smaller, when the sources are about the same size?
Well, I didn't note this. Probably Jim can answer more properly then me.

What I can tell you is that in the Linux version the standard makefile has the symbol table stripped.

Ok, now I translate :-)

When the compiler creates a binary file, the exe file, it puts there not only the instructions the computer has to execute for playing chess, but also additional info that is not used for playing but is a so called debug info that is used to better debug the exe file by the developers.

This info, that can be easily two-three times the size of actual program, can be stripped (removed) in the final build, the final exe use for release because is never used duirng program execution.

Perhaps Jim has stripped the debug info in its last build and not in previous ones.

There are not new things in the sources that yield this increase of program size, in my opinion is just the debug info that has been stripped in sf_1.4 and not in sf_1.3

krazyken

Re: Stockfish 1.4, the final weapon

Post by krazyken » Tue Jul 07, 2009 10:17 am

mcostalba wrote:
Please, what is the compiler used, under what OS and what is the command line?

I am very interested because me and the others developers have compiled with Intel /gcc (Linux) and MSVC (Windows) with warning level set to maximum but never hit this.

Thanks
Marco
I use Apple GCC 4.2 under Mac OS 10.5

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

Re: Stockfish 1.4, the final weapon

Post by mcostalba » Tue Jul 07, 2009 10:26 am

krazyken wrote:
mcostalba wrote:
Please, what is the compiler used, under what OS and what is the command line?

I am very interested because me and the others developers have compiled with Intel /gcc (Linux) and MSVC (Windows) with warning level set to maximum but never hit this.

Thanks
Marco
I use Apple GCC 4.2 under Mac OS 10.5
Thanks. I didn't imagined it works under Mac, please what processor you have? Intel or PowerPC ?

I don't think Stockfish _as is_ works on big endian machines.

Gian-Carlo Pascutto
Posts: 1204
Joined: Sat Dec 13, 2008 6:00 pm
Contact:

Re: Stockfish 1.4, the final weapon

Post by Gian-Carlo Pascutto » Tue Jul 07, 2009 10:29 am

If I use the Linux version, even if I set it to 1 thread, it's hogging 2 CPUs, which of course completely handicaps the opponent engine.

Post Reply