Fine, then it isn't alpha/beta searching. This is a "depth-first" search paradigm. If you want to change that, that's ok. But then it isn't a depth-first search strategy because within the classic minimax/alpha-beta search, All scores are backed up from the tips. I suppose you could make such a test if you want to waste the time and branches, because how many positions would that apply in, compared to the 99.99999999% of the positions where there is no forced mate at all.Uri Blass wrote:This is simply not correct.bob wrote:Sorry, in that case you are wrong. If I do a 20 ply search, even after finding a mate in 5, most branches are going to 20 plies. The only ones that won't are the ones that end in a forced mate themselves, or that end in a forced draw. Otherwise there is no way to do a cutoff until you go down to the tip and work your way back up.hgm wrote:You keep bringing up hash hits. This has nothing whatsoever to do with hash hits.
Imagine this is an engine _without_ any hash tables.
If there is a mate-in-4 from the root (7 ply) _no_ other branch from the root will be longer than 5 ply. Even if the requested depth at the root is 49. No hash tables. No hash hits. No hash prunings. Just plain alpha-beta + ID, with the best move of the previous iteration searched first.
Remember. "depth first". So without hash tables, what you are saying will never happen. If it wasn't a depth-first approach, you would have a point, but depth-first behaves exactly as I explained. If you want to try to explain an example, I'll be glad to join in and explain what happens...
If you find a forced mate in 5 you only need to remember the fact that you found mate in 5 to tell you that searching lines of more than 7 plies are useless because they cannot be shorter mate than mate in 5.
You simply decide about rules when not to search based on alpha beta and the ply of the search(you can have rules to change alpha and beta in case that they are mate score based on the ply of the search and when they are mate score you will simply have alpha>=beta and cutoff when the ply is too big).
Uri
So if we are going to talk about non-standard "almost alpha/beta" that is OK. In that case I would always revert to the idea "make the usual/common case fastest". This isn't that either.