Smaug: a new chess engine based on glaurung

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

Moderators: hgm, Rebel, chrisw

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

Re: Smaug: a new chess engine based on glaurung

Post by mcostalba »

zamar wrote: * All patches applied to glaurung 2.2 can be found on Smaug's webpage. If those changes are found to be useful they can easily be merged in Glaurung (or in Stockfish)
And they will do for sure :-)

That's what I call "open source" development, were many (lousy coupled) people can contribute to a common goal, in this case improve a chess engine.


Thanks!!!
Marco
User avatar
sje
Posts: 4675
Joined: Mon Mar 13, 2006 7:43 pm

Re: Smaug: a new chess engine based on glaurung

Post by sje »

zamar wrote:* After living years with Linux and gcc, I have no idea how to compile smaug on Windows (or on MAC). Fx. which compiler should be used and which compile options should be set to get optimal result? Do I need to make different compiles for different Windows versions? I hope you can give me some hints here or if someone can send me compiled binaries, even better.
Apple's OS/X for Macintosh is OpenBSD on top of a Mach kernel. The free Xcode IDE includes the gcc tools, and those tools can also be used from the command line via the Terminal application.

For example, to build Symbolic on either OS/X or Linux:

Code: Select all

g++ -O3 -Wall -finline-limit=2048 -o Symbolic -lpthread  *.cpp
mcostalba
Posts: 2684
Joined: Sat Jun 14, 2008 9:17 pm

Re: Smaug: a new chess engine based on glaurung

Post by mcostalba »

mcostalba wrote:
And they will do for sure :-)
Joona your patches are great !!!!!

I am now testing the eval parameters tweaks, I will test separately the null move beta corrections later.

Still not finished but I can't resist posting the results on 1'+0'' games Stockfish with patch vs Stockfish without patch after 667 games out of 1000: +171 -149 =347 +11 ELO !!!!

I am testing on the current development version of Stoskfish and I will post the results as soon as I finish.

The current development version of Stockfish is still not available for public, but given the great stuff you donated to us, if you are interested in it please ask it and I will be glad to send you a private copy.

Thanks again
Marco
ernest
Posts: 2041
Joined: Wed Mar 08, 2006 8:30 pm

Re: Smaug: a new chess engine based on glaurung

Post by ernest »

mcostalba wrote: +171 -149 =347 +11 ELO !!!!
Marco
Encouraging, but 1 standard deviation error = 9.4 Elo :)
zullil
Posts: 6442
Joined: Tue Jan 09, 2007 12:31 am
Location: PA USA
Full name: Louis Zulli

Re: Smaug: a new chess engine based on glaurung

Post by zullil »

zamar wrote:Smaug is a slightly modified version of Glaurung 2.2

* After living years with Linux and gcc, I have no idea how to compile smaug on Windows (or on MAC). Fx. which compiler should be used and which compile options should be set to get optimal result?
Glaurung was developed on a Mac. Smaug compiles effortlessly on my Mac. For more, simply read the Makefile contained with the Glaurung source code. Use the Intel C compiler (icpc) if you own it; it will produce a much faster binary than gcc will.

Hope this helps.
Tord Romstad
Posts: 1808
Joined: Wed Mar 08, 2006 9:19 pm
Location: Oslo, Norway

Re: Smaug: a new chess engine based on glaurung

Post by Tord Romstad »

sje wrote: For example, to build Symbolic on either OS/X or Linux:

Code: Select all

g++ -O3 -Wall -finline-limit=2048 -o Symbolic -lpthread  *.cpp
In Mac OS X under Leopard, GCC 4.2 is also installed, although the default GCC used is version 4.0. In my experience, GCC 4.2 usually gives slightly faster code. Replace "g++" by "g++-4.2" to try.

