Engine Search Depth Limit Xboard FICS

Discussions about Winboard/Xboard. News about engines or programs to use with these GUIs (e.g. tournament managers or adapters) belong in this sub forum.

Moderator: Andres Valverde

Engine Search Depth Limit Xboard FICS

Postby patzer1 » 25 Sep 2014, 14:20

Hi,

I use xboard-4.7.3 and Sjeng to connect to FICS.
I want Sjeng to search upto certain move depth. But cant figure how to do it. Have tried with "ponder off" + -searchDepth 9 and ./sjeng -sd 9.
The debug shows:
StartChildProcess (dir="/usr/games/") ./sjeng -sd 9


But during play Sjeng search maximum depth possible.

How to force the engine to search upto certain depth in FICS?

Thanks.
patzer1
 
Posts: 10
Joined: 07 Aug 2013, 11:32

Re: Engine Search Depth Limit Xboard FICS

Postby H.G.Muller » 25 Sep 2014, 20:06

Well, -sd is shorthand for -secondDirectory, so that would not work for sure. (But because the second engine is not used in zippy play, it does not hurt either.)

-searchDepth 9

should do it. The debug shows something strange, however: it makes the -sd part of the Sjeng startup command, in stead of interpreting it as an XBoard option. So it looks like you have done something bad with quotes. If you would do the same with -searchDepth, XBoard would also not see it, and Sjeng woud not understand it (or ignore it altogether; I don't know if Sjeng pays attention to its command line).
User avatar
H.G.Muller
 
Posts: 3453
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL

Re: Engine Search Depth Limit Xboard FICS

Postby patzer1 » 26 Sep 2014, 08:01

First I tried with -searchDepth 9 , which didnt work. (Also checked xboard.conf and .xboardrc to find if searchdepth is mentioned more than once, they are okay). Posting the commands I tried, in case I missing some option.
xboard -debug -noGUI -size Tiny -zp -fd /usr/games/ -fcp "./sjeng" -ics -icshost freechess.org -icslogon ~/Chess/Bughouse/BugBOT5/logon5 -zippyVariants "bughouse" -zippyBughouse 2 -searchDepth 8 -zippyGameEnd "say Thanks!"


Then found 'sd' in sjeng's prompt using the commands 'sjeng' then 'help'. This didnt work either.

I tried searchDepth with another engine TJchess. It also search to maximum depth instead of wanted 8
xboard -noGUI -debug -ics -icshost freechess.org -fcp "./TJchess" -searchDepth 8 -zp -zippyGameEnd "say Good Game!" -zippyBughouse 2 -icslogon logonTJ


What to try now? :?

Thanks.
patzer1
 
Posts: 10
Joined: 07 Aug 2013, 11:32

Re: Engine Search Depth Limit Xboard FICS

Postby H.G.Muller » 26 Sep 2014, 22:14

The commands look OK to me. Can you post the first 50 lines (or so) of the xboard.debug file that XBoard should have created in response to the -debug argument? That should be enough to see what XBoard exactly sends to the engines at startup.
User avatar
H.G.Muller
 
Posts: 3453
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL

Re: Engine Search Depth Limit Xboard FICS

Postby patzer1 » 29 Sep 2014, 19:43

I can see these lines in xboard.debug
recognized 'normal' (-1) as variant normal
recognized 'normal' (-1) as variant normal
shuffleOpenings = 0
Requested font set for list -*-helvetica-medium-r-normal--11-*-*-*-*-*-*-*,-misc-fixed-medium-r-normal--11-*-*-*-*-*-*-*,-*-*-*-*-*-*-11-*-*-*-*-*-*-*
got list -*-helvetica-medium-r-normal--11-*-*-*-*-*-*-*,-misc-fixed-medium-r-normal--11-*-*-*-*-*-*-*,-*-*-*-*-*-*-11-*-*-*-*-*-*-*, locale en_US.UTF-8
got charset -adobe-helvetica-medium-r-normal--11-80-100-100-p-56-iso8859-1
got charset -adobe-helvetica-medium-r-normal--11-80-100-100-p-56-iso8859-1
got charset -misc-fixed-medium-r-normal--11-79-100-100-c-0-iso8859-2
got charset -misc-fixed-medium-r-normal--11-79-100-100-c-0-iso8859-3
got charset -misc-fixed-medium-r-normal--11-79-100-100-c-0-iso8859-4
got charset -misc-fixed-medium-r-normal--11-79-100-100-c-0-iso8859-5
got charset -misc-fixed-medium-r-normal--11-79-100-100-c-0-koi8-r
got charset -misc-fixed-medium-r-normal--11-79-100-100-c-0-iso8859-7
got charset -misc-fixed-medium-r-normal--11-79-100-100-c-0-iso8859-9
got charset -misc-fixed-medium-r-normal--11-79-100-100-c-0-iso8859-13
got charset -misc-fixed-medium-r-normal--11-79-100-100-c-0-iso8859-14
got charset -misc-fixed-medium-r-normal--11-79-100-100-c-0-iso8859-15
got charset -misc-fixed-medium-r-normal--11-79-100-100-c-0-jisx0208.1983-0
got charset -daewoo-gothic-medium-r-normal--11-79-100-100-c-0-ksc5601.1987-0
got charset -isas-fangsong ti-medium-r-normal--11-79-100-100-c-0-gb2312.1980-0
got charset -misc-fixed-medium-r-normal--11-79-100-100-c-0-jisx0201.1976-0
got charset -adobe-helvetica-medium-r-normal--11-80-100-100-p-56-iso10646-1
Requested font set for list -*-helvetica-bold-r-normal--12-*-*-*-*-*-*-*,-misc-fixed-bold-r-normal--12-*-*-*-*-*-*-*,-*-*-*-*-*-*-12-*-*-*-*-*-*-*
got list -*-helvetica-bold-r-normal--12-*-*-*-*-*-*-*,-misc-fixed-bold-r-normal--12-*-*-*-*-*-*-*,-*-*-*-*-*-*-12-*-*-*-*-*-*-*, locale en_US.UTF-8
got charset -adobe-helvetica-bold-r-normal--12-120-75-75-p-70-iso8859-1
got charset -adobe-helvetica-bold-r-normal--12-120-75-75-p-70-iso8859-1
got charset -misc-fixed-bold-r-normal--12-87-100-100-c-0-iso8859-2
got charset -misc-fixed-bold-r-normal--12-87-100-100-c-0-iso8859-3
got charset -misc-fixed-bold-r-normal--12-87-100-100-c-0-iso8859-4
got charset -misc-fixed-bold-r-normal--12-87-100-100-c-0-iso8859-5
got charset -misc-fixed-medium-r-semicondensed--12-110-75-75-c-60-koi8-r
got charset -misc-fixed-bold-r-normal--12-87-100-100-c-0-iso8859-7
got charset -misc-fixed-bold-r-normal--12-87-100-100-c-0-iso8859-9
got charset -misc-fixed-bold-r-normal--12-87-100-100-c-0-iso8859-13
got charset -misc-fixed-bold-r-normal--12-87-100-100-c-0-iso8859-14
got charset -misc-fixed-bold-r-normal--12-87-100-100-c-0-iso8859-15
got charset -jis-fixed-medium-r-normal--12-87-100-100-c-0-jisx0208.1983-0
got charset -daewoo-gothic-medium-r-normal--12-87-100-100-c-0-ksc5601.1987-0
got charset -isas-fangsong ti-medium-r-normal--12-87-100-100-c-0-gb2312.1980-0
got charset -misc-fixed-medium-r-normal--12-87-100-100-c-0-jisx0201.1976-0
got charset -adobe-helvetica-bold-r-normal--12-120-75-75-p-70-iso10646-1
Requested font set for list -*-helvetica-bold-r-normal--8-*-*-*-*-*-*-*,-misc-fixed-bold-r-normal--8-*-*-*-*-*-*-*,-*-*-*-*-*-*-8-*-*-*-*-*-*-*
got list -*-helvetica-bold-r-normal--8-*-*-*-*-*-*-*,-misc-fixed-bold-r-normal--8-*-*-*-*-*-*-*,-*-*-*-*-*-*-8-*-*-*-*-*-*-*, locale en_US.UTF-8
got charset -adobe-helvetica-bold-r-normal--8-80-75-75-p-50-iso8859-1
got charset -adobe-helvetica-bold-r-normal--8-80-75-75-p-50-iso8859-1
got charset -misc-fixed-bold-r-normal--8-58-100-100-c-0-iso8859-2
got charset -misc-fixed-bold-r-normal--8-58-100-100-c-0-iso8859-3
got charset -misc-fixed-bold-r-normal--8-58-100-100-c-0-iso8859-4
got charset -misc-fixed-bold-r-normal--8-58-100-100-c-0-iso8859-5
got charset -misc-fixed-medium-r-normal--8-80-75-75-c-50-koi8-r
got charset -misc-fixed-bold-r-normal--8-58-100-100-c-0-iso8859-7
got charset -misc-fixed-bold-r-normal--8-58-100-100-c-0-iso8859-9
got charset -misc-fixed-bold-r-normal--8-58-100-100-c-0-iso8859-13
got charset -misc-fixed-bold-r-normal--8-58-100-100-c-0-iso8859-14
got charset -misc-fixed-bold-r-normal--8-58-100-100-c-0-iso8859-15
got charset -jis-fixed-medium-r-normal--8-58-100-100-c-0-jisx0208.1983-0
got charset -daewoo-gothic-medium-r-normal--8-58-100-100-c-0-ksc5601.1987-0
got charset -isas-fangsong ti-medium-r-normal--8-58-100-100-c-0-gb2312.1980-0
got charset -misc-fixed-medium-r-normal--8-58-100-100-c-0-jisx0201.1976-0
got charset -adobe-helvetica-bold-r-normal--8-80-75-75-p-50-iso10646-1
Version: xboard 4.7.3 + sjeng ()
Reset(1, 0) from gameMode 0
recognized 'normal' (-1) as variant normal
GameEnds(0, (null), 2)
shuffleOpenings = 0
StartChildProcess (dir="/usr/games/") ./sjeng
2703 >first : xboard
protover 2
shuffleOpenings = 0
2917 <first : Allocated 2*1000000 hash entries, totalling 40000000 bytes.
2918 <first : Allocated 1000000 quiescenthash entries, totalling 16000000 bytes.
2918 <first : Allocated 4000 eval cache entries, totalling 48000 bytes.
2918 <first : No .OPN opening book found.
2918 <first :
2918 <first : Sjeng version 11.2, Copyright (C) 2000-2001 Gian-Carlo Pascutto
patzer1
 
Posts: 10
Joined: 07 Aug 2013, 11:32

Re: Engine Search Depth Limit Xboard FICS

Postby H.G.Muller » 29 Sep 2014, 21:42

Oops, that is not enough lines. Hadn't counted on so many fonts to be loaded (and Sjeng is pretty talkative too). Can you post some ore lines, until the engine starts actually producing thinking output?
User avatar
H.G.Muller
 
Posts: 3453
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL

Re: Engine Search Depth Limit Xboard FICS

Postby patzer1 » 30 Sep 2014, 19:31

Got it. Here are more lines with -searchDepth 4 (login info,match challenge msgs,similar move lines removed):
recognized 'unrated crazyhouse match.' (-1) as variant crazyhouse
Switch board from normal to crazyhouse
shuffleOpenings = 0
Parsing board: rnbqkbnr pppppppp -------- -------- -------- -------- PPPPPPPP RNBQKBNR W -1 1 1 1 1 0 281 SjengBOT iAttacker 1 2 2 39 39 120000 120000 1 none (0:00.000) none 0 0 0

recognized 'ICS unrated crazyhouse match' (-1) as variant crazyhouse
ParseBoard says variant = 'ICS unrated crazyhouse match'
recognized as crazyhouse
Remembered ratings: W 0, B 1375
load 8x8 board
25921 >first : variant crazyhouse
25935 >first : level 0 2 2
25935 >first : rating 0 1375
25935 >first : black
25935 >first : time 12000
25935 >first : otim 12000
25935 >first : white
book hit = (NULL)
25935 >first : go
Parsing holdings: game 281 white [] black []
, currentMove = 0
25935 >first : holding [] []
26034 <first : No BinBook found.
26034 <first : Opening phase.
26034 <first : Time for move : 602
26092 <first : 2 -17 6 21 e4 <d5>
26098 <first : 2 -17 6 21 e4 <d5>
.........................
29214 <first : 10 -11 318 366565 Nc3 Nc6 <a3>
29214 <first : 10 -11 318 366565 Nc3 Nc6 <a3>
29268 <first : 10 -10 323 382365 Nf3 !
32061 <first : 10 -10 603 884736 Nc3 Nc6 <a3>
32062 <first : Used time : 603
32062 <first : tellics whisper d9 -0.10 Nc3 Nc6 <a3> n: 884736 qp: 4% fh: 82% c-x: 19353 r-x: 7167 1-x: 8 egtb: 0 time: 6.03 nps: 213625
>ICS: whisper d9 -0.10 Nc3 Nc6 <a3> n: 884736 qp: 4% fh: 82% c-x: 19353 r-x: 7167 1-x: 8 egtb: 0 time: 6.03 nps: 213625
>ICS: \015\012
32063 <first : Learning score: -10 best: 1 depth:9 hash: 92B5E2E5
32063 <first :
32063 <first : Nodes: 884736 (3.57% qnodes)
32063 <first : NPS: 212396
32063 <first : ECacheProbes : 670698 ECacheHits : 5424 HitRate : 0.808709%
32063 <first : TTStores : 712423 TTProbes : 977961 TTHits : 199489 HitRate : 20.398441%
32063 <first : NTries : 93458 NCuts : 34353 CutRate : 36.757295% TExt: 8
32063 <first : Check extensions: 19353 Razor drops : 16832 Razor Material : 246570
32063 <first : EGTB Hits: 0 EGTB Probes: 0 Efficiency: 0.0%
32063 <first : Move ordering : 81.659432%
32064 <first : Material score: 0 Eval : 88 White hand: 0 Black hand : 0
32064 <first : Hash : 194F5BB4 HoldHash : C0FFEE00
32064 <first : move b1c3
>ICS: b1c3\015\012
<ICS: SjengBOT(U)(----)[281] whispers: d9 -0.10 Nc3 Nc6 <a3> n: 884736 qp: 4% fh: 82% c-x: 19353 r-x: \012\015\ 7167 1-x: 8 egtb: 0 time: 6.03 nps: 213625\012\015(whispered to 0 players)\012\015fics% \007\012\015<12> rnbqkbnr pppppppp -------- -------- -------- --N----- PPPPPPPP R-BQKBNR B -1 1 1 1 1 0 281 SjengBOT iAttacker -1 2 2 39 39 120000 120000 1 N/b1-c3 (0:00.000) Nc3 0 0 0\012\015<b1> game 281 white [] black []\012\015fics%
ics input 1, castling = 9 2 6 9 2 6
Parsing board: rnbqkbnr pppppppp -------- -------- -------- --N----- PPPPPPPP R-BQKBNR B -1 1 1 1 1 0 281 SjengBOT iAttacker -1 2 2 39 39 120000 120000 1 N/b1-c3 (0:00.000) Nc3 0 0 0

load 8x8 board
parseboard 1, castling = 9 2 6 9 2 6
accepted move Nc3 from ICS, parse it.
moveNum = 1
board = 2-10 x 8
Move parsed to 'Nc3 (0:00.000)'
Parsing holdings: game 281 white [] black []
, currentMove = 1
33146 >first : holding [] []
<ICS: \007\012\015<12> r-bqkbnr pppppppp --n----- -------- -------- --N----- PPPPPPPP R-BQKBNR W -1 1 1 1 1 0 281 SjengBOT iAttacker 1 2 2 39 39 120000 120000 2 N/b8-c6 (0:00.000) Nc6 0 1 0\012\015<b1> game 281 white [] black []\012\015fics%
ics input 1, castling = 9 2 6 9 2 6
Parsing board: r-bqkbnr pppppppp --n----- -------- -------- --N----- PPPPPPPP R-BQKBNR W -1 1 1 1 1 0 281 SjengBOT iAttacker 1 2 2 39 39 120000 120000 2 N/b8-c6 (0:00.000) Nc6 0 1 0
.............................
patzer1
 
Posts: 10
Joined: 07 Aug 2013, 11:32

Re: Engine Search Depth Limit Xboard FICS

Postby H.G.Muller » 30 Sep 2014, 22:31

OK, the 'sd N' command (which is the WB protocol command that should be sent to the engine to relay the XBoard option -searchDepth N) is indeed not sent to the engine. I scrutinized the Zippy code, and it turns out that in Zippy mode this option is completely ignored. Only bastime and inc as obtained from the ICS are sent in a level command.

I guess the following work-around can be used: add the extra option on the XBoard command line

-firstInitString {new\nrandom\nsd 9\n}

This forces sending of an 'sd 9' command to the engine, as part of the init string.
User avatar
H.G.Muller
 
Posts: 3453
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL

Re: Engine Search Depth Limit Xboard FICS

Postby patzer1 » 10 Oct 2014, 18:58

Sorry for delayed reply.

My bot failed to work with the workaround. I tried these

-fcp "./sjeng" -searchDepth 5 -firstInitString {new\nrandom\nsd 5\n} -ics -icshost freechess.org -icslogon ~/logonS -zippyBughouse 2

Result:
Bot plays as white with ignoring the depth limit 5
Rematch, bot as black , doesnt make any more any more. Even after abort - rematch
fics% xboard: Illegal move "c4 (0:00.000)" (rejected by first chess program)
fics% xboard: Illegal move "e6d7" from first machine
fics% xboard: Illegal move "c3d5" from first machine

-fcp "./sjeng -sd 5" -searchDepth 5 -firstInitString {new\nrandom\nsd 5\n} -ics -icshost freechess.org -icslogon ~/logonS -zippyBughouse 2
Result:
Bot as black - plays ignoring depth limit
Rematch: Bot as white - doesnt move

xboard.debug lines:
............
recognized 'ICS unrated crazyhouse match' (-1) as variant crazyhouse
ParseBoard says variant = 'ICS unrated crazyhouse match'
recognized as crazyhouse
Remembered ratings: W 0, B 1375
load 8x8 board
647432 >first : variant crazyhouse
647434 >first : level 0 2 1
647434 >first : rating 0 1375
647434 >first : black
647434 >first : time 12000
647435 >first : otim 12000
647435 >first : white
book hit = (NULL)
647435 >first : go
Parsing holdings: game 28 white [] black []
, currentMove = 0
647435 >first : holding [] []


-fcp "./sjeng -sd 5" -firstInitString {new\nrandom\nsd 5\n} -ics -icshost freechess.org -icslogon ~/logonS -zippyBughouse 2
Result:
Engine as white plays ignoring limit
Rematch - Engine as Black

fics% xboard: Illegal move "c4 (0:00.000)" (rejected by first chess program)
abort - rematch - engine as white
fics% xboard: Illegal move "c2c6" from first machine

xboard.debug lines .. i aborted coz it didnt move
recognized 'ICS unrated crazyhouse match' (-1) as variant crazyhouse
ParseBoard says variant = 'ICS unrated crazyhouse match'
recognized as crazyhouse
Remembered ratings: W 0, B 1375
load 8x8 board
333292 >first : variant crazyhouse
333310 >first : level 0 2 1
333310 >first : rating 0 1375
333310 >first : black
333310 >first : time 12000
333311 >first : otim 12000
333311 >first : white
book hit = (NULL)
333311 >first : go
Parsing holdings: game 134 white [] black []
, currentMove = 0
333311 >first : holding [] []
333382 <first : No BinBook found.
333383 <first : Opening phase.
333383 <first : Time for move : 601
333433 <first : 2 941 4 220 Rb1+ !
333434 <first : 2 1039 5 312 Qd1+ !
333435 <first : 2 1106 5 413 Qxc6+ !
333435 <first : 2 1135 5 442 Qxc6+ !!
333441 <first : 2 1163 5 658 Bxg6+ !
333447 <first : 2 1318 5 826 Bxg6+ Kh8 Bxh7
333471 <first : 3 1024 8 2025 Bxg6+
333518 <first : 4 1369 13 5965 Bxg6+ illg Bxh7+
333620 <first : 5 1369 23 12433 Bxg6+ illg <Bxh7+>
334354 <first : 6 1270 97 61702 Qxc6+ !
334878 <first : 6 1270 149 94925 Qxc6+
339458 <first : Used time : 607
339458 <first : Learning score: 1270 best: 18 depth:6 hash: DC1F5B79
339459 <first :
339459 <first : Nodes: 401408 (5.73% qnodes)
339459 <first : NPS: 142242
339459 <first : ECacheProbes : 307439 ECacheHits : 4542 HitRate : 1.477361%
339459 <first : TTStores : 327744 TTProbes : 457019 TTHits : 69873 HitRate : 15.288828%
339459 <first : NTries : 54228 NCuts : 26563 CutRate : 48.983016% TExt: 295
339459 <first : Check extensions: 34458 Razor drops : 48673 Razor Material : 629328
339459 <first : EGTB Hits: 0 EGTB Probes: 0 Efficiency: 0.0%
339459 <first : Move ordering : 92.032166%
339459 <first : Material score: 740 Eval : -863 White hand: 100 Black hand : 0
339459 <first : Hash : 8D04AB8E HoldHash : 6AB40CE2
339459 <first : move c2c6
<ICS: \012\015Your opponent has aborted the game on move one.
patzer1
 
Posts: 10
Joined: 07 Aug 2013, 11:32

Re: Engine Search Depth Limit Xboard FICS

Postby H.G.Muller » 10 Oct 2014, 23:01

I suspect that somehow the newlines in the initString were mutilated by the shell in the start command, e.g. removing the backslashes and sending plain 'n' in stead of linefeed. But the part of the debug you posted just omits the sending of the initString, which should have come just before the variant command. (But timewise possibly much earlier.)

You could try to double the backslashes in the string I gave. An alternative is to enter the linefeeds really as linefeeds (with a backslash escape in front of them, to prevent the shell thinks they end the command line:

xboard -ics -cshost ...... -initString new\
random\
sd 9

Then the shell will also remove the backslashes, but keep the linefeeds.
User avatar
H.G.Muller
 
Posts: 3453
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL


Return to Winboard and related Topics

Who is online

Users browsing this forum: No registered users and 46 guests