But this scaling approach does not help much in locked positions in my opinion since it still maintains a slight advantage for the side with more material, leading to huge, almost endless piece shuffling sequences. My proposal is different: don't just state a vague "the position seems to be drawish" but evaluate it to 0 if there is no piece on either side that can actually do anything useful as long as the pawn chain remains intact.Evert wrote:I would use "number of blocked pawns" as a metric. That is: how many pawns are unable to advance (because they are blocked or would be captured immediately)? The larger this number, the more draw-like the position becomes. Then simply scale the evaluation (the factor could be taken from a table indexed by number of blocked pawns); the scale would be 1 if there are few blocked pawns and become 0 (or close to it) if there are 16 blocked pawns in total. The transition should probably be quite sharp.Sven Schüle wrote: I would vote for a static eval approach in a way that helps to assign a static eval of 0 to special pawn chain positions like the one above, so that search can easily find the queen sac that breaks the pawn chain.
A possible idea would be to write code that detects whether an own piece would ever be able to "cross the pawn chain" and attack targets like undefended enemy pawns (e.g. a2 in the position above) or the enemy king, under the basic assumption that the pawn chain remains unchanged. The black bishop as well as both black rooks are definitely unable to cross the chain: there is no "hole" for the bishop to slip through, and there is also no open or semi-open file for the rooks, and the pawn chain is fully connected. For this reason the black bishop and rooks would have to be evaluated as "zero" (i.e., no material or positional value) since they serve for exactly nothing at the moment. The white bishop also gets "zero" of course. In principle the same holds for the black queen as well except for its ability to attack enemy pawns. But the queen should be evaluated as "zero" as well since otherwise the basic idea would not work.
The definition of a "pawn chain" might even be generalized a bit since each of the enemy pawns could be replaced by any other enemy piece. The key point is to detect whether a given piece (QRBN) "serves for nothing" since its "mobility" is restricted to an "unimportant" area of the board.
The idea can also be extended to knights although these might be able to jump across the chain. Usually they can't do so without being subject to immediate capture in case of a fully connected pawn chain. But here some more thoughts may be needed how to handle knights.
What do others think about that approach? It sounds expensive, of course, but maybe there are some simple bitboard tricks that help to drastically restrict the number of cases where such expensive calculation would be applied. The benefit would be to find the "breaking sac" very quickly through search.
This is a crude approximation of course; the files on which the pawns are blocked are important as well, but all that's really needed is to guide the search in the right direction.
I suspect it may help as "anti-human" chess as well, but overall it's probably wasted effort. I think Crafty used to have similar code in older versions.
Sven