A compiler flag worth trying is -mdynamic-no-pic. I don't really know what this flag (which doesn't seem to exist in Linux) does, but it improves the speed slightly for me. Finally, when compiling bitboard programs (like Glaurung, Smaug and Stockfish -- I'm not sure about Symbolic) on a Core 2 Duo Mac, it's important to use the -x86_64 flag. If you omit this, you'll get a 32-bit executable, which is much slower.

Tord
Tord Romstad
Posts: 1808
Joined: Wed Mar 08, 2006 9:19 pm
Location: Oslo, Norway

Re: Smaug: a new chess engine based on glaurung

Post by Tord Romstad »

zullil wrote:
zamar wrote:Smaug is a slightly modified version of Glaurung 2.2

* After living years with Linux and gcc, I have no idea how to compile smaug on Windows (or on MAC). Fx. which compiler should be used and which compile options should be set to get optimal result?
Glaurung was developed on a Mac. Smaug compiles effortlessly on my Mac. For more, simply read the Makefile contained with the Glaurung source code. Use the Intel C compiler (icpc) if you own it; it will produce a much faster binary than gcc will.
The Intel compiler for OS X is not free, but I have it. I'll compile optimized x86-64 binaries of Smaug and Stockfish, and put them on my web site later tonight.

Tord
Tord Romstad
Posts: 1808
Joined: Wed Mar 08, 2006 9:19 pm
Location: Oslo, Norway

Re: Smaug: a new chess engine based on glaurung

Post by Tord Romstad »

Joona,

I'm happy to see this new project! Now when I have no time or desire to improve my own engine, it's nice to see talented guys like you and Marco continue my work. Good luck! I can't promise I won't steal something back from you if and when I return to working on Glaurung.
:wink:

I think you should check with Marcus Prewarski (the author of the UCI engine Diablo) whether the name is OK, though: Several years ago, he had a chess engine (possibly private) named Smaug. That old program is almost certainly no longer in development, and I doubt that Marcus has any objections against you using the same name, but it's better to be sure.

Tord
zullil
Posts: 6442
Joined: Tue Jan 09, 2007 12:31 am
Location: PA USA
Full name: Louis Zulli

Re: Smaug: a new chess engine based on glaurung

Post by zullil »

Tord Romstad wrote: The Intel compiler for OS X is not free, but I have it. I'll compile optimized x86-64 binaries of Smaug and Stockfish, and put them on my web site later tonight.

Tord
Another example of why Tord is considered such a nice guy!
zamar
Posts: 613
Joined: Sun Jan 18, 2009 7:03 am

Re: Smaug: a new chess engine based on glaurung

Post by zamar »

Still not finished but I can't resist posting the results on 1'+0'' games Stockfish with patch vs Stockfish without patch after 667 games out of 1000: +171 -149 =347 +11 ELO !!!!
Nice to have someone to test those patches, thanks! Your results look promising, though error bar is still quite wide. Of course I did some tests before publishing Smaug, but I think results are much more reliable when tester and patch writer are different persons! Please post all your results (positive or negative) here.
I am now testing the eval parameters tweaks, I will test separately the null move beta corrections later.
Value NullMoveDeltaMidgame[10] =
{ (Value) -8, (Value) 6, (Value)-15, (Value) 9, (Value) 21,
(Value) 34, (Value) 54, (Value) 59, (Value) 61, (Value) 61}

Value NullMoveDeltaEndgame[10] =
{ (Value) 6, (Value) 0, (Value)-13, (Value) -9, (Value)-35,
(Value) 12, (Value) 24, (Value) 9, (Value) 5, (Value) 5}

if you do patching by hand, please note that first indexes are unused. It was only used in optimization process to get estimate of "random noise". Should have documented this better...

However as pruning stuff is slightly different in Stockfish compared to Glaurung, those values might be suboptimal for Stockfish :/
The current development version of Stockfish is still not available for public, but given the great stuff you donated to us, if you are interested in it please ask it and I will be glad to send you a private copy.
Sure I'm interested of it! Thanks! You can post it to jo3on5a.k7iis6ki@gm8ail.com (remove numbers!). Perhaps I can avoid reinventing the wheel :D
Joona Kiiski