futility pruning - razoring

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

User avatar
Don
Posts: 5106
Joined: Tue Apr 29, 2008 4:27 pm

Re: futility pruning - razoring

Post by Don »

BubbaTough wrote:
bob wrote:
BubbaTough wrote:Are you razoring based on material, or a call to Eval? Because if it is via material, you may be getting some of the benefit usually associated with Lazy Eval, which can be a pretty big speedup.

-Sam
I am not "razoring" whatsoever any longer. I now just outright prune based on a "quick eval" and a pruning margin that gets larger as I get farther from the tips...

Razoring is a quick jump to q-search. I do a quick-jump to UnmakeMove() if I decide to prune it. :)
Ahh...that is what I do to. I guess I misunderstood what razoring is.

-Sam
I don't think anybody really understands the difference between pruning and razoring. I understand all of it, but I don't have a clue about the nomenclature and I think there is no agreement on what to call these things. It has been defined in papers and given names, but they don't seem to be universally accepted.
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: futility pruning - razoring

Post by bob »

Don wrote:
BubbaTough wrote:
bob wrote:
BubbaTough wrote:Are you razoring based on material, or a call to Eval? Because if it is via material, you may be getting some of the benefit usually associated with Lazy Eval, which can be a pretty big speedup.

-Sam
I am not "razoring" whatsoever any longer. I now just outright prune based on a "quick eval" and a pruning margin that gets larger as I get farther from the tips...

Razoring is a quick jump to q-search. I do a quick-jump to UnmakeMove() if I decide to prune it. :)
Ahh...that is what I do to. I guess I misunderstood what razoring is.

-Sam
I don't think anybody really understands the difference between pruning and razoring. I understand all of it, but I don't have a clue about the nomenclature and I think there is no agreement on what to call these things. It has been defined in papers and given names, but they don't seem to be universally accepted.
I think that the original "razoring" was just an optimization. At the last ply in the tree, if a move appears to be hopeless, you just avoid making it and then letting Quiesce() produce a stand-pat score that will cause a fail high, which backs up to this ply as a fail-low. I'm doing this farther from the tips than the last ply however...
BubbaTough
Posts: 1154
Joined: Fri Jun 23, 2006 5:18 am

Re: futility pruning - razoring

Post by BubbaTough »

bob wrote:
Don wrote:
BubbaTough wrote:
bob wrote:
BubbaTough wrote:Are you razoring based on material, or a call to Eval? Because if it is via material, you may be getting some of the benefit usually associated with Lazy Eval, which can be a pretty big speedup.

-Sam
I am not "razoring" whatsoever any longer. I now just outright prune based on a "quick eval" and a pruning margin that gets larger as I get farther from the tips...

Razoring is a quick jump to q-search. I do a quick-jump to UnmakeMove() if I decide to prune it. :)
Ahh...that is what I do to. I guess I misunderstood what razoring is.

-Sam
I don't think anybody really understands the difference between pruning and razoring. I understand all of it, but I don't have a clue about the nomenclature and I think there is no agreement on what to call these things. It has been defined in papers and given names, but they don't seem to be universally accepted.
I think that the original "razoring" was just an optimization. At the last ply in the tree, if a move appears to be hopeless, you just avoid making it and then letting Quiesce() produce a stand-pat score that will cause a fail high, which backs up to this ply as a fail-low. I'm doing this farther from the tips than the last ply however...
I think I do 3 from the last ply, with a sliding scale for the cutoff. I have a tendency to error on the side of aggression when it comes to pruning though, so I may be too aggressive.

-Sam
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: futility pruning - razoring

Post by bob »

BubbaTough wrote:
bob wrote:
Don wrote:
BubbaTough wrote:
bob wrote:
BubbaTough wrote:Are you razoring based on material, or a call to Eval? Because if it is via material, you may be getting some of the benefit usually associated with Lazy Eval, which can be a pretty big speedup.

-Sam
I am not "razoring" whatsoever any longer. I now just outright prune based on a "quick eval" and a pruning margin that gets larger as I get farther from the tips...

Razoring is a quick jump to q-search. I do a quick-jump to UnmakeMove() if I decide to prune it. :)
Ahh...that is what I do to. I guess I misunderstood what razoring is.

-Sam
I don't think anybody really understands the difference between pruning and razoring. I understand all of it, but I don't have a clue about the nomenclature and I think there is no agreement on what to call these things. It has been defined in papers and given names, but they don't seem to be universally accepted.
I think that the original "razoring" was just an optimization. At the last ply in the tree, if a move appears to be hopeless, you just avoid making it and then letting Quiesce() produce a stand-pat score that will cause a fail high, which backs up to this ply as a fail-low. I'm doing this farther from the tips than the last ply however...
I think I do 3 from the last ply, with a sliding scale for the cutoff. I have a tendency to error on the side of aggression when it comes to pruning though, so I may be too aggressive.

