Page 1 of 12

Stockfish 1.4, the final weapon

Posted: Sun Jul 05, 2009 7:07 pm
by mcostalba
Hi all,

this is the link to the sources of Stockfish 1.4

http://www.mediafire.com/?dxnggmjf2nj

The main improvement of this version comes from a very deep and extended tuning of evaluation parameters, this huge job has been done mainly by one of the authors (Joona Kiisky) and I have helped him verifying new parameter's values as soon as they were ready.

We really worked well together and the result is this version that I think is nicely improved from 1.3 series.

I would like to thank Heinz van Saanen for his optimisation work on some critical low level functions and for his suggestions to improve and clean up the code.

Also a big "thank you" to Jim Ablett that has been very kind to build for us the release candidates and to help fixing some compile issues, this version is a bit tricky to compile if you want to build a pgo optimized binary for general use and Jim help was really valuable in this regards.

Finally I would like to special thank Tord Romstad, the main and original author, for his suggestions on some subtle SMP issues.

My main goal is to see Stockfish 1.4 to become the strongest open source engine to date in all hardware categories (32/64 bit, single core/SMP, the toughest will be single core 32bit where the Toga's can say something) and with a bit of luck perhaps the strongest free engine too (at least in SMP), with the notable exception of Rybka 2.3.2 that is still on another level...but we are slowly getting there.


Ok, now let's see if we survive the hype. :-)

Re: Stockfish 1.4, the final weapon

Posted: Sun Jul 05, 2009 7:35 pm
by mclane
hype makes might.

Re: Stockfish 1.4, the final weapon

Posted: Sun Jul 05, 2009 7:58 pm
by Dr.Wael Deeb
Thanks Marco and good luck :D
Dr.D

Re: Stockfish 1.4, the final weapon

Posted: Sun Jul 05, 2009 8:13 pm
by Werewolf
Hi,
Sorry must be missing something. I downloaded the rar file and expanded it with winrar, but where is the UCI engine?

I go into the sf_1.4 folder and there are a ton of files and none of them look like it's it :(

(EDIT: ah sorry I guess this is just the source code. UCI to folllow?)

Re: Stockfish 1.4, the final weapon

Posted: Sun Jul 05, 2009 10:19 pm
by Jim Ablett
Image
StockFish 1.4 JA
by Marco Costalba, Joona Kiiski.

Based on Glaurung by Tord Romstad

Windows x64 (Intel 11) / win32 (Msvc 8) p.g.o builds

Download:
http://www.mediafire.com/?mihzcymwhlg

Jim.

Re: Stockfish 1.4, the final weapon

Posted: Mon Jul 06, 2009 2:57 am
by krazyken
Thanks! I'll be trying it out soon. Get an interesting warning though:

Code: Select all

movegen.cpp&#58; In function 'MoveStack*<unnamed>&#58;&#58;generate_pawn_blocking_evasions&#40;const Position&, Bitboard, Bitboard, MoveStack*) &#91;with Color Us = WHITE&#93;'&#58;
movegen.cpp&#58;123&#58;   instantiated from here
movegen.cpp&#58;885&#58; warning&#58; comparison is always false due to limited range of data type
you may want to double check that.

Re: Stockfish 1.4, the final weapon

Posted: Mon Jul 06, 2009 5:35 am
by gladius
That's almost certainly a bug, good catch by the compiler :).

Code: Select all

if &#40;square_rank&#40;to&#41; == TRank8BB&#41;

// should be &#40;or something like this&#41;&#58;

if &#40;square_rank&#40;to&#41; == &#40;Us == WHITE ? RANK_8 &#58; RANK_1&#41;)

Re: Stockfish 1.4, the final weapon

Posted: Mon Jul 06, 2009 6:18 am
by Werner
Thanks Jim!!

...and is this really a bug?

movegen.cpp: In function 'MoveStack*<unnamed>::generate_pawn_blocking_evasions(const Position&, Bitboard, Bitboard, MoveStack*) [with Color Us = WHITE]':
movegen.cpp:123: instantiated from here
movegen.cpp:885: warning: comparison is always false due to limited range of data type

Re: Stockfish 1.4, the final weapon

Posted: Mon Jul 06, 2009 7:54 am
by mcostalba
Jim Ablett wrote:Image
StockFish 1.4 JA
by Marco Costalba, Joona Kiiski.

Based on Glaurung by Tord Romstad

Windows x64 (Intel 11) / win32 (Msvc 8) p.g.o builds

Download:
http://www.mediafire.com/?mihzcymwhlg

Jim.
Thanks Jim !

Re: Stockfish 1.4, the final weapon

Posted: Mon Jul 06, 2009 8:29 am
by mcostalba
krazyken wrote:Thanks! I'll be trying it out soon. Get an interesting warning though:

Code: Select all

movegen.cpp&#58; In function 'MoveStack*<unnamed>&#58;&#58;generate_pawn_blocking_evasions&#40;const Position&, Bitboard, Bitboard, MoveStack*) &#91;with Color Us = WHITE&#93;'&#58;
movegen.cpp&#58;123&#58;   instantiated from here
movegen.cpp&#58;885&#58; warning&#58; comparison is always false due to limited range of data type
you may want to double check that.
Thanks, Kenny !

Yes I confirm it is a bug introduced with patch:

"Convert also generate_pawn_blocking_evasions() to new API" of 7/5/2009

It should have been a "No functional change patch" and actually verifying with

stockfish bench 100 1 12 default depth

shows no difference in node count before and after the patch (22.406.114 nodes). So the bug must shows in very very rare cases.

Actually the bug is that, when generating evasions from check, a promotion move that could block an attacking checker is not generated as it should, but this is very rare. It could happen as example in the below position:

[D] q3K3/3P4/8/8/8/k7/8/8 w - - 0 1

Where due to this bug the move d8=Q is not considered as a possible evasion move for white. Note that if white king would have not been under check the promotion move would had been correctly generated because promotion moves that are not check evasions are handled by another function.


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