What's the trick ?

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

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

What's the trick ?

Post by Henk »

My chess program can reach search depth 20 within 100 seconds. Compared to top chess programs this is nothing for they reach depths of 30 or 40. So how do they get that. Don't tell me that it is move ordering for you cannot win 20 ply with optimal move ordering. Of course I can multiply my reductions with a factor of two but that makes my program play worse for razoring and futility pruning don't scale up.
User avatar
hgm
Posts: 27810
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: What's the trick ?

Post by hgm »

Count each ply for two, (a technique also known as 'reduction'), and you will be there! :lol:
Uri Blass
Posts: 10309
Joined: Thu Mar 09, 2006 12:37 am
Location: Tel-Aviv Israel

Re: What's the trick ?

Post by Uri Blass »

I cannot get depth 20 with the top programs in the following pawn endgame in 100 seconds

[D]4K3/PPPPPPPP/8/8/8/8/pppppppp/4k3 w - - 1 1
Last edited by Uri Blass on Wed Apr 23, 2014 9:13 pm, edited 1 time in total.
Henk
Posts: 7220
Joined: Mon May 27, 2013 10:31 am

Re: What's the trick ?

Post by Henk »

hgm wrote:Count each ply for two, (a technique also known as 'reduction'), and you will be there! :lol:
Actually my search depth is 2000 for I always count depth with steps of 100. But the length of the PV must be somewhat equal to the maximum search depth. Do you think they do nothing more than a synthetic PV extension to reach a depth of 40.
Uri Blass
Posts: 10309
Joined: Thu Mar 09, 2006 12:37 am
Location: Tel-Aviv Israel

Re: What's the trick ?

Post by Uri Blass »

Henk wrote:
hgm wrote:Count each ply for two, (a technique also known as 'reduction'), and you will be there! :lol:
Actually my search depth is 2000 for I always count depth with steps of 100. But the length of the PV must be somewhat equal to the maximum search depth. Do you think they do nothing more than a synthetic PV extension to reach a depth of 40.
The top programs do not know the rule that the length of the PV must be equal to the search depth.

It is often shorter than it when the pv can also have bad moves if it is constructed from the hash.
Henk
Posts: 7220
Joined: Mon May 27, 2013 10:31 am

Re: What's the trick ?

Post by Henk »

Ok. So the question is what's the trick to get larger path lengths (number of connections/interior nodes on a path between root and leaves) in the search tree without making the program play worse ? I still think that top programs have much larger path lengths.
User avatar
cdani
Posts: 2204
Joined: Sat Jan 18, 2014 10:24 am
Location: Andorra

Re: What's the trick ?

Post by cdani »

Hi.

Which is your engine?

Andscacs is not particularly fast or strong, but can reach depth 20 may be in 30 seconds, or less than 10 seconds if there are few pieces. And this with seldepths easily of 30. I don’t use fractional depths.

But with the reductions, many lines just go to depth 10-15, or less for sure.
Don’t trust a lot those high depths. As sure you now, there are engines that go less deeper but play better.

Anyway in my little experience of some months, there is no single trick. It’s just work, work, work. And an accumulation of many little improvements. Big improvements are so rare…

I improved the reductions and changed them completely a lot of times, same for the null move, the prunings, razorings, evaluations, move ordering, etc.
Only little months ago I was struggling to reach depth 15 in less than 100 seconds.

I do many tests relatively quickly because I discard most ideas that don’t show a clear advance in less than 1000-1500 fast games in few tries. Even if it’s like a 2600 I consider it so weak, that most changes I do, show an improvement so fast with little games because you can see a clear pattern of weaknesses to improve. Sure this will not be that easy in some months when is more advanced.

For example now I’m trying to penalize the move order of moves that return back a piece to the square it was last time it was moved. It was very easy to program, and in maybe 3000-4000 games with different values I already have an 1-2% improvement. Then, after some changes like this, I do a 1500-2000 game match with slower games to validate all of it.
I know that some of those changes can be bad, but most of them are good enough.

I think its nonsense when you have such a weak engine, to improve a lot a concrete thing, because you will discard most of this advance when you change a lot of other things you will find later that are underimproved.
I will be more serious in the future when I have no other way, sure :-)

Ah! And I’m only in for the fun :-)
Henk
Posts: 7220
Joined: Mon May 27, 2013 10:31 am

Re: What's the trick ?

Post by Henk »

Yes if you think you have found big improvement it is usually a bug. For instance two days ago I thought I was doing aggressive LMP in nodes that were always researched if they failed low. So nothing to loose. I gained some ply but I overlooked that I was pruning nodes too that were not researched. It took at least a day before I recognized something was really wrong.

When I corrected the bug there was no gain in search depth left over. LMP in PV nodes did not work too. It makes my program blunder too much.
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: What's the trick ?

Post by bob »

Henk wrote:My chess program can reach search depth 20 within 100 seconds. Compared to top chess programs this is nothing for they reach depths of 30 or 40. So how do they get that. Don't tell me that it is move ordering for you cannot win 20 ply with optimal move ordering. Of course I can multiply my reductions with a factor of two but that makes my program play worse for razoring and futility pruning don't scale up.
Heavy duty reductions.

Large R in null-move searches

Heavy duty forward pruning.
User avatar
cdani
Posts: 2204
Joined: Sat Jan 18, 2014 10:24 am
Location: Andorra

Re: What's the trick ?

Post by cdani »

bob wrote: Heavy duty reductions.

Large R in null-move searches

Heavy duty forward pruning.
I have the idea that when you start pruning you lose strength. But if you continue pruning heavier, it arrives a moment when you start to win strength. Is like you cross some line.
Of course it's not that easy because the engine needs some equilibrium.