UCI seldepth?

Discussion of chess software programming and technical issues.

Moderator: Ras

JoAnnP38
Posts: 253
Joined: Mon Aug 26, 2019 4:34 pm
Location: Clearwater, Florida USA
Full name: JoAnn Peeler

UCI seldepth?

Post by JoAnnP38 »

Can someone please explain to me why what the UCI data item seldepth is? It is used along with depth to describe the status of the search, but I'm not sure exactly what it is. Could someone break it down for me? Below are the relevant pieces of information from the UCI specifications. Unfortunately, they don't really help me much.

Code: Select all

* info
	the engine wants to send information to the GUI. This should be done whenever one of the info has changed.
	The engine can send only selected infos or multiple infos with one info command,
	e.g. "info currmove e2e4 currmovenumber 1" or
	     "info depth 12 nodes 123456 nps 100000".
	Also all infos belonging to the pv should be sent together
	e.g. "info depth 2 score cp 214 time 1242 nodes 2124 nps 34928 pv e2e4 e7e5 g1f3"
	I suggest to start sending "currmove", "currmovenumber", "currline" and "refutation" only after one second
	to avoid too much traffic.
	Additional info:
	* depth <x>
		search depth in plies
	* seldepth <x>
		selective search depth in plies,
		if the engine sends seldepth there must also be a "depth" present in the same string.
		.
		.
		.
// the engine starts sending infos about the search to the GUI
// (only some examples are given)


		info depth 1 seldepth 0
		info score cp 13  depth 1 nodes 13 time 15 pv f1b5 
		info depth 2 seldepth 2
		info nps 15937
		info score cp 14  depth 2 nodes 255 time 15 pv f1c4 f8c5 
		info depth 2 seldepth 7 nodes 255
		info depth 3 seldepth 7
		info nps 26437
		info score cp 20  depth 3 nodes 423 time 15 pv f1c4 g8f6 b1c3 
		info nps 41562
		....
User avatar
mvanthoor
Posts: 1784
Joined: Wed Jul 03, 2019 4:42 pm
Location: Netherlands
Full name: Marcel Vanthoor

Re: UCI seldepth?

Post by mvanthoor »

JoAnnP38 wrote: Thu Apr 13, 2023 9:11 am Can someone please explain to me why what the UCI data item seldepth is?
It's something else for every engine. It depends on what you classify as "selective search" in your engine. I did it like this: Initially, "depth" and "seldepth" have the same value when running through alpha-beta. However, when in QSearch, I increase only seldepth (I classify QSearch as selective search.) If I would have other extensions before QSearch, they would also increase seldepth.

So in essence, "depth" is used to show how deep alpha-beta went, and "seldepth" shows what the greatest achieved depth in a search run is.

Seldepth is just an informational metric. When I implement SEE and some prunings for QSearch, it will cut off sooner and thus seldepth will decrease. However, because the engine will search much less nodes it'll have more time to reach a "real" depth in alpha-beta and thus become stronger.
Author of Rustic, an engine written in Rust.
Releases | Code | Docs | Progress | CCRL
User avatar
Steve Maughan
Posts: 1273
Joined: Wed Mar 08, 2006 8:28 pm
Location: Florida, USA

Re: UCI seldepth?

Post by Steve Maughan »

I interpret seldepth as the deepest line in the search, whereas the depth is guaranteed depth of the mainline (assuming you're not reducing the depth of the mainline).

Steve
http://www.chessprogramming.net - Juggernaut & Maverick Chess Engine