SugaR XPrO 1.3

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.
peter
Posts: 1446
Joined: Sat Feb 16, 2008 6:38 am

Re: SugaR XPrO 1.3

Post by peter » Thu Sep 28, 2017 11:18 am

MikeB wrote:
cc2150dx wrote:SugaR XPrO 1.3 has been released:

https://github.com/Zerbinati/SugaR/releases
Thanks Jason and thank you Marco!!
D'accord!

Pity storing and reloading of hash still works only up to 2G.
4 is stored only apparantly (shown in Explorer) but don't contain relevant hash, which is easily to be seen with time to solution of tricky positions.

One example

[d]2n3B1/6p1/2P2p2/1p3P1p/1p1nK2P/3P4/4N2p/7k w - - 0 1
1.Ke3!

Solution "shown" to the engine and 2G hash stored is "found" at once again after reload, 4G nil.

BTW Daniel Jose's SF- branch with same persistent hash- feature more than 2G work fine also since its latest update
Peter Martan

SzG
Posts: 2447
Joined: Fri Mar 10, 2006 6:20 am
Location: Szentendre, Hungary

Re: SugaR XPrO 1.3

Post by SzG » Thu Sep 28, 2017 11:30 am

Is there some added value to the latest SF development version or are they paractically the same?
Gabor Szots

CCRL testing group

Modern Times
Posts: 2141
Joined: Thu Jun 07, 2012 9:02 pm

Re: SugaR XPrO 1.3

Post by Modern Times » Thu Sep 28, 2017 4:55 pm

SzG wrote:Is there some added value to the latest SF development version or are they paractically the same?
I wonder what the code changes are. I guess Stockfish code is quite large, so 99% of the code is probably the same. Would be interesting to know.
.

Opinions expressed here are my own, and not necessarily those of the CCRL Group.

User avatar
kranium
Posts: 1768
Joined: Thu May 29, 2008 8:43 am

Re: SugaR XPrO 1.3

Post by kranium » Thu Sep 28, 2017 10:33 pm

Modern Times wrote:
SzG wrote:Is there some added value to the latest SF development version or are they paractically the same?
I wonder what the code changes are. I guess Stockfish code is quite large, so 99% of the code is probably the same. Would be interesting to know.

Hi guys,
I had some time, and a nice diff tool that can identify changes real easy...here's a quick synopsis.

Sugar has the following code that newest SF-dev version does not currently contain:

Features:
Large Pages
Persistent Hash
Cerebellum and
Ownbook (polyglot .bin) book

Eval:
knight and bishop outpost slightly revalued
const Score WeakUnopposedPawn = S( 5, 25) added
code for UCI evaluation weights

Endgame functions:
Draw detection with 2 or more bishops of the same color and no pawns
Fortress detection
KPKN function
KPKB function
KQKN function
KQKB function

Search:
Tactical Mode
added code for Contempt and OwnBook
1 ply 'tweak' to seldepth

