Delta pruning test

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.
bctboi23
Posts: 17
Joined: Fri Feb 07, 2020 1:48 am
Location: United States
Full name: Tom Reinitz

Delta pruning test

Post by bctboi23 » Tue Feb 25, 2020 2:12 pm

So, I just added 3 lines of code to my engine, CeeChess, for delta pruning, following the chessprogramming wiki.

Code: Select all

Delta = 1000; // queen value
if (Score + Delta < alpha) {
	// if no move can improve alpha, return
	return alpha;
}
After the addition to quiescence, it searches MORE nodes, and yet after doing testing at short time control, it is a +80ELO win! (500 games at 15"+0.3")
This seems super odd to me, and I think it is either a bug in the qSearch that is somehow fixed with that code, or this code helps the Razoring pruning be more effective. Either way though, it is really weird to me.

Is this normal for what people get when implementing delta pruning, or am I missing something in my code?

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

Re: Delta pruning test

Post by Henk » Tue Feb 25, 2020 2:40 pm

If a move gives check mate it certainly improves alpha

mar
Posts: 2149
Joined: Fri Nov 26, 2010 1:00 pm
Location: Czech Republic
Full name: Martin Sedlak

Re: Delta pruning test

Post by mar » Tue Feb 25, 2020 2:42 pm

adding qs will make you search more nodes, but it should improve the strength a lot. how much have you gained by adding qs?
other that that, I can only say that delta pruning is certainly not worth 80 elo, that's way too much
did it hold for more games (say 5k?)
Martin Sedlak

bctboi23
Posts: 17
Joined: Fri Feb 07, 2020 1:48 am
Location: United States
Full name: Tom Reinitz

Re: Delta pruning test

Post by bctboi23 » Tue Feb 25, 2020 2:50 pm

I did already have a qSearch, that's why this seems really weird. (my first release already had qSearch implemented, so I'm not sure how much elo it added)
I will run more games, but my computer is not the fastest lol

User avatar
xr_a_y
Posts: 1227
Joined: Sat Nov 25, 2017 1:28 pm
Location: France

Re: Delta pruning test

Post by xr_a_y » Tue Feb 25, 2020 3:00 pm

did the same last week and delta pruning is losing elo in Minic.

One thing for sure is that you don't want to do that when in check !

User avatar
hgm
Posts: 24730
Joined: Fri Mar 10, 2006 9:06 am
Location: Amsterdam
Full name: H G Muller
Contact:

Re: Delta pruning test

Post by hgm » Tue Feb 25, 2020 3:30 pm

Why would you not do that when in check? It seems to me that when you are in check you should do this even with a smaller threshold, namely the value of the checker. Because you will surely not be able to capture more than that, even when there would still be Queens around. As you cannot capture the latter, as you must resolve the check. When you are not in check you can always hope that one of the captures hits a Queen.

User avatar
xr_a_y
Posts: 1227
Joined: Sat Nov 25, 2017 1:28 pm
Location: France

Re: Delta pruning test

Post by xr_a_y » Tue Feb 25, 2020 3:36 pm

hgm wrote:
Tue Feb 25, 2020 3:30 pm
Why would you not do that when in check? It seems to me that when you are in check you should do this even with a smaller threshold, namely the value of the checker. Because you will surely not be able to capture more than that, even when there would still be Queens around. As you cannot capture the latter, as you must resolve the check. When you are not in check you can always hope that one of the captures hits a Queen.
Make sense ! I didn't think this through. In Minic delta pruning is a crazy Elo drop if applied when in check. I'll try to understand why...

bctboi23
Posts: 17
Joined: Fri Feb 07, 2020 1:48 am
Location: United States
Full name: Tom Reinitz

Re: Delta pruning test

Post by bctboi23 » Tue Feb 25, 2020 4:45 pm

@xr_a_y my quiescence is only captures, and I extend checks before qsearch, so there isn't likely to be checks in the qsearch (although adding checks and promotions sounds like a good idea, I will think about doing that)

Also, turns out I messed up one of the parts of the test (namely, only one of the engines was playing moves from the book), so now I am getting what I think is a more reasonable 25 Elo jump. Still kind of weird, but not 80 Elo weird. (of course, only 100 games have been played yet, but we shall see)

User avatar
hgm
Posts: 24730
Joined: Fri Mar 10, 2006 9:06 am
Location: Amsterdam
Full name: H G Muller
Contact:

Re: Delta pruning test

Post by hgm » Tue Feb 25, 2020 4:58 pm

Even without adding anything: some of the captures in QS can be checks.

Joost Buijs
Posts: 1144
Joined: Thu Jul 16, 2009 8:47 am
Location: Almere, The Netherlands

Re: Delta pruning test

Post by Joost Buijs » Tue Feb 25, 2020 6:05 pm

hgm wrote:
Tue Feb 25, 2020 3:30 pm
Why would you not do that when in check? It seems to me that when you are in check you should do this even with a smaller threshold, namely the value of the checker. Because you will surely not be able to capture more than that, even when there would still be Queens around. As you cannot capture the latter, as you must resolve the check. When you are not in check you can always hope that one of the captures hits a Queen.
Is this really true? I can imagine positions in which the king can capture a rook when for instance checked by a pawn, knight or bishop.

Post Reply