Page 1 of 3

Stockfish 1.0

Posted: Sun Nov 02, 2008 2:11 pm
by mcostalba
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

Re: Stockfish 1.0

Posted: Sun Nov 02, 2008 3:13 pm
by royb
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

Re: Stockfish 1.0

Posted: Sun Nov 02, 2008 7:15 pm
by krazyken
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.

Re: Stockfish 1.0

Posted: Sun Nov 02, 2008 10:28 pm
by Jim Ablett
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.

Re: Stockfish 1.0

Posted: Sun Nov 02, 2008 11:51 pm
by meschle
Thanks jim - now for testing :D

Re: Stockfish 1.0

Posted: Mon Nov 03, 2008 4:12 am
by Dirt
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.

Re: Stockfish 1.0

Posted: Mon Nov 03, 2008 5:11 am
by geots
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,

Re: Stockfish 1.0

Posted: Mon Nov 03, 2008 6:07 am
by Dirt
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.

Re: Stockfish 1.0

Posted: Mon Nov 03, 2008 7:23 am
by swami
How much stronger is it relative to Glaurung from your tests?

Thanks Jim and Marco.

Re: Stockfish 1.0

Posted: Mon Nov 03, 2008 8:27 am
by mcostalba
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