Time out problems

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
Daniel Anulliero
Posts: 688
Joined: Fri Jan 04, 2013 3:55 pm
Location: Nice

Time out problems

Post by Daniel Anulliero » Wed Sep 19, 2018 6:10 am

Hi all
Are there any topics about "time out" ( the search is stopped bh the time over)
Yes I'm too lazy to search these and the search of the forum work like .... before lol you can find nothing with that 😁😁
Thanks
Dany

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

Re: Time out problems

Post by Sven » Wed Sep 19, 2018 7:18 pm

Daniel Anulliero wrote:
Wed Sep 19, 2018 6:10 am
Hi all
Are there any topics about "time out" ( the search is stopped bh the time over)
Yes I'm too lazy to search these and the search of the forum work like .... before lol you can find nothing with that 😁😁
Thanks
Dany
I guess we all have the same problem with the forum search ... So which problem about time management are you trying to address?
Sven Schüle (engine author: Jumbo, KnockOut, Surprise)

Daniel Anulliero
Posts: 688
Joined: Fri Jan 04, 2013 3:55 pm
Location: Nice

Re: Time out problems

Post by Daniel Anulliero » Thu Sep 20, 2018 7:26 am

Hi Sven
If you remember , we've talk about Isa's Qs and you've noticed the fact I let Isa think after the time out .
And two says ago I noticed à bad move choice by Isa in a game , then remember what you wrote ...
So , I put a test in search and qs "if time out return"
Now I'm testing the change but it's not looking very promising: 109-106 for the "old" Isa (two few games yes ...)
I just would like to read some expérience by some others programmers
Best
Dany

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

Re: Time out problems

Post by Sven » Thu Sep 20, 2018 7:57 pm

Daniel Anulliero wrote:
Thu Sep 20, 2018 7:26 am
If you remember , we've talk about Isa's Qs and you've noticed the fact I let Isa think after the time out .
Unfortunately I don't remember the details ...
Sven Schüle (engine author: Jumbo, KnockOut, Surprise)

Daniel Anulliero
Posts: 688
Joined: Fri Jan 04, 2013 3:55 pm
Location: Nice

Re: Time out problems

Post by Daniel Anulliero » Thu Sep 20, 2018 8:35 pm

We've talk about that by pm .You wrote this :
"

2) I found one possible issue regarding your timeout handling (but that still does not relate to QS explosion): when detecting a timeout you simply return 0 but the parent does not notice that so it continues to search more subtrees. Each of these will return immediately with 0 but if the previous best move at the parent had a score < 0 then the score of the parent changes to 0 even though you know nothing about the incomplete tree from which you returned 0 due to timeout. This can even lead to playing the wrong root move if you do the same in full-width search. You should better add code that checks for the "fin_recherche" flag being possibly set directly after each unmaking of a move in the move loop. Independent from that I found that returning +INFINITE instead of 0 is the safest way to avoid any accidental influence of an incomplete subtree on the score of the root node, simply because the parent will handle this as refutation of the move that started the subtree interrupted by timeout."
Check your messages box 😉

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

Re: Time out problems

Post by Sven » Thu Sep 20, 2018 9:11 pm

Ok, I remember :-) So did you change the code as I proposed? Or differently? The key point was that the search should return immediately up to the root node when detecting a timeout, so a flag that you set after time has run out should be checked immediately after each unmakeMove() so that all parent nodes bail out as well.

I don't know if this will improve strength significantly. But it might help to avoid some time losses or some bad time management behaviour.
Sven Schüle (engine author: Jumbo, KnockOut, Surprise)

Daniel Anulliero
Posts: 688
Joined: Fri Jan 04, 2013 3:55 pm
Location: Nice

Re: Time out problems

Post by Daniel Anulliero » Thu Sep 20, 2018 9:44 pm

Yes I've added in the search and in the qs too :
After unmake move ( );
If (fin recherche)
Return 0;

Didn't test yet to return +INFINITE instead of 0 ..
Well , as I wrote above the test isn't looking very promising for the moment : 109 - 106 for the old one ..
We'll see with more games ...
Anyway , thanks again 😉

tttony
Posts: 259
Joined: Sat Apr 23, 2011 10:33 pm
Contact:

Re: Time out problems

Post by tttony » Thu Sep 20, 2018 11:04 pm

Daniel Anulliero wrote:
Thu Sep 20, 2018 9:44 pm
Yes I've added in the search and in the qs too :
After unmake move ( );
If (fin recherche)
Return 0;

Didn't test yet to return +INFINITE instead of 0 ..
Well , as I wrote above the test isn't looking very promising for the moment : 109 - 106 for the old one ..
We'll see with more games ...
Anyway , thanks again 😉
Also you should check before setting the variable stop to true

Code: Select all

check_time_input(params); //<-- Here timeout is cheked
if (params->stop) 
    return 0;

Daniel Anulliero
Posts: 688
Joined: Fri Jan 04, 2013 3:55 pm
Location: Nice

Re: Time out problems

Post by Daniel Anulliero » Fri Sep 21, 2018 5:58 am

I'm check in for the time out at the begining of my search and qs functions . I think it is sufficent ?
Dany

Post Reply