Large search depths

Discussion of chess software programming and technical issues.

Moderator: Ras

Henk
Posts: 7251
Joined: Mon May 27, 2013 10:31 am

Re: Large search depths

Post by Henk »

elpapa wrote:
Henk wrote:
Don wrote:The devil is in the details. Checks on the first ply of quies is the gold standard and WILL slow your program down but is well worth the cost in additional ELO.
I doubt that.
:shock:

Henk, Don is the author of one of the strongest engines in the world and your engine played this game against itself:

e4, e5, b1-c3, f8-c5, c3-a4, c5-f8, a4-c3 (draw by repetition)

Maybe you should listen to what he has to say.
Always be careful when following advice. They only tell half of the story.
Later on when you have ruined your chess program they say:

Yes you had to implement that too did not you know that, I thought that was obvious.

Also what works for other programs may not work for you. Thinks have to be tuned 'nicely'. Details matter and they are not telling you or they can't otherwise you have to clone everything.

Perhaps I might be happy with that silly game you mentioned. Things can get much worse. Maybe I should better follow advice of chess programs that play only a few hundred elo better than mine or that only use simple tricks they are willing to share.

They may also say: you should not have been so stupid to follow my advice.
Henk
Posts: 7251
Joined: Mon May 27, 2013 10:31 am

Re: Large search depths

Post by Henk »

Henk wrote:
elpapa wrote:
Henk wrote:
Don wrote:The devil is in the details. Checks on the first ply of quies is the gold standard and WILL slow your program down but is well worth the cost in additional ELO.
I doubt that.
:shock:

Henk, Don is the author of one of the strongest engines in the world and your engine played this game against itself:

e4, e5, b1-c3, f8-c5, c3-a4, c5-f8, a4-c3 (draw by repetition)

Maybe you should listen to what he has to say.
Always be careful when following advice. They only tell half of the story.
Later on when you have ruined your chess program they say:

Yes you had to implement that too did not you know that, I thought that was obvious.

Also what works for other programs may not work for you. Thinks have to be tuned 'nicely'. Details matter and they are not telling you or they can't otherwise you have to clone everything.

Perhaps I might be happy with that silly game you mentioned. Things can get much worse. Maybe I should better follow advice of chess programs that play only a few hundred elo better than mine or that only use simple tricks they are willing to share.

They may also say: you should not have been so stupid to follow my advice.
I did not forget the LMR story. It will never ever work for my program. Tried it many, many times, I even have been so stupid to try it again recently for it looks so easy to implement and all top programs are using it
(don't let me laugh).
cetormenter
Posts: 170
Joined: Sun Oct 28, 2012 9:46 pm

Re: Large search depths

Post by cetormenter »

Hi Don,

I did not have the proper structure to quickly check if a move is a checking move until recently in my engine. Therefore I never did checking moves in Qsearch. However now I have implemented it but it seems to be a slight regression (~10 elo weaker with a 95% confidence) and it is not extremely expensive only about a ~2% slow down. Do you know offhand how much of a difference it makes in Komodo?
User avatar
Don
Posts: 5106
Joined: Tue Apr 29, 2008 4:27 pm

Re: Large search depths

Post by Don »

cetormenter wrote:Hi Don,

I did not have the proper structure to quickly check if a move is a checking move until recently in my engine. Therefore I never did checking moves in Qsearch. However now I have implemented it but it seems to be a slight regression (~10 elo weaker with a 95% confidence) and it is not extremely expensive only about a ~2% slow down. Do you know offhand how much of a difference it makes in Komodo?
Bob Hyatt used to do king captures in quies to avoid the overhead of check testing - but he changed. He would be better to ask about this.

The only thing I can tell you is that checks in quies is important and check extensions is probably killing you if you don't know what a check is until there is a king captures. You really need to get check extensions working in your program next.
Capital punishment would be more effective as a preventive measure if it were administered prior to the crime.
cetormenter
Posts: 170
Joined: Sun Oct 28, 2012 9:46 pm

Re: Large search depths

Post by cetormenter »

Oh I have that. The implementation is just very stupid and with this new tool I plan to change that. I was not testing for a check until after the move is made. For obvious reasons this is terrible for adding quiet checks into Qsearch but for this purpose I half implemented checking beforehand.
elcabesa
Posts: 858
Joined: Sun May 23, 2010 1:32 pm

Re: Large search depths

Post by elcabesa »

bob wrote: If you do checking moves in the first ply of q-search, you don't have to do that. If you do not, then preventing the NM search from dropping directly into the q-search is important.
hi I didn't understood what you mean, are you telling to generate in the first level of Qsearch capture and also "queit check" moves?

i understood correctly?

I tried but up to now I can only get a 400 elo drop.. there sould be a bug ;)
elcabesa
Posts: 858
Joined: Sun May 23, 2010 1:32 pm

Re: Large search depths

Post by elcabesa »

I found the bug, it was just search explosion :) I'm testing the new code now.
zamar
Posts: 613
Joined: Sun Jan 18, 2009 7:03 am

Re: Large search depths

Post by zamar »

Henk wrote:
Is there a LMR implementation for beginners ? Only a few conditions and guaranteed to work. And can you apply LMR within null move pruning for
they both are applied when not in PV. And if you use LMR in null move pruning what should be the value of R. And what to do about moves at the end that are reduced all the time and may become reduced too much.
When you reduce with LMR, always reduce two plies.
This is a very good compromise between simplicity and strength.
Joona Kiiski
Henk
Posts: 7251
Joined: Mon May 27, 2013 10:31 am

Re: Large search depths

Post by Henk »

zamar wrote:
Henk wrote:
Is there a LMR implementation for beginners ? Only a few conditions and guaranteed to work. And can you apply LMR within null move pruning for
they both are applied when not in PV. And if you use LMR in null move pruning what should be the value of R. And what to do about moves at the end that are reduced all the time and may become reduced too much.
When you reduce with LMR, always reduce two plies.
This is a very good compromise between simplicity and strength.
In my chess program applying LMR is only safe when:
1) a child node in the reduced search fails high
-> it is researched in the current node
2) all child nodes in the reduced searches fail low
-> the current node is researched in the parent node
3) all child nodes failing high in reduced search all fail low in the research of the current node
-> the current node is researched in the parent node
4) one child node fails high in reduced search and fails high in the research of the current node
-> the current node fails low in the parent node but the current node had been researched. It's value <= alfa in the parent node but all values <= alfa cannot be trusted so that is ok.

But then the profit is not that high (or maybe negative) for it doesn't store the position in hash table if the value is reduced by LMR.

Can one store a value of a position in the hash table when that value is computed with a search where reductions are applied which hold only under certain conditions ? For these conditions may not hold in other searches that encounter that position which means that a wrong value is reused.
mcostalba
Posts: 2684
Joined: Sat Jun 14, 2008 9:17 pm

Re: Large search depths

Post by mcostalba »

zamar wrote:
Henk wrote:
Is there a LMR implementation for beginners ? Only a few conditions and guaranteed to work. And can you apply LMR within null move pruning for
they both are applied when not in PV. And if you use LMR in null move pruning what should be the value of R. And what to do about moves at the end that are reduced all the time and may become reduced too much.
When you reduce with LMR, always reduce two plies.
This is a very good compromise between simplicity and strength.
Joona, this is a well known troll, don't waste your time with him....now he is all excited because he thinks he has caught a new big fish