UCI Options:
o["Tactical Mode"] << Option(false);
o["Debug Log File"] << Option("", on_logger);
o["Contempt Factor"] << Option(0, -100, 100);
o["OwnBook"] << Option(false);
o["Threads"] << Option(n, 1, 512, on_threads);
o["Hash"] << Option(16, 1, MaxHashMB, on_hash_size);
o["Clear Hash"] << Option(on_clear_hash);
o["Clean Search"] << Option(false);
o["Ponder"] << Option(false);
//Add evaluation weights.
o["Material (Midgame)"] << Option(100, 0, 500, on_eval);
o["Material (Endgame)"] << Option(100, 0, 500, on_eval);
o["Imbalance (Midgame)"] << Option(100, 0, 500, on_eval);
o["Imbalance (Endgame)"] << Option(100, 0, 500, on_eval);
o["Pawn Structure (Midgame)"] << Option(100, 0, 500, on_eval);
o["Pawn Structure (Endgame)"] << Option(100, 0, 500, on_eval);
o["Mobility (Midgame)"] << Option(100, 0, 500, on_eval);
o["Mobility (Endgame)"] << Option(100, 0, 500, on_eval);
o["Passed Pawns (Midgame)"] << Option(100, 0, 500, on_eval);
o["Passed Pawns (Endgame)"] << Option(100, 0, 500, on_eval);
o["King Safety (Midgame)"] << Option(100, 0, 500, on_eval);
o["King Safety (Endgame)"] << Option(100, 0, 500, on_eval);
o["Threats (Midgame)"] << Option(100, 0, 500, on_eval);
o["Threats (Endgame)"] << Option(100, 0, 500, on_eval);
o["Space"] << Option(100, 0, 500, on_eval);
o["MultiPV"] << Option(1, 1, 500);
o["Skill Level"] << Option(20, 0, 20);
o["NeverClearHash"] << Option(false);
o["HashFile"] << Option("SugaR_hash.hsh", on_HashFile);
o["SaveHashtoFile"] << Option(SaveHashtoFile);
o["LoadHashfromFile"] << Option(LoadHashfromFile);
o["LoadEpdToHash"] << Option(LoadEpdToHash);
o["Best Book Move"] << Option(false);
o["Book File"] << Option("NULL");
o["Move Overhead"] << Option(100, 0, 5000);
o["nodestime"] << Option(0, 0, 10000);
o["UCI_Chess960"] << Option(false);
o["SyzygyPath"] << Option("<empty>", on_tb_path);
o["Use Syzygy"] << Option(true);
o["Large Pages"] << Option(true, on_large_pages);
//Cerebellum Book Library
o["Cerebellum Library"] << Option();
o["Book Move2 Probability"] << Option(0, 0, 100, on_book_move2_prob);
o["BookPath"] << Option("<Cerebellum_Light.bin>", on_brainbook_path);

Hope this is of some help,
Norm
Last edited by kranium on Thu Sep 28, 2017 10:41 pm, edited 1 time in total.

User avatar
Graham Banks
Posts: 30733
Joined: Sun Feb 26, 2006 9:52 am
Location: Auckland, NZ

Re: SugaR XPrO 1.3

Post by Graham Banks » Thu Sep 28, 2017 10:38 pm

Thanks Norm. :)
My email addresses:
gbanksnz at gmail.com
gbanksnz at yahoo.co.nz

SzG
Posts: 2447
Joined: Fri Mar 10, 2006 6:20 am
Location: Szentendre, Hungary

Re: SugaR XPrO 1.3

Post by SzG » Fri Sep 29, 2017 4:42 am

Thank you Norman.
Gabor Szots

CCRL testing group

Modern Times
Posts: 2141
Joined: Thu Jun 07, 2012 9:02 pm

Re: SugaR XPrO 1.3

Post by Modern Times » Fri Sep 29, 2017 4:43 am

kranium wrote: Hi guys,
I had some time, and a nice diff tool that can identify changes real easy...here's a quick synopsis.
Very useful, thanks. In terms of lines of code, how many are different and how many lines in total ?
.

Opinions expressed here are my own, and not necessarily those of the CCRL Group.

User avatar
Guenther
Posts: 2259
Joined: Wed Oct 01, 2008 4:33 am
Location: Regensburg, Germany
Contact:

Re: SugaR XPrO 1.3

Post by Guenther » Fri Sep 29, 2017 8:08 am

kranium wrote:
Modern Times wrote:
SzG wrote:Is there some added value to the latest SF development version or are they paractically the same?
I wonder what the code changes are. I guess Stockfish code is quite large, so 99% of the code is probably the same. Would be interesting to know.

Hi guys,
I had some time, and a nice diff tool that can identify changes real easy...here's a quick synopsis.

Sugar has the following code that newest SF-dev version does not currently contain:

Features:
Large Pages
Persistent Hash
Cerebellum and
Ownbook (polyglot .bin) book

Eval:
knight and bishop outpost slightly revalued
const Score WeakUnopposedPawn = S( 5, 25) added
code for UCI evaluation weights

Endgame functions:
Draw detection with 2 or more bishops of the same color and no pawns
Fortress detection
KPKN function
KPKB function
KQKN function
KQKB function

Search:
Tactical Mode
added code for Contempt and OwnBook
1 ply 'tweak' to seldepth

