egt,cores & memory

Discussions about the WinBoard protocol. Here you can also report bugs and request new features.

Moderators: hgm, Andres Valverde

egt,cores & memory

Postby Daniel Shawul » 09 Jul 2010, 15:12

I am trying to implement these new options but i have some doubts.
So i ask for these features first like this
Code: Select all
print("feature smp=1 memory=1 egt=\"scorpio\"\n");


One problem is that even though I set smp=0, I still get the cores command from winboard ?
The other is with I get egtpath="../bitbases" as the path even though "../egtb" is set in "options->global settings"
menu. How is that exactly handled for the different bitbases and tablebases that could have. One engine could use
EGTB and another bitbases. Where is the path to each engine set ?

Are the "memory" & "egtpath" sent during initialization only Or during every change made later on. The egt loading could
sometimes take long for 5 men so for winboard I set feature "done=0" and later "done=1" once they are loaded. I don't know
how to handle it if the path is sent again while playing. So I just want to make sure if they are sent once at start up or not and
how to handle them. For the memory it is actually easy, delete and allocate the new hashtable, but i have doubt about egtb..

Also is the memory inclusive of everything that the engine could ever allocate ? I have main,pawn,eval,egtb caches..

Daniel
User avatar
Daniel Shawul
 
Posts: 366
Joined: 28 Sep 2004, 09:33
Location: Ethiopia

Re: egt,cores & memory

Postby Daniel Shawul » 09 Jul 2010, 15:52

Sample log file :
smp is set to 0 but I still get cores=2 as you see. Not Ok.
memory=0 -> I did not recieve memory command even though I changed the hash table size and egtb cache as well in "options->global settings" Ok!
This also raises the question of how to set the egbb cache separately if one do not want to use the memory feature. I have checked that
memory indeed includes egtb cache size as well because I got memory 68 ,for the defualut winboard setting, which I think is the sum of main hash table and
egt cache.

Code: Select all
ht 1048576 X 64 = 64MB
eht 524288 X 16 = 8MB
pht 349525 X 24 = 7MB
processors [1]
EgbbProbe not Loaded!
loading_time = 0s
<COMMAND LINE>
==============================
<000000000500>xboard
<000000000500>protover 2
feature name=1 myname="Scorpio_2.6.3"
feature sigint=0 sigterm=0
feature setboard=1 draw=0 colors=0
feature smp=0 memory=0 egt="scorpio"
feature option="log -check 0"
feature option="clear_hash -button"
feature option="resign -spin 800 100 30000"
feature option="smp_depth -spin 4 1 10"
feature option="cluster_depth -spin 1 8 16"
feature option="message_poll_nodes -spin 200 10 20000"
feature option="use_iid -check 1"
feature option="use_singular -check 0"
feature option="singular_margin -spin 30 0 1000"
feature done=1
<000000000500>accepted done
<000000000500>accepted name
<000000000500>accepted myname
<000000000500>accepted sigint
<000000000500>accepted sigterm
<000000000500>accepted setboard
<000000000500>accepted draw
<000000000500>accepted colors
<000000000500>accepted smp
<000000000500>accepted memory
<000000000500>accepted egt
<000000000500>accepted option
<000000000500>accepted option
<000000000500>accepted option
<000000000500>accepted option
<000000000500>accepted option
<000000000500>accepted option
<000000000500>accepted option
<000000000500>accepted option
<000000000500>accepted option
<000000000500>accepted done
<000000000516>egtpath scorpio ..\bitbases
<000000000516>new
<000000000547>random
<000000000547>level 80 1 0
<000000000547>post
<000000000547>hard
<000000000547>easy
<000000033219>cores 2
+ Thread 1 started.
processors [2]
<000000033235>force
<000000033235>egtpath scorpio ..\bitbases
<000000033235>new
<000000033266>random
<000000033266>level 80 1 0
<000000033266>post
<000000033266>hard
<000000033266>easy
<000000035110>result * {xboard exit}

[FEN "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1"]


<000000035110>force
<000000035110>quit
Bye Bye
User avatar
Daniel Shawul
 
Posts: 366
Joined: 28 Sep 2004, 09:33
Location: Ethiopia

Re: egt,cores & memory

Postby H.G.Muller » 09 Jul 2010, 16:05

If it sends cores after smp=0, it is a clear bug. I will look into it.

The EGTB path in the menu is only for Nalimov format. The menu dialog will still have to be expanded to enter paths for other formats. As you noted, multiple formats can be needed at the same time. Currently, paths for other formats can only be set through the /egtFormats option.

Memory is supposed to be all inclusive; it indicates the maximum memory footprint your engine can have at any time. It is sent before every game, never during a game. I think it is currently the same for egtpath. The cores command can be sent during a game, though (like easy, hard). The engine is allowed to finish he search before acting on it. (This is true for any WB command.)

WB engines are supposed to know their optimal cache sizes for a given total memory size. If you want to give the user more control, it should be through an engine-defined option.
User avatar
H.G.Muller
 
Posts: 3453
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL

Re: egt,cores & memory

Postby H.G.Muller » 11 Jul 2010, 10:39

OK, bug fixed. (Thanks for reporting, btw.)

It was not testing the engine features before sending a change made by the user in the option dialogs to the engine. A new WinBoard binary with the fix (4.20100711) is available from http://hgm.nubati.net/winboard0526.zip . The hgm.nubati.net repository contains fixed sources in both the hgm4.4.4 ('stable version') and hgm5 ('development version') branch.
User avatar
H.G.Muller
 
Posts: 3453
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL

Re: egt,cores & memory

Postby Daniel Shawul » 11 Jul 2010, 13:14

Thanks for the quick fix. I will test shortly.
I have already modified the "egtpath" implementation as you suggested so it should
be fully functional when the menu is extended in the future. It is good that this is sent
once because unloading the egbbdll in the middle of the game would make things hard.

I think I can distribute the memory to each hash tables according to a certain formula
and then let the user change it through new "feature options". Great addition btw!
I put almost all eval parameters into it and tuned most of them through self play. Before
that I used to change one parameter manually create an exe etc... very tiresome.

Daniel
User avatar
Daniel Shawul
 
Posts: 366
Joined: 28 Sep 2004, 09:33
Location: Ethiopia


Return to WinBoard development and bugfixing

Who is online

Users browsing this forum: No registered users and 4 guests