Stockfish 1.0

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

Moderators: hgm, Harvey Williamson, bob

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

Stockfish 1.0

Post by mcostalba » Sun Nov 02, 2008 1:11 pm

This is Stockfish, an UCI engine derived from norvegian engine Glarung 2.1


Why Stockfish ?

- It's a fish ;-)

- It is produced in Norway and cooked in Italy. Indeed the biggest part of norvegian stockfish is exported in Italy where is lovely cooked.


What has this stockfish more then Glaurung 2.1 ?

Well, some bugs have been fixed, some possibly improvements have been scattered all along the code, in my private tests it seems stronger then Glaurung, expecially on 32 bit system.

But possibly the biggest change is a rewrite of large parts of Glaurung code. I am particulary proud of movegen.cpp where I was able to cut more then 250 lines of code through the use of templates, and now move generation is a little bit faster too.

So I would kindly ask you to properly compile it and to give it a try in public tests. I know clones are not allowed, but I would think this one could lead to some surprise.


Known issues

- As the original Glaurung 2.1, this engine is endian sensitive. Please read the README if you have a PowerPC Mac and you want to compile yourself.


- On 32 bit systems code must be compiled with -fno-strict-aliasing option, both under gcc and Intel C++ compiler, to avoid random crashes due to a pop_1st_bit() optimization. MSVC does not seem to have this problem.


Download

You can download sources from:

http://digilander.libero.it/mcostalba/sf_1.0.zip


Special thanks to Tord Romstad for his beautiful engine. It is very, very difficult to find a parameter that needs tuning. It seems everything has been througly tested and optmized.

It's a wonderful base to start off. If this engine, just few months of hacking, will demonstarte stronger then Glaurung it is mostly because of the very high quality of the original one.


Thanks
Marco

royb
Posts: 509
Joined: Wed Mar 08, 2006 11:53 pm

Re: Stockfish 1.0

Post by royb » Sun Nov 02, 2008 2:13 pm

Hello Marco,

I tried to compile Stockfish 1.0 on my Ubuntu 64-bit system and this was the result after modifying the Makefile to not use icpc and use g++ instead:

roy@roy-laptop:~/chess/sf_1.0/src$ make
g++ -DNDEBUG -Wall -g -O3 -fno-exceptions -fomit-frame-pointer -fno-rtti -fno-strict-aliasing -wd383,869,981 -c -o bitboard.o bitboard.cpp
g++: unrecognized option '-wd383,869,981'
In file included from direction.h:28,
from bitboard.h:66,
from bitboard.cpp:37:
square.h: In function ‘int file_distance(File, File)’:
square.h:142: error: ‘abs’ was not declared in this scope
square.h: In function ‘int rank_distance(Rank, Rank)’:
square.h:150: error: ‘abs’ was not declared in this scope
bitboard.cpp: In function ‘void<unnamed>::init_ray_bitboards()’:
bitboard.cpp:451: warning: suggest parentheses around + or - in operand of &
bitboard.cpp: In function ‘void<unnamed>::init_attacks()’:
bitboard.cpp:476: error: ‘abs’ was not declared in this scope
make: *** [bitboard.o] Error 1

Any thoughts on how to make it compile cleanly?

Thanks for sharing Stockfish with the world!

Roy

krazyken

Re: Stockfish 1.0

Post by krazyken » Sun Nov 02, 2008 6:15 pm

compiled it using the default makefile, with icpc got plenty of warnings about significant bits may be lost, and it crashed in the first game.

User avatar
Jim Ablett
Posts: 1327
Joined: Fri Jul 14, 2006 5:56 am
Location: London, England
Contact:

Re: Stockfish 1.0

Post by Jim Ablett » Sun Nov 02, 2008 9:28 pm

mcostalba wrote:This is Stockfish, an UCI engine derived from norvegian engine Glarung 2.1


Why Stockfish ?

- It's a fish ;-)

- It is produced in Norway and cooked in Italy. Indeed the biggest part of norvegian stockfish is exported in Italy where is lovely cooked.


What has this stockfish more then Glaurung 2.1 ?

Well, some bugs have been fixed, some possibly improvements have been scattered all along the code, in my private tests it seems stronger then Glaurung, expecially on 32 bit system.

But possibly the biggest change is a rewrite of large parts of Glaurung code. I am particulary proud of movegen.cpp where I was able to cut more then 250 lines of code through the use of templates, and now move generation is a little bit faster too.

So I would kindly ask you to properly compile it and to give it a try in public tests. I know clones are not allowed, but I would think this one could lead to some surprise.


Known issues

- As the original Glaurung 2.1, this engine is endian sensitive. Please read the README if you have a PowerPC Mac and you want to compile yourself.


