Smaug: a new chess engine based on glaurung

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.
Post Reply
zamar
Posts: 613
Joined: Sun Jan 18, 2009 6:03 am

Smaug: a new chess engine based on glaurung

Post by zamar » Thu Mar 12, 2009 5:21 am

Smaug is a slightly modified version of Glaurung 2.2 with following changes:

* More aggressive depth and game phase based null move pruning.
* Many important evaluation parameters have been slightly tuned.

Smaug can be download at: http://kiiski.info/smaug/. Currently only source code is available.

Some help is needed:

* 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.

* My own tests suggest that smaug should be somewhat stronger than glaurung (at least on blitz speed), but more tests by independent testers are needed.

Some comments:

* I'm only a novice chess programmer and have no intention to take honour away from original writer of Glaurung. Name "Smaug" was chosen to make engine origin clear.

* 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)
Joona Kiiski

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

Re: Smaug: a new chess engine based on glaurung

Post by mcostalba » Thu Mar 12, 2009 5:56 pm

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 6:43 pm

Re: Smaug: a new chess engine based on glaurung

Post by sje » Fri Mar 13, 2009 2:28 pm

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: 2679
Joined: Sat Jun 14, 2008 7:17 pm

Re: Smaug: a new chess engine based on glaurung

Post by mcostalba » Fri Mar 13, 2009 5:24 pm

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: 1750
Joined: Wed Mar 08, 2006 7:30 pm

Re: Smaug: a new chess engine based on glaurung

Post by ernest » Fri Mar 13, 2009 6:49 pm

mcostalba wrote: +171 -149 =347 +11 ELO !!!!
Marco
Encouraging, but 1 standard deviation error = 9.4 Elo :)

zullil
Posts: 4878
Joined: Mon Jan 08, 2007 11:31 pm
Location: PA USA

Re: Smaug: a new chess engine based on glaurung

Post by zullil » Fri Mar 13, 2009 6:52 pm

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 8:19 pm
Location: Oslo, Norway

Re: Smaug: a new chess engine based on glaurung

Post by Tord Romstad » Fri Mar 13, 2009 7:41 pm

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 8:19 pm
Location: Oslo, Norway

Re: Smaug: a new chess engine based on glaurung

Post by Tord Romstad » Fri Mar 13, 2009 7:44 pm

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 8:19 pm
Location: Oslo, Norway

Re: Smaug: a new chess engine based on glaurung

Post by Tord Romstad » Fri Mar 13, 2009 7:48 pm

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: 4878
Joined: Mon Jan 08, 2007 11:31 pm
Location: PA USA

Re: Smaug: a new chess engine based on glaurung

Post by zullil » Fri Mar 13, 2009 7:58 pm

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!

Post Reply