-Sam
I have tried everything from 1 to 7. I am currently using 4 as that was the best based on a ton of cluster testing. I also tested the "sliding window" where the margin is smaller as I approach the frontier, so that each of those values is also optimized via cluster testing.
Gerd Isenberg
Posts: 2250
Joined: Wed Mar 08, 2006 8:47 pm
Location: Hattingen, Germany

Re: futility pruning - razoring

Post by Gerd Isenberg »

Don wrote: I don't think anybody really understands the difference between pruning and razoring. I understand all of it, but I don't have a clue about the nomenclature and I think there is no agreement on what to call these things. It has been defined in papers and given names, but they don't seem to be universally accepted.
I am interested in your definition of pruning and razoring. How about some more elaborations and proposals for a nomenclature and classification?

Is razoring a subset of forward pruning? Was the term razoring used by Birmingham and Kent to distinguish it from the "usual" pruning of the at that time common Shannon Type-B programs?
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: futility pruning - razoring

Post by bob »

Gerd Isenberg wrote:
Don wrote: I don't think anybody really understands the difference between pruning and razoring. I understand all of it, but I don't have a clue about the nomenclature and I think there is no agreement on what to call these things. It has been defined in papers and given names, but they don't seem to be universally accepted.
I am interested in your definition of pruning and razoring. How about some more elaborations and proposals for a nomenclature and classification?

Is razoring a subset of forward pruning? Was the term razoring used by Birmingham and Kent to distinguish it from the "usual" pruning of the at that time common Shannon Type-B programs?
I believe so. Today it is just a limited form of LMR.
User avatar
Don
Posts: 5106
Joined: Tue Apr 29, 2008 4:27 pm

Re: futility pruning - razoring

Post by Don »

Gerd Isenberg wrote:
Don wrote: I don't think anybody really understands the difference between pruning and razoring. I understand all of it, but I don't have a clue about the nomenclature and I think there is no agreement on what to call these things. It has been defined in papers and given names, but they don't seem to be universally accepted.
I am interested in your definition of pruning and razoring. How about some more elaborations and proposals for a nomenclature and classification?

Is razoring a subset of forward pruning? Was the term razoring used by Birmingham and Kent to distinguish it from the "usual" pruning of the at that time common Shannon Type-B programs?
I actually meant futility vs razoring, not pruning vs razoring.

From what I can tell, futility pruning has the basic meaning of either dropping into quies early or not making a move - just abandoning it. Razoring seems to be the more confusing term and it seems to imply a reduced depth test search of some kind.

If there is a standard definition somewhere that is generally accepted, I am all in favor of using it.
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: futility pruning - razoring

Post by bob »

Don wrote:
Gerd Isenberg wrote:
Don wrote: I don't think anybody really understands the difference between pruning and razoring. I understand all of it, but I don't have a clue about the nomenclature and I think there is no agreement on what to call these things. It has been defined in papers and given names, but they don't seem to be universally accepted.
I am interested in your definition of pruning and razoring. How about some more elaborations and proposals for a nomenclature and classification?

Is razoring a subset of forward pruning? Was the term razoring used by Birmingham and Kent to distinguish it from the "usual" pruning of the at that time common Shannon Type-B programs?
I actually meant futility vs razoring, not pruning vs razoring.

From what I can tell, futility pruning has the basic meaning of either dropping into quies early or not making a move - just abandoning it. Razoring seems to be the more confusing term and it seems to imply a reduced depth test search of some kind.

If there is a standard definition somewhere that is generally accepted, I am all in favor of using it.
I personally think the term "razoring" should be dropped. pruning is good enough and leaves flexibility in defining what is pruned. Just as reductions is a reasonable term for reducing the search depth for any reason.

I was just thinking back to an argument Ed and I had many years ago, where I had said that one could accomplish exactly the same thing by, rather than extending checks, you reduce the depth of every non-checking move by the same amount. When you think about it, it is obviously correct.

Today we are getting very close to what Amir Ban did/does in Junior with his odd way of counting plies, as now we extend some moves, leave others at the normal depth, and reduce the rest. So technically, some are extended by 2 plies, some are extended by 1 ply and others are not extended at all. Or, stated another way, some are reduced by 2 plies, some are reduced by 1 ply, and the rest are left alone. The only thing that changes, depending on which approach you use, is the reported search depth. Doing the reductions causes you to report a deeper nominal depth, doing the extensions causes you to report a shallower nominal depth, doing the +1/-1 that most are now doing causes you to report a depth between the other two.
User avatar
xsadar
Posts: 147
Joined: Wed Jun 06, 2007 10:01 am
Location: United States
Full name: Mike Leany

