Cheng 4.39 release

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

Moderators: hgm, Rebel, chrisw

Jamal Bubker
Posts: 326
Joined: Mon May 24, 2010 4:32 pm

Re: Cheng 4.39 release

Post by Jamal Bubker »

Thanks Martin :D
mar
Posts: 2596
Joined: Fri Nov 26, 2010 2:00 pm
Location: Czech Republic
Full name: Martin Sedlak

Cheng 4.39 release

Post by mar »

mar
Posts: 2596
Joined: Fri Nov 26, 2010 2:00 pm
Location: Czech Republic
Full name: Martin Sedlak

Re: Cheng 4.39 release

Post by mar »

SzG wrote:What is the method of setting hash table size under winboard?
Cheng should support the standard CECP memory command, however it rounds this up to nearest power of 2 and uses this for hash table size.
Let's say this is a feature, not a bug :)
I should change this behavior to round down instead, because rounding up seems like protocol violation (i.e. using more memory than requested).
However, the memory command is a bit weird, it basically tells the engine to not use more memory than this but this can be tricky:
various engines use some extra memory for various caches/internal hashes and structures other than main hash (the code+stack itself takes some space as well).
But typically the user is only interested in hash size (and perhaps TB cache sizes), who cares if you use 2 megs for eval cache internally.
Alternatively you can use the Hash option which works the same way as in UCI mode.
One last problem with native CECP support is that Cheng doesn't remember the parameters,
this is probably something that's missing before I can claim that it supports both protocols.
But you should always be able to run via Polyglot in UCI mode.
mar
Posts: 2596
Joined: Fri Nov 26, 2010 2:00 pm
Location: Czech Republic
Full name: Martin Sedlak

Re: Cheng 4.39 release

Post by mar »

mar wrote:One last problem with native CECP support is that Cheng doesn't remember the parameters,
this is probably something that's missing before I can claim that it supports both protocols.
Actually I guess simply loading params from ini file at startup in xboard mode should do.
mar
Posts: 2596
Joined: Fri Nov 26, 2010 2:00 pm
Location: Czech Republic
Full name: Martin Sedlak

Re: Cheng 4.39 release

Post by mar »

SzG wrote:At the moment I am using it under Arena but in WB mode, common hash size is set to 128 for all engines so I guess Arena issues the memory 128 command and that makes Cheng use 261MB.
Actually, it is not a big issue, only I would have liked to see clear. I noticed that in UCI mode the hash size is what it is expected to be.

Thanks.
My guess is Arena sends 128+Nalimov cache size, fixing this should be trivial (i.e. round down), I can build a special version for you if it's a problem.

Actually I could (and probably even should) always round down instead of up, so if someone asks for 255M hash he would get 128M only. If 48 then 32 etc.
I could also use non-power-of-two TT size, but doing modulo might be slow on ARM with no integer division instruction so I don't want to do that.
EDIT: Power of two also ensures uniform distribution, but this should be no big deal for large tables anyway.

Oh and thanks for finding this bug :)
Ferdy
Posts: 4840
Joined: Sun Aug 10, 2008 3:15 pm
Location: Philippines

Re: Cheng 4.39 release

Post by Ferdy »

mar wrote:
mar wrote:One last problem with native CECP support is that Cheng doesn't remember the parameters,
this is probably something that's missing before I can claim that it supports both protocols.
Actually I guess simply loading params from ini file at startup in xboard mode should do.
If the engine supports WB option you can permanently set that option by modifying the winboard.ini file.
Example to set the engine to run at multipv 3 always, you can use,

Code: Select all

-firstOptions "MultiPV=3"
And that would be,

Code: Select all

"cheng_4.39_x64.exe" -fd "C:\Chess\engines\nobook\cheng4_039" -firstOptions "MultiPV=3"
or

Code: Select all

"Cheng 4.39 mpv3" -fcp "cheng_4.39_x64.exe" -fd "C:\Chess\engines\nobook\cheng4_039" -fn "Cheng 4.39 mpv3" -firstOptions "MultiPV=3"
To disable own book,

Code: Select all

"Cheng 4.39 mpv3" -fcp "cheng_4.39_x64.exe" -fd "C:\Chess\engines\nobook\cheng4_039" -fn "Cheng 4.39 mpv3" -firstOptions "MultiPV=3,OwnBook=0"
To always use a hash of 256 mb, but this may not work since you already implemented the memory command.

Code: Select all

"Cheng 4.39 mpv3" -fcp "cheng_4.39_x64.exe" -fd "C:\Chess\engines\nobook\cheng4_039" -fn "Cheng 4.39 mpv3" -firstOptions "MultiPV=3,OwnBook=0,Hash=256"
mar
Posts: 2596
Joined: Fri Nov 26, 2010 2:00 pm
Location: Czech Republic
Full name: Martin Sedlak

Re: Cheng 4.39 release

Post by mar »

Ferdy wrote:If the engine supports WB option you can permanently set that option by modifying the winboard.ini file.
Example to set the engine to run at multipv 3 always, you can use,

Code: Select all

-firstOptions "MultiPV=3"
Hey that's nice, thanks! Didn't know that.

So I guess I won't bother with ini file (unless I get bored with testing :)
Fixing memory rounding should do then.
User avatar
Sylwy
Posts: 4622
Joined: Fri Apr 21, 2006 4:19 pm
Location: IASI - the historical capital of MOLDOVA
Full name: SilvianR

Re: My test

Post by Sylwy »