Idea of reduction

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

User avatar
cdani
Posts: 2204
Joined: Sat Jan 18, 2014 10:24 am
Location: Andorra

Idea of reduction

Post by cdani »

Hi!
When you search a position in hash table, and you have an exact score, maybe it's possible to reduce the depth in some cases, for example if you have a previous better move that meets some minimums.
Someone had tried this?
Thanks.
ZirconiumX
Posts: 1334
Joined: Sun Jul 17, 2011 11:14 am

Re: Idea of reduction

Post by ZirconiumX »

cdani wrote:Hi!
When you search a position in hash table, and you have an exact score, maybe it's possible to reduce the depth in some cases, for example if you have a previous better move that meets some minimums.
Someone had tried this?
Thanks.
Just return the score found if it's deeper than your current entry. If it isn't then use it as the first move to search.

No fancy reductions needed here.

Matthew:out
Some believe in the almighty dollar.

I believe in the almighty printf statement.
User avatar
cdani
Posts: 2204
Joined: Sat Jan 18, 2014 10:24 am
Location: Andorra

Re: Idea of reduction

Post by cdani »

ZirconiumX wrote:Just return the score found if it's deeper than your current entry. If it isn't then use it as the first move to search.

No fancy reductions needed here.

Matthew:out
It's the standard and what I'm doing now. But may be someone tried to also reduce depending on the score.
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: Idea of reduction

Post by bob »

cdani wrote:
ZirconiumX wrote:Just return the score found if it's deeper than your current entry. If it isn't then use it as the first move to search.

No fancy reductions needed here.

Matthew:out
It's the standard and what I'm doing now. But may be someone tried to also reduce depending on the score.
Why would you reduce? You are not going to do any searching at this node, so there is nothing to reduce.
User avatar
cdani
Posts: 2204
Joined: Sat Jan 18, 2014 10:24 am
Location: Andorra

Re: Idea of reduction

Post by cdani »

bob wrote:Why would you reduce? You are not going to do any searching at this node, so there is nothing to reduce.
The idea is when you have an score but it's not of enough depth to return immediately, so you are going to search, but for example compare this score with of the best move of the previous alpha_beta call (the one that called the actual alpha_beta), you see that its worst.

* iterate 1st move.
* new alpha of 20.
* iterate next move.
* found this position on hash, with exact value of -20, so reduce.

Or something like this.
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: Idea of reduction

Post by bob »

cdani wrote:
bob wrote:Why would you reduce? You are not going to do any searching at this node, so there is nothing to reduce.
The idea is when you have an score but it's not of enough depth to return immediately, so you are going to search, but for example compare this score with of the best move of the previous alpha_beta call (the one that called the actual alpha_beta), you see that its worst.

* iterate 1st move.
* new alpha of 20.
* iterate next move.
* found this position on hash, with exact value of -20, so reduce.

Or something like this.
Finding exact scores is so rare, I doubt this would ever trigger. You can certainly try it, but there are likely better indicators to trigger a reduction than that score...
User avatar
cdani
Posts: 2204
Joined: Sat Jan 18, 2014 10:24 am
Location: Andorra

Re: Idea of reduction

Post by cdani »

I understand. Thanks!