What makes 1-cpu program un-deterministic?

Discussion of chess software programming and technical issues.

Moderator: Ras

Jouni
Posts: 3791
Joined: Wed Mar 08, 2006 8:15 pm
Full name: Jouni Uski

Re: What makes 1-cpu program un-deterministic?

Post by Jouni »

I ran same 48 position testsuite with 1-cpu Critter twice in latest Arena and Deep Fritz 12 GUI. That's the reason for original post!

Arena GUI:

* 4 Seconds * 4 Seconds


* 1 Second * 1 Second
* 16 Seconds * 16 Seconds
* 6 Seconds * 6 Seconds
* 8 Seconds * 8 Seconds

* 2 Seconds * 2 Seconds
* 0 Seconds * 0 Seconds

* 1 Second * 1 Second
* 0 Seconds * 0 Seconds
* 13 Seconds * 13 Seconds
* 1 Second * 1 Second
* 7 Seconds * 8 Seconds

* 1 Second * 1 Second
* 1 Second * 1 Second
* 18 Seconds * 18 Seconds




* 1 Second * 1 Second
* 4 Seconds * 5 Seconds

* 1 Second * 1 Second
* 29 Seconds * 29 Seconds
* 0 Seconds * 0 Seconds

* 12 Seconds * 13 Seconds

* 0 Seconds * 0 Seconds

* 13 Seconds * 13 Seconds

* 0 Seconds * 0 Seconds
* 0 Seconds * 0 Seconds

* 9 Seconds * 9 Seconds
* 1 Second * 1 Second

* 22 Seconds * 22 Seconds
* 2 Seconds * 2 Seconds
* 0 Seconds * 0 Seconds

30 30

But in Fritz GUI:

0:00:06 0:00:08
0:00:30 0:00:30
0:00:30 0:00:30
0:00:02 0:00:02
0:00:07 0:00:10
0:00:02 0:00:04
0:00:08 0:00:04
0:00:30 0:00:30
0:00:04 0:00:00
0:00:00 0:00:00
0:00:30 0:00:30
0:00:01 0:00:01
0:00:17 0:00:01
0:00:15 0:00:30
0:00:00 0:00:01
0:00:30 0:00:02
0:00:30 0:00:30
0:00:01 0:00:01
0:00:01 0:00:03
0:00:06 0:00:30
0:00:30 0:00:30
0:00:07 0:00:10
0:00:30 0:00:30
0:00:30 0:00:30
0:00:06 0:00:04
0:00:07 0:00:06
0:00:02 0:00:04
0:00:01 0:00:01
0:00:22 0:00:30
0:00:13 0:00:09
0:00:21 0:00:30
0:00:02 0:00:05
0:00:30 0:00:30
0:00:00 0:00:02
0:00:14 0:00:08
0:00:29 0:00:30
0:00:08 0:00:02
0:00:00 0:00:00
0:00:00 0:00:00
0:00:30 0:00:30
0:00:21 0:00:07
0:00:01 0:00:02
0:00:30 0:00:30
0:00:08 0:00:10
0:00:04 0:00:11
0:00:30 0:00:30
0:00:30 0:00:30
0:00:28 0:00:30

34 30

What is different in DF12GUI ??

Jouni
Jouni
Posts: 3791
Joined: Wed Mar 08, 2006 8:15 pm
Full name: Jouni Uski

Re: What makes 1-cpu program un-deterministic?

Post by Jouni »

I answer myself :) In Rybka logfile (great feature by the way!) I see, that in Arena between each position "ucinewgame" is sent, but in Chessbase "clear hash" Which one is correct/better way?

Jouni
Jouni
Posts: 3791
Joined: Wed Mar 08, 2006 8:15 pm
Full name: Jouni Uski

Re: What makes 1-cpu program un-deterministic?

Post by Jouni »

One more addition: after "clear hash" Critter 1-cpu is NOT deterministic. In Arena GUI:

Starting position



Critter:
2/2 00:00 82 0 +0.56 1.Ng1-f3 Nb8-a6
3/3 00:00 220 0 +0.27 1.Ng1-f3 Ng8-f6 2.Nb1-c3 Nb8-c6 3.d2-d4
4/4 00:00 359 0 +0.27 1.Ng1-f3 Ng8-f6 2.Nb1-c3 Nb8-c6 3.d2-d4
5/5 00:00 641 0 +0.23 1.Ng1-f3 Ng8-f6 2.Nb1-c3 Nb8-c6 3.d2-d4 d7-d5 4.Bc1-f4
6/6 00:00 1,083 0 +0.17 1.Ng1-f3 Ng8-f6 2.Nb1-c3 Nb8-c6 3.d2-d4 h7-h6
7/8 00:00 2,071 0 +0.15 1.Ng1-f3 Ng8-f6 2.Nb1-c3 Nb8-c6 3.d2-d4 h7-h6 4.e2-e4 d7-d5
8/10- 00:00 7,281 0 +0.07 1.Ng1-f3 Ng8-f6 2.Nb1-c3 Nb8-c6 3.d2-d4 h7-h6 4.e2-e4 d7-d5
8/10 00:00 7,962 530,800 +0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xe4 d5xe4 9.d4-d5 e4xf3 10.d5xc6 Qd8xd2+ 11.Bf4xd2 b7xc6 12.g2xf3
17/31 00:05 6,074,157 1,131,971 +0.15 1.d2-d4 Ng8-f6 2.Nb1-c3 d7-d5 3.Bc1-f4 e7-e6 4.e2-e3 Bf8-d6 5.Ng1-f3 Bd6xf4 6.e3xf4 Qd8-d6 7.Bf1-d3 Qd6xf4 8.g2-g3 Qf4-g4 9.h2-h3 Qg4-h5 10.Nc3-b5 Nb8-a6

Jouni
User avatar
hgm
Posts: 28444
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: What makes 1-cpu program un-deterministic?

Post by hgm »

Is "clear hash" a standard UCI option? Fruit 2.1 does not seem to have it...
UncombedCoconut
Posts: 319
Joined: Fri Dec 18, 2009 11:40 am
Location: Naperville, IL

Re: What makes 1-cpu program un-deterministic?

Post by UncombedCoconut »

hgm wrote:Is "clear hash" a standard UCI option? Fruit 2.1 does not seem to have it...
No. However, it's given as an example of both "setoption" and "option" lines in the UCI spec, so (almost?) every UCI engine which implements this feature uses the same name. Critter, in particular, does offer this option.
User avatar
rvida
Posts: 481
Joined: Thu Apr 16, 2009 12:00 pm
Location: Slovakia, EU

Re: What makes 1-cpu program un-deterministic?

Post by rvida »

Jouni wrote:I answer myself :) In Rybka logfile (great feature by the way!) I see, that in Arena between each position "ucinewgame" is sent, but in Chessbase "clear hash" Which one is correct/better way?

Jouni
They are not the same (at least not for Critter).

"clear hash" does exactly what it is supposed to do - clears the hash table.

"ucinewgame" clears the hash table and sets a flag indicating that the next search has nothing to do with the current state. Upon receiving the first "go" command with this flag set the engine initializes some internal tables with values that are specific for the new root position.