Re: futility pruning - razoring

Post by xsadar »

bob wrote:
Don wrote:
Gerd Isenberg wrote:
Don wrote: I don't think anybody really understands the difference between pruning and razoring. I understand all of it, but I don't have a clue about the nomenclature and I think there is no agreement on what to call these things. It has been defined in papers and given names, but they don't seem to be universally accepted.
I am interested in your definition of pruning and razoring. How about some more elaborations and proposals for a nomenclature and classification?

Is razoring a subset of forward pruning? Was the term razoring used by Birmingham and Kent to distinguish it from the "usual" pruning of the at that time common Shannon Type-B programs?
I actually meant futility vs razoring, not pruning vs razoring.

From what I can tell, futility pruning has the basic meaning of either dropping into quies early or not making a move - just abandoning it. Razoring seems to be the more confusing term and it seems to imply a reduced depth test search of some kind.

If there is a standard definition somewhere that is generally accepted, I am all in favor of using it.
I personally think the term "razoring" should be dropped. pruning is good enough and leaves flexibility in defining what is pruned. Just as reductions is a reasonable term for reducing the search depth for any reason.

I was just thinking back to an argument Ed and I had many years ago, where I had said that one could accomplish exactly the same thing by, rather than extending checks, you reduce the depth of every non-checking move by the same amount. When you think about it, it is obviously correct.
It's obviously correct if you only extend checks when depth > 0. Otherwise, this seems incorrect to me. Extending checks by at least one ply at depth == 0 ensures that you never end the main search (enter qsearch) while in check. Reductions obviously cannot do this. Of course if you search checks in qsearch the difference is not as noticeable, but still there is a difference.
Today we are getting very close to what Amir Ban did/does in Junior with his odd way of counting plies, as now we extend some moves, leave others at the normal depth, and reduce the rest. So technically, some are extended by 2 plies, some are extended by 1 ply and others are not extended at all. Or, stated another way, some are reduced by 2 plies, some are reduced by 1 ply, and the rest are left alone. The only thing that changes, depending on which approach you use, is the reported search depth. Doing the reductions causes you to report a deeper nominal depth, doing the extensions causes you to report a shallower nominal depth, doing the +1/-1 that most are now doing causes you to report a depth between the other two.
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: futility pruning - razoring

Post by bob »

xsadar wrote:
bob wrote:
Don wrote:
Gerd Isenberg wrote:
Don wrote: I don't think anybody really understands the difference between pruning and razoring. I understand all of it, but I don't have a clue about the nomenclature and I think there is no agreement on what to call these things. It has been defined in papers and given names, but they don't seem to be universally accepted.
I am interested in your definition of pruning and razoring. How about some more elaborations and proposals for a nomenclature and classification?

Is razoring a subset of forward pruning? Was the term razoring used by Birmingham and Kent to distinguish it from the "usual" pruning of the at that time common Shannon Type-B programs?
I actually meant futility vs razoring, not pruning vs razoring.

From what I can tell, futility pruning has the basic meaning of either dropping into quies early or not making a move - just abandoning it. Razoring seems to be the more confusing term and it seems to imply a reduced depth test search of some kind.

If there is a standard definition somewhere that is generally accepted, I am all in favor of using it.
I personally think the term "razoring" should be dropped. pruning is good enough and leaves flexibility in defining what is pruned. Just as reductions is a reasonable term for reducing the search depth for any reason.

I was just thinking back to an argument Ed and I had many years ago, where I had said that one could accomplish exactly the same thing by, rather than extending checks, you reduce the depth of every non-checking move by the same amount. When you think about it, it is obviously correct.
It's obviously correct if you only extend checks when depth > 0. Otherwise, this seems incorrect to me. Extending checks by at least one ply at depth == 0 ensures that you never end the main search (enter qsearch) while in check. Reductions obviously cannot do this. Of course if you search checks in qsearch the difference is not as noticeable, but still there is a difference.
Today we are getting very close to what Amir Ban did/does in Junior with his odd way of counting plies, as now we extend some moves, leave others at the normal depth, and reduce the rest. So technically, some are extended by 2 plies, some are extended by 1 ply and others are not extended at all. Or, stated another way, some are reduced by 2 plies, some are reduced by 1 ply, and the rest are left alone. The only thing that changes, depending on which approach you use, is the reported search depth. Doing the reductions causes you to report a deeper nominal depth, doing the extensions causes you to report a shallower nominal depth, doing the +1/-1 that most are now doing causes you to report a depth between the other two.
At the time of that discussion, 99% of the chess program authors extended to get out of check, rather than to extend when giving check. I think I was the first to extend when giving check, for that very reason. They sound the same, but they are not quite the same.