Ordering of Root moves and search instability !

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.
Post Reply
MahmoudUthman
Posts: 234
Joined: Sat Jan 17, 2015 10:54 pm

Ordering of Root moves and search instability !

Post by MahmoudUthman » Mon Oct 26, 2015 5:09 pm

Changing the ordering of root moves results in different search results , is this normal ?

Henk
Posts: 5816
Joined: Mon May 27, 2013 8:31 am

Re: Ordering of Root moves and search instability !

Post by Henk » Mon Oct 26, 2015 5:19 pm

At least it is understandable. Different search means different results.

MahmoudUthman
Posts: 234
Joined: Sat Jan 17, 2015 10:54 pm

Re: Ordering of Root moves and search instability !

Post by MahmoudUthman » Mon Oct 26, 2015 5:28 pm

it's a start-position search to depth=8 , with everything as is (new instance of the engine ,no hash, pruning,..etc.. ,just eval & AB search ) with the ordering method for root moves as the sole difference .

PK
Posts: 824
Joined: Mon Jan 15, 2007 10:23 am
Location: Warsza
Contact:

Re: Ordering of Root moves and search instability !

Post by PK » Mon Oct 26, 2015 5:41 pm

It can happen for a couple of reasons. I don't know which ones might apply in Your case or how advanced Your engine is.

First, two moves of the same value. Suppose that Your engine, while analyzing starting position, thinks that 1...e6 is the best reply to both 1.e4 and 1.d4 and in both cases wants to continue as white with the other central pawn. Then the choice between 1.e4 and 1.d4 is determined solely by which move is searched first.

The second legitimate reason might be the check extension (or any other extension/reduction trick that You might be using, but it's easier to explain with check extension). Suppose You compare the following lines: 1.d4 Nf6 2. c4 e6 3. Nc3 Bb4 (no check!) 4. Nf3 and 1.d4 Nf6 2.c4 e6 3.Nf3 Bb4 (check!) 4.Nc3. If You search them in that order, the second one is searched one ply deeper. However, if You switch the order, transposition table will ensure that score is the same.

And as Your engine becomes more complex, there are more and more ways for root move ordering change to change the score, like late move reduction with variable depth + history table.

But, just in case, try running both versions of Your engine against each other, to make sure that it is one of the reasons I listed and not a bug.

bob
Posts: 20550
Joined: Mon Feb 27, 2006 6:30 pm
Location: Birmingham, AL

Re: Ordering of Root moves and search instability !

Post by bob » Mon Oct 26, 2015 6:58 pm

MahmoudUthman wrote:Changing the ordering of root moves results in different search results , is this normal ?
Yep. Change ordering, change LMR, change hash hits, change killer/counter moves, just for starters...

bob
Posts: 20550
Joined: Mon Feb 27, 2006 6:30 pm
Location: Birmingham, AL

Re: Ordering of Root moves and search instability !

Post by bob » Mon Oct 26, 2015 9:54 pm

MahmoudUthman wrote:it's a start-position search to depth=8 , with everything as is (new instance of the engine ,no hash, pruning,..etc.. ,just eval & AB search ) with the ordering method for root moves as the sole difference .
You MIGHT get a different move. you must NOT get a different score, if you are not reducing, pruning or hashing. Time to hunt a bug...

Post Reply