optimal aspiration window for stockfish question

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

diep
Posts: 1822
Joined: Thu Mar 09, 2006 11:54 pm
Location: The Netherlands

Re: optimal aspiration window for stockfish question

Post by diep »

bob wrote:
mcostalba wrote:
bob wrote: Absolutely no change, either up or down.
Have you tested at longer TC ? It would be interesting to know how scales at longer TC, with your cluster should be feasible to test say at 1' TC.
I thought I had said that I tested up to 1 minute + 1 second. I did not go beyond that, and found absolutely no difference, which was surprising. The only thing I didnt like was the excessive re-searches to reach a mate. But at that point, it doesn't affect the game result at all of course...

When we first started doing this in Cray Blitz, we tried lots of ideas. Our aspiration window was roughly 1/3 of a pawn, so we relaxed alpha/beta to +1.0, then +3.0, then +9.0 and then all the way to infinite. In Crafty, I eliminated that +3.0 and have been using +1, +9 and +infinite for the longest...

I am also running a test (since I was not testing anything else) on various aspiration window widths as well. I'll post those results when they finish...
Cray Blitz still alive?

In diep i'm starting search with (-inf,+inf) for a simple reason: hashtable will directly give back a great bound anyway and you nullwindow around that.

Only when your PV is a total mess i assume that aspiration search is a great idea, shouldn't happen for a proper YBW search.

Maybe that's why crafty doesn't suffer from the same problem there.
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: optimal aspiration window for stockfish question

Post by bob »

diep wrote:
bob wrote:
mcostalba wrote:
bob wrote: Absolutely no change, either up or down.
Have you tested at longer TC ? It would be interesting to know how scales at longer TC, with your cluster should be feasible to test say at 1' TC.
I thought I had said that I tested up to 1 minute + 1 second. I did not go beyond that, and found absolutely no difference, which was surprising. The only thing I didnt like was the excessive re-searches to reach a mate. But at that point, it doesn't affect the game result at all of course...

When we first started doing this in Cray Blitz, we tried lots of ideas. Our aspiration window was roughly 1/3 of a pawn, so we relaxed alpha/beta to +1.0, then +3.0, then +9.0 and then all the way to infinite. In Crafty, I eliminated that +3.0 and have been using +1, +9 and +infinite for the longest...

I am also running a test (since I was not testing anything else) on various aspiration window widths as well. I'll post those results when they finish...
Cray Blitz still alive?

In diep i'm starting search with (-inf,+inf) for a simple reason: hashtable will directly give back a great bound anyway and you nullwindow around that.

Only when your PV is a total mess i assume that aspiration search is a great idea, shouldn't happen for a proper YBW search.

Maybe that's why crafty doesn't suffer from the same problem there.
Depends on what you mean by "alive". The last 3 years of Cray Blitz development was lost. I have a 1991 or so version that is on the net and compiles/runs just fine (no parallel search however as the Cray "task common" is not a standard fortran feature.

I'm beginning to think that the +/- infinity idea is just as good as aspiration search. Most likely because we all use PVS (null-window, not null-move) anyway. I did not go all the way to infinity in my test results I posted here, but I will try it to see if it makes any difference. (I suspect there will be no change at all).
mcostalba
Posts: 2684
Joined: Sat Jun 14, 2008 9:17 pm

Re: optimal aspiration window for stockfish question

Post by mcostalba »

bob wrote: I'm beginning to think that the +/- infinity idea is just as good as aspiration search. Most likely because we all use PVS (null-window, not null-move) anyway. I did not go all the way to infinity in my test results I posted here, but I will try it to see if it makes any difference. (I suspect there will be no change at all).
A little detail: aspiration window should not start from iteration 1, in Stockfish it starts from iteration 5 and before we use +-inf.
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: optimal aspiration window for stockfish question

Post by bob »

mcostalba wrote:
bob wrote: I'm beginning to think that the +/- infinity idea is just as good as aspiration search. Most likely because we all use PVS (null-window, not null-move) anyway. I did not go all the way to infinity in my test results I posted here, but I will try it to see if it makes any difference. (I suspect there will be no change at all).
A little detail: aspiration window should not start from iteration 1, in Stockfish it starts from iteration 5 and before we use +-inf.
Why would it matter? Those iterations take microseconds to complete. Doesn't matter how many re-searches you do down there...
User avatar
lucasart
Posts: 3232
Joined: Mon May 31, 2010 1:29 pm
Full name: lucasart

Re: optimal aspiration window for stockfish question

Post by lucasart »

bob wrote:
mcostalba wrote:
bob wrote: I'm beginning to think that the +/- infinity idea is just as good as aspiration search. Most likely because we all use PVS (null-window, not null-move) anyway. I did not go all the way to infinity in my test results I posted here, but I will try it to see if it makes any difference. (I suspect there will be no change at all).
A little detail: aspiration window should not start from iteration 1, in Stockfish it starts from iteration 5 and before we use +-inf.
Why would it matter? Those iterations take microseconds to complete. Doesn't matter how many re-searches you do down there...
I confirm what Robery is saying. I've done some testing in DoubleCheck with that, and found the minimum depth condition to be useless. However, if it doesn't help, it cannot hurt, and it reduces the nodecount on a "./DC bench" (I haven't tried with "./stockfish bench" but I'm almost certain it's the same). But I kept the condition anyway, as it may have an impact at stupidly fast games (sometimes I test without time control and just a node limit of 50k nodes for example).

But there is another condition in StockFish which might make more sense. If the score is a mate score (or a winning endgame by EG knowledge which returnsd high scores) then SF doesn't do aspiration. I haven't done any serious measurement on that, but it makes sense. Although I expect no elo improvement from it, it should make SF waste less time in researches when it's finding a mate, which is nice for analysis.
zamar
Posts: 613
Joined: Sun Jan 18, 2009 7:03 am

Re: optimal aspiration window for stockfish question

Post by zamar »

lucasart wrote: But there is another condition in StockFish which might make more sense. If the score is a mate score (or a winning endgame by EG knowledge which returnsd high scores) then SF doesn't do aspiration. I haven't done any serious measurement on that, but it makes sense. Although I expect no elo improvement from it, it should make SF waste less time in researches when it's finding a mate, which is nice for analysis.
We don't want to use aspiration search in endgame like KBNK, because TT is filled with mate scores.
Joona Kiiski