Max Search Depth: Stockfish 2.0.1 + Polyglot + XBoard

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

FlavusSnow
Posts: 89
Joined: Thu Apr 01, 2010 5:28 am
Location: Omaha, NE

Max Search Depth: Stockfish 2.0.1 + Polyglot + XBoard

Post by FlavusSnow »

I want to limit Stockfish's search depth to 4 ply. I'm using Stockfish 2.0.1, Polyglot with polyglot.ini, and xboard 4.4.4.

I loaded Stockfish and typed 'uci' and have found no UCI command for specifying a fixed search depth.

I tried the -searchDepth flag in the xboard command line. This works when I play against it directly, but it does NOT work when I connect to an internet chess server. It seems to revert back to a full search based on time.

Any help?
User avatar
JuLieN
Posts: 2949
Joined: Mon May 05, 2008 12:16 pm
Location: Bordeaux (France)
Full name: Julien Marcel

Re: Max Search Depth: Stockfish 2.0.1 + Polyglot + XBoard

Post by JuLieN »

Hello James,

with the UCI protocol, there is no "general game settings" : each time it's the computer's turn, the interface tells it how many time it has or how it has to search. For instance, in your case, the interface will tell the engine "go depth 4". To summarize : this settings is set by you in the interface and then the interface tells the engine how to search each time it's its turn to play.

EDIT: more details there : http://wbec-ridderkerk.nl/html/UCIProtocol.html
"The only good bug is a dead bug." (Don Dailey)
[Blog: http://tinyurl.com/predateur ] [Facebook: http://tinyurl.com/fbpredateur ] [MacEngines: http://tinyurl.com/macengines ]
FlavusSnow
Posts: 89
Joined: Thu Apr 01, 2010 5:28 am
Location: Omaha, NE

Re: Max Search Depth: Stockfish 2.0.1 + Polyglot + XBoard

Post by FlavusSnow »

Ok, so then this becomes an Xboard question. I've set the searchDepth flag to 4 and it does limit the search to 4 ply when playing offline, but once I turn on -ics and -zippy, its almost like it ignores the -searchDepth.

Maybe Polyglot is doing the ignoring...
FlavusSnow
Posts: 89
Joined: Thu Apr 01, 2010 5:28 am
Location: Omaha, NE

Re: Max Search Depth: Stockfish 2.0.1 + Polyglot + XBoard

Post by FlavusSnow »

I went ahead and just modified the stockfish source to only search 4 ply... and it works now...amazing.
User avatar
hgm
Posts: 27796
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Max Search Depth: Stockfish 2.0.1 + Polyglot + XBoard

Post by hgm »

I looked at the XBoard code, and indeed it seems XBoard only pays attention to the user-given time-control parameters (searchTime, searchDepth, movesPerSession, timeControl, increment) when not in ICS/zippy mode. In the latter case it follows what the ICS says.

The workaround would be to force XBoard to send the sd 3 command with the new command, by specifying the command-line option:

-initString "new\nrandom\nsd 3\n"

This should limit the depth of the engine to 3 ply always.