Cutechess-cli Time Control: Me or Bug

Discussion of chess software programming and technical issues.

Moderators: bob, hgm, Harvey Williamson

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
Cheney
Posts: 85
Joined: Thu Sep 27, 2012 12:24 am

Cutechess-cli Time Control: Me or Bug

Post by Cheney » Fri May 19, 2017 8:32 pm

Hi,

I looked around, found another thread on the latest release of cutechess, apologies if this post should go on that older thread.

I am trying to use cutechess-cli to run some tests with a time control of three seconds plus one second increments. My engine is an xboard protocol engine. So, when set tc=0/0:03+1, the xboard TIME command is 1100.

It seems as if when I remove the +1 the TIME command is accurate with 300. This happens for different time controls.

Or, is it me, am I not setting the tc correctly?

Thank you!

Ferdy
Posts: 4223
Joined: Sun Aug 10, 2008 1:15 pm
Location: Philippines

Re: Cutechess-cli Time Control: Me or Bug

Post by Ferdy » Fri May 19, 2017 8:59 pm

Cheney wrote:Hi,

I looked around, found another thread on the latest release of cutechess, apologies if this post should go on that older thread.

I am trying to use cutechess-cli to run some tests with a time control of three seconds plus one second increments. My engine is an xboard protocol engine. So, when set tc=0/0:03+1, the xboard TIME command is 1100.

It seems as if when I remove the +1 the TIME command is accurate with 300. This happens for different time controls.

Or, is it me, am I not setting the tc correctly?

Thank you!
At 3s base + 1s inc/move, for cutechess that would be:

Code: Select all

tc=3+1
See the debug of cutechess how it would send it to WB engines by adding the following in the command line and examine the log later.

Code: Select all

-debug >cutechess.log

Code: Select all

  tc=TIMECONTROL        Set the time control to TIMECONTROL. The format is
                        moves/time+increment, where 'moves' is the number of
                        moves per tc, 'time' is time per tc (either seconds or
                        minutes:seconds), and 'increment' is time increment
                        per move in seconds.
                        Infinite time control can be set with 'tc=inf'.

Sven
Posts: 3833
Joined: Thu May 15, 2008 7:57 pm
Location: Berlin, Germany
Full name: Sven Schüle
Contact:

Re: Cutechess-cli Time Control: Me or Bug

Post by Sven » Fri May 19, 2017 9:03 pm

Cheney wrote:I am trying to use cutechess-cli to run some tests with a time control of three seconds plus one second increments. My engine is an xboard protocol engine. So, when set tc=0/0:03+1, the xboard TIME command is 1100.

It seems as if when I remove the +1 the TIME command is accurate with 300. This happens for different time controls.

Or, is it me, am I not setting the tc correctly?
The correct xboard command would be "level 0 0:03 1". If you do not see this command being sent to your engine by cutechess-cli then it seems that you are not setting the time control correctly.

Do you set "-each" prior to "tc=0/0:03+1"?

Sven
Posts: 3833
Joined: Thu May 15, 2008 7:57 pm
Location: Berlin, Germany
Full name: Sven Schüle
Contact:

Re: Cutechess-cli Time Control: Me or Bug

Post by Sven » Fri May 19, 2017 9:11 pm

Ferdy wrote:At 3s base + 1s inc/move, for cutechess that would be:

Code: Select all

tc=3+1
That does not match the documentation which would require "tc=0/3+1" or "tc=0/0:03+1".
Ferdy wrote:

Code: Select all

  tc=TIMECONTROL        Set the time control to TIMECONTROL. The format is
                        moves/time+increment, where 'moves' is the number of
                        moves per tc, 'time' is time per tc (either seconds or
                        minutes:seconds), and 'increment' is time increment
                        per move in seconds.
                        Infinite time control can be set with 'tc=inf'.

Ferdy
Posts: 4223
Joined: Sun Aug 10, 2008 1:15 pm
Location: Philippines

Re: Cutechess-cli Time Control: Me or Bug

Post by Ferdy » Fri May 19, 2017 9:33 pm

Sven Schüle wrote:
Ferdy wrote:At 3s base + 1s inc/move, for cutechess that would be:

Code: Select all

tc=3+1
That does not match the documentation which would require "tc=0/3+1" or "tc=0/0:03+1".
Ferdy wrote:

Code: Select all

  tc=TIMECONTROL        Set the time control to TIMECONTROL. The format is
                        moves/time+increment, where 'moves' is the number of
                        moves per tc, 'time' is time per tc (either seconds or
                        minutes:seconds), and 'increment' is time increment
                        per move in seconds.
                        Infinite time control can be set with 'tc=inf'.
Yes it does not match the documention but they are the same. Also tc=3+1 is more sensible than tc=0/3+1 because there is no such thing as 0 moves period.

Cheney
Posts: 85
Joined: Thu Sep 27, 2012 12:24 am

Re: Cutechess-cli Time Control: Me or Bug

Post by Cheney » Fri May 19, 2017 10:55 pm

I have tried all variations, here are some samples:

tc=2+1
tc=0:02+1
tc=0/2+1
tc=40/2:30+1

etc.

I do receive the proper level command for each from cutechess-cli, but once cutechess-cli sends the TIME (and OTIM) command, the values are off. When I remove the increment, the time and otim commands are accurate.

I did test this with the gui and the commands are correct.

Cheney
Posts: 85
Joined: Thu Sep 27, 2012 12:24 am

Re: Cutechess-cli Time Control: Me or Bug

Post by Cheney » Fri May 19, 2017 10:56 pm

I do see the correct level command and have tested with and without -each.

I am using the GUI and it does not have this issue.

Ferdy
Posts: 4223
Joined: Sun Aug 10, 2008 1:15 pm
Location: Philippines

Re: Cutechess-cli Time Control: Me or Bug

Post by Ferdy » Sat May 20, 2017 12:09 pm

Cheney wrote:Hi,

I looked around, found another thread on the latest release of cutechess, apologies if this post should go on that older thread.

I am trying to use cutechess-cli to run some tests with a time control of three seconds plus one second increments. My engine is an xboard protocol engine. So, when set tc=0/0:03+1, the xboard TIME command is 1100.
Where did you get 1100?

Ferdy
Posts: 4223
Joined: Sun Aug 10, 2008 1:15 pm
Location: Philippines

Re: Cutechess-cli Time Control: Me or Bug

Post by Ferdy » Sat May 20, 2017 10:53 pm

Cheney wrote:Hi,

I looked around, found another thread on the latest release of cutechess, apologies if this post should go on that older thread.

I am trying to use cutechess-cli to run some tests with a time control of three seconds plus one second increments. My engine is an xboard protocol engine. So, when set tc=0/0:03+1, the xboard TIME command is 1100.

It seems as if when I remove the +1 the TIME command is accurate with 300. This happens for different time controls.

Or, is it me, am I not setting the tc correctly?

Thank you!
I tried both cutechess-cli 0.8.2 and winboard 4.8 and they sent
time 300

Cheney
Posts: 85
Joined: Thu Sep 27, 2012 12:24 am

Re: Cutechess-cli Time Control: Me or Bug

Post by Cheney » Sun May 21, 2017 12:05 am

I see the time 1100 in both my engine's logging plus int cutechess's debugging output. Here's a sample:

cutechess-cli -each tc=0/0:03+1 -engine cmd=engine1.exe dir=C:\chess\Engines\one proto=xboard -engine cmd=engine2.exe dir=C:\chess\Engines\two proto=xboard -rounds 500 -pgnout timetest.pgn -repeat -openings file=500-openings.pgn format=pgn order=sequential -debug

35 >XboardEngine(0): xboard
... extras omitted ...
227 >engine1(0): new
228 >engine1(0): level 0 0:03 1
230 >engine1(0): post
231 >engine1(0): easy
232 >engine1(0): force
235 >engine2(1): new
236 >engine2(1): level 0 0:03 1
237 >engine2(1): post
238 >engine2(1): easy
239 >engine2(1): force
284 >engine1(0): ping 10
285 <engine1(0): Error (post): unknown command
287 <engine1(0): pong 10
288 >engine1(0): time 1100
289 >engine1(0): otim 1100
290 >engine1(0): go

The level lines are correct but time should be 300.

If I increase the increment to 5, time is 4300.

When I remove the +1 in the tc and leave it as 0/0:03, then time is 300.

cutechess-cli 0.8.5
Using Qt version 5.7.0

WinBoard 4.6.2 works fine as does the CuteChess GUI.

Post Reply