cutechess-cli fixed depth search

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

phjal

cutechess-cli fixed depth search

Post by phjal »

Hello everyone!

I just returned to my chess program that I've worked on from time to time for the last few years. Now I decided to try automated tuning with CLOP using cutechess-cli with fixed depth search.

After some testing I realized my UCI engine didn't interpret the command correctly. Cutechess sent "go infinite depth 8", which my engine took as an infinite search.

Now my question is: Is this a standard UCI command? I can change my engine to correct this obviously, but it seems other engines have the same problem. Or is it that I'm simply calling it wrong? The command line would be something like "cutechess-cli.exe -fcp conf=engine1 -scp conf=engine2 -both tc=inf depth=8"

On a side note, would you consider fixed depth or fixed nodecount as better for tuning?

Thanks in advance!
Ferdy
Posts: 4833
Joined: Sun Aug 10, 2008 3:15 pm
Location: Philippines

Re: cutechess-cli fixed depth search

Post by Ferdy »

phjal wrote:Hello everyone!

I just returned to my chess program that I've worked on from time to time for the last few years. Now I decided to try automated tuning with CLOP using cutechess-cli with fixed depth search.

After some testing I realized my UCI engine didn't interpret the command correctly. Cutechess sent "go infinite depth 8", which my engine took as an infinite search.

Now my question is: Is this a standard UCI command? I can change my engine to correct this obviously, but it seems other engines have the same problem. Or is it that I'm simply calling it wrong? The command line would be something like "cutechess-cli.exe -fcp conf=engine1 -scp conf=engine2 -both tc=inf depth=8"

On a side note, would you consider fixed depth or fixed nodecount as better for tuning?

Thanks in advance!
Use st=10 for example for 10 sec instead of tc=inf.
Use fix depth if changes are in evaluation and fix nodes if changes are done on search - try to experiment with that to get fast result. Then finally do normal time controls and check if what you get in fix depth and fix nodes still holds, maybe better go directly for normal TC.
phjal

Re: cutechess-cli fixed depth search

Post by phjal »

Thanks for the advice!

Fixed movetime seems like more of a workaround, but I guess I'll just change my engine and live with it, using engines that understands the command.

As for fixed depth/nodecount, I should have mentioned that I'm tuning evaluation. Nodecount for search makes perfect sense, of course. In fact, I just stripped my engine of all reductions like null move pruning, lmr, futility pruning etc., figuring I would do better improving my evaluation before tweaking the search.

I wanted to avoid tc so that processor load didn't matter, and also my engine seems a bit unstable at very short times, I have never figured out why.
User avatar
lucasart
Posts: 3232
Joined: Mon May 31, 2010 1:29 pm
Full name: lucasart

Re: cutechess-cli fixed depth search

Post by lucasart »

phjal wrote:Hello everyone!

I just returned to my chess program that I've worked on from time to time for the last few years. Now I decided to try automated tuning with CLOP using cutechess-cli with fixed depth search.

After some testing I realized my UCI engine didn't interpret the command correctly. Cutechess sent "go infinite depth 8", which my engine took as an infinite search.

Now my question is: Is this a standard UCI command? I can change my engine to correct this obviously, but it seems other engines have the same problem. Or is it that I'm simply calling it wrong? The command line would be something like "cutechess-cli.exe -fcp conf=engine1 -scp conf=engine2 -both tc=inf depth=8"

On a side note, would you consider fixed depth or fixed nodecount as better for tuning?

Thanks in advance!
I'm not sure if the UCI standard specifies this, but I'd say "go infinite depth 8" is not correct. cutechess-cli should in this instance send "go depth 8" simply.
What I do in my engine is to take all the conditions into account, and stop the search when the first one is hit: example
go infinite depth 10 nodes 1000000 movetime 1000
will stop whenever the first condition is hit between:
* 1 second has elapsed
* 1000000 nodes have been searched
* depth 10 has been searched
(* infinity is not reached, which is a non condition)

It just seemed logical to me, but I didn't see any precise specification in the UCI standard about this. Perhaps I read an outdated standard. I dont know.
phjal

Re: cutechess-cli fixed depth search

Post by phjal »

lucasart wrote: I'm not sure if the UCI standard specifies this, but I'd say "go infinite depth 8" is not correct. cutechess-cli should in this instance send "go depth 8" simply.
What I do in my engine is to take all the conditions into account, and stop the search when the first one is hit: example
go infinite depth 10 nodes 1000000 movetime 1000
will stop whenever the first condition is hit between:
* 1 second has elapsed
* 1000000 nodes have been searched
* depth 10 has been searched
(* infinity is not reached, which is a non condition)

It just seemed logical to me, but I didn't see any precise specification in the UCI standard about this. Perhaps I read an outdated standard. I dont know.
I solved it the same way, I can't see any other way that would make sense.

regarding the standard, I've only read the short one page definition, and it is not very specific on the details, but I agree that "go infinite depth 8" is a strange command. Before I encountered this I had always assumed the different search states to be exclusive, and it still seems natural to me.

On the other hand, I guess it might be good to have a some time limit condition to avoid engines getting stuck in a search too long, because of a search explosion or a hanging program.
User avatar
ilari
Posts: 750
Joined: Mon Mar 27, 2006 7:45 pm
Location: Finland

Re: cutechess-cli fixed depth search

Post by ilari »

I thought it would be useful to combine node and depth limits with time limits. But clearly a combination of "infinite" and "depth" or "nodes" isn't understood by most UCI engines, so I have now changed this. In the next version (or current version if you download the source code) "infinite" won't be sent if there's a node or depth limit. Cutechess-cli still requires a value for the "tc" option, so "tc=inf" should be used.