Page 1 of 2

Time out problems

Posted: Wed Sep 19, 2018 8:10 am
by Daniel Anulliero
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

Re: Time out problems

Posted: Wed Sep 19, 2018 9:18 pm
by Sven
Daniel Anulliero wrote: ↑Wed Sep 19, 2018 8: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?

Re: Time out problems

Posted: Thu Sep 20, 2018 9:26 am
by Daniel Anulliero
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

Re: Time out problems

Posted: Thu Sep 20, 2018 9:57 pm
by Sven
Daniel Anulliero wrote: ↑Thu Sep 20, 2018 9: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 ...

Re: Time out problems

Posted: Thu Sep 20, 2018 10:35 pm
by Daniel Anulliero
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 πŸ˜‰

Re: Time out problems

Posted: Thu Sep 20, 2018 11:11 pm
by Sven
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.

Re: Time out problems

Posted: Thu Sep 20, 2018 11:44 pm
by Daniel Anulliero
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 πŸ˜‰

Re: Time out problems

Posted: Fri Sep 21, 2018 1:04 am
by tttony
Daniel Anulliero wrote: ↑Thu Sep 20, 2018 11: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;

Re: Time out problems

Posted: Fri Sep 21, 2018 7:58 am
by Daniel Anulliero
I'm check in for the time out at the begining of my search and qs functions . I think it is sufficent ?
Dany

Re: Time out problems

Posted: Sun Dec 27, 2020 5:12 pm
by guinhopinda
Daniel Anulliero wrote: ↑Wed Sep 19, 2018 8: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
Hi, Daniel!

From the conversation with Sven, as I understand it, the problem on time management has already been solved.

I have a question about Bell 0.0.41. Is there any relationship with old Belle by Ken Thompson?

Cheers!