UCI Options:
o["Tactical Mode"] << Option(false);
o["Debug Log File"] << Option("", on_logger);
o["Contempt Factor"] << Option(0, -100, 100);
o["OwnBook"] << Option(false);
o["Threads"] << Option(n, 1, 512, on_threads);
o["Hash"] << Option(16, 1, MaxHashMB, on_hash_size);
o["Clear Hash"] << Option(on_clear_hash);
o["Clean Search"] << Option(false);
o["Ponder"] << Option(false);
//Add evaluation weights.
o["Material (Midgame)"] << Option(100, 0, 500, on_eval);
o["Material (Endgame)"] << Option(100, 0, 500, on_eval);
o["Imbalance (Midgame)"] << Option(100, 0, 500, on_eval);
o["Imbalance (Endgame)"] << Option(100, 0, 500, on_eval);
o["Pawn Structure (Midgame)"] << Option(100, 0, 500, on_eval);
o["Pawn Structure (Endgame)"] << Option(100, 0, 500, on_eval);
o["Mobility (Midgame)"] << Option(100, 0, 500, on_eval);
o["Mobility (Endgame)"] << Option(100, 0, 500, on_eval);
o["Passed Pawns (Midgame)"] << Option(100, 0, 500, on_eval);
o["Passed Pawns (Endgame)"] << Option(100, 0, 500, on_eval);
o["King Safety (Midgame)"] << Option(100, 0, 500, on_eval);
o["King Safety (Endgame)"] << Option(100, 0, 500, on_eval);
o["Threats (Midgame)"] << Option(100, 0, 500, on_eval);
o["Threats (Endgame)"] << Option(100, 0, 500, on_eval);
o["Space"] << Option(100, 0, 500, on_eval);
o["MultiPV"] << Option(1, 1, 500);
o["Skill Level"] << Option(20, 0, 20);
o["NeverClearHash"] << Option(false);
o["HashFile"] << Option("SugaR_hash.hsh", on_HashFile);
o["SaveHashtoFile"] << Option(SaveHashtoFile);
o["LoadHashfromFile"] << Option(LoadHashfromFile);
o["LoadEpdToHash"] << Option(LoadEpdToHash);
o["Best Book Move"] << Option(false);
o["Book File"] << Option("NULL");
o["Move Overhead"] << Option(100, 0, 5000);
o["nodestime"] << Option(0, 0, 10000);
o["UCI_Chess960"] << Option(false);
o["SyzygyPath"] << Option("<empty>", on_tb_path);
o["Use Syzygy"] << Option(true);
o["Large Pages"] << Option(true, on_large_pages);
//Cerebellum Book Library
o["Cerebellum Library"] << Option();
o["Book Move2 Probability"] << Option(0, 0, 100, on_book_move2_prob);
o["BookPath"] << Option("<Cerebellum_Light.bin>", on_brainbook_path);

Hope this is of some help,
Norm
Well that tool cannot know yet if those 'changes' are mostly from older
SF versions, which is mostly the case.
You always get older + newer SF with Sugar and 0,001% random params changed.
Guenther Simon
http://rwbc-chess.de/

User avatar
kranium
Posts: 1768
Joined: Thu May 29, 2008 8:43 am

Re: SugaR XPrO 1.3

Post by kranium » Fri Sep 29, 2017 11:33 am

Modern Times wrote:
kranium wrote: Hi guys,
I had some time, and a nice diff tool that can identify changes real easy...here's a quick synopsis.
Very useful, thanks. In terms of lines of code, how many are different and how many lines in total ?
Hi Ray,

cerebellum book comes from Stefan Zipproth's Brainfish of course, it's > 200 lines
polyglot book is by Fabien Letouzey and was implemented in earlier versions of SF > 400 lines
persistent hash is by Jeremy Bernstein's stockfish-TCEC6-PA_GTB and is > 250 lines
large pages code was present in previous versions of SF...I believe.

But examining and counting all the differing lines is fairly tedious, and not really meaningful, so I won't go there.
As everyone knows, Sugar is basically equivalent to recent SF dev, but with many added features and options.
In addition the author has also made some effort to improve eval.

I believe Sugar is often used by power users who want features like Large Pages, Cerebellum book, Persistent Hash, extra UCI options, etc., that SF dev does not include.
for ex: on Playchess game room, where any small advantage might mean an extra win.

In this manner it's become a useful and interesting fork for many.

Norm

corres
Posts: 444
Joined: Wed Nov 18, 2015 10:41 am
Location: hungary

Re: SugaR XPrO 1.3

Post by corres » Fri Sep 29, 2017 12:28 pm

Sugar has no "persistent hash".
It has "hash to file", "file to hash" and "EPD to hash" options.
The last arises from Jeremy`s work of PA-GTB only.

Post Reply