- On 32 bit systems code must be compiled with -fno-strict-aliasing option, both under gcc and Intel C++ compiler, to avoid random crashes due to a pop_1st_bit() optimization. MSVC does not seem to have this problem.


Download

You can download sources from:

http://digilander.libero.it/mcostalba/sf_1.0.zip


Special thanks to Tord Romstad for his beautiful engine. It is very, very difficult to find a parameter that needs tuning. It seems everything has been througly tested and optmized.

It's a wonderful base to start off. If this engine, just few months of hacking, will demonstarte stronger then Glaurung it is mostly because of the very high quality of the original one.


Thanks
Marco

Hi Marco,

Some Windows p.g.o compiles, x64 & 32 bit.

Image
StockFish 1.0 by Marco Costalba

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

Jim.

User avatar
meschle
Posts: 200
Joined: Tue Apr 01, 2008 9:53 pm

Re: Stockfish 1.0

Post by meschle » Sun Nov 02, 2008 10:51 pm

Thanks jim - now for testing :D
Regards Mark

Quad Q6600 3.0 Ghz, Vista 64bit, 4gb Ram

Dirt
Posts: 2851
Joined: Wed Mar 08, 2006 9:01 pm
Location: Irvine, CA, USA

Re: Stockfish 1.0

Post by Dirt » Mon Nov 03, 2008 3:12 am

Jim Ablett wrote:Some Windows p.g.o compiles, x64 & 32 bit.

Jim.
Something is not working right on my single processor system. When I use Winboard to run a match between Stockfish and Glauring the nodes per second are around 25,000 for both. The same is true for a match between Toga and Stockfish. Also, the Winboard move animations are jerky. When I try the same for Toga and Glaurung the nodes rise to about 300,000, and the animation is smooth.

User avatar
geots
Posts: 4790
Joined: Fri Mar 10, 2006 11:42 pm

Re: Stockfish 1.0

Post by geots » Mon Nov 03, 2008 4:11 am

Dirt wrote:
Jim Ablett wrote:Some Windows p.g.o compiles, x64 & 32 bit.

Jim.
Something is not working right on my single processor system. When I use Winboard to run a match between Stockfish and Glauring the nodes per second are around 25,000 for both. The same is true for a match between Toga and Stockfish. Also, the Winboard move animations are jerky. When I try the same for Toga and Glaurung the nodes rise to about 300,000, and the animation is smooth.

In Stockfish parameters, threads are set to "2" by default. Change that to "1" for your single processor system.


Best,

Dirt
Posts: 2851
Joined: Wed Mar 08, 2006 9:01 pm
Location: Irvine, CA, USA

Re: Stockfish 1.0

Post by Dirt » Mon Nov 03, 2008 5:07 am

geots wrote:
Dirt wrote:
Jim Ablett wrote:Some Windows p.g.o compiles, x64 & 32 bit.

Jim.
Something is not working right on my single processor system. When I use Winboard to run a match between Stockfish and Glauring the nodes per second are around 25,000 for both. The same is true for a match between Toga and Stockfish. Also, the Winboard move animations are jerky. When I try the same for Toga and Glaurung the nodes rise to about 300,000, and the animation is smooth.

In Stockfish parameters, threads are set to "2" by default. Change that to "1" for your single processor system.


Best,
As far as I can tell, threads are set to one. Just loading it from the command line, without having do anything, slows my system down. It feels like something is causing memory to swap out, but I don't see any reason for that. All my utilities say I have plenty of free memory.

swami
Posts: 6535
Joined: Thu Mar 09, 2006 3:21 am

Re: Stockfish 1.0

Post by swami » Mon Nov 03, 2008 6:23 am

How much stronger is it relative to Glaurung from your tests?

Thanks Jim and Marco.

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

Re: Stockfish 1.0

Post by mcostalba » Mon Nov 03, 2008 7:27 am

royb wrote:Hello Marco,

I tried to compile Stockfish 1.0 on my Ubuntu 64-bit system and this was the result after modifying the Makefile to not use icpc and use g++ instead:

roy@roy-laptop:~/chess/sf_1.0/src$ make
g++ -DNDEBUG -Wall -g -O3 -fno-exceptions -fomit-frame-pointer -fno-rtti -fno-strict-aliasing -wd383,869,981 -c -o bitboard.o bitboard.cpp
g++: unrecognized option '-wd383,869,981'

---- cut ----

Any thoughts on how to make it compile cleanly?

Roy
Please open Makefile and try to comment out the line that adds the above warnings to the ignore list. It is commented as required for Intel C++. Should be not difficult to find.


Marco

Post Reply