As I understand it, engines use so-called "bitboards" to generate the current position & possible moves. I'm wondering if any engine uses the pawn bitboard to refine its search and eval.

To illustrate what I mean, suppose this is the current pawn structure:

[FEN "8/8/8/2p5/1pPp4/pP1P4/P7/B7 w - - 0 1"]

In this pawn structure, impose massive penalties for the Bishop on a1 because it's more or less permanently stuck.

[FEN "8/1pp4p/p2p4/3Pp1p1/2P1Pp2/5P2/PP4PP/8 w - - 0 1"]

In this pawn structure, as White, prioritize searching variations that include the moves b4-c5, and as Black, prioritize searching variations that include h5-g4.

I don't know how many possible pawn bitboards are there, but presumably not too many arise in serious play (a couple hundred perhaps) and one could have handwritten functions for all of them. Some bitboards could even be duplicated, e.g. in the second bitboard it doesn't matter if Black's pawn is on h7 or h6, general plans for both sides remain the same. If there are no special plans for the current pawn structure, one could also default to the current search/eval algorithms.

Question: Is this idea feasible? If so, are there any engines that use it? If not, why not?

EDIT: seems to me that traditional engines could really use something like this, e.g. in this game no less an engine than Stockfish falls into this trap, when in spite of having a firmly entombed bishop, it thought its position was superior.

[FEN "2r3k1/p2n1r2/4q3/2Pp2b1/PP4p1/B4pPp/2Q2P1P/R2R2KB w - - 1 30"]

1 Answer 1


Something very similar is doubtless encoded into AlphaZero and Leela's neural network evaluators, which are very positional. Most conventional Minimax engines, by contrast, are stronger at tactics and can therefore search very deeply.

Pawn structure is indeed a factor in most of the top engines' evaluation. This might take the relatively simple form of rewarding connected pawns and penalising isolated and doubled pawns. The pawn bitboards are mainly a means of recognising when the pawn structure changes (which happens relatively infrequently once established) and recalculating that factor of the evaluation, thereby saving some calculation time.

However, the pawn structure does not directly lead to the bishop mobility analysis you note in your first example. This would be deferred to threat and control maps, which would put any of the bishop's legal moves low on the priority list for further analysis, since they leave the bishop on a threatened square with no support.

  • I'm thinking of traditional engines in this question, and of creating several hundred "if [pawn structure] = [this bitboard] then ..." loops. One could then have "if the pawn structure is as in the first diagram, impose massive penalties for the bishop on a1" kind of handwritten eval, which I've noted today's top engines still enter into.
    – Allure
    Commented Nov 14, 2019 at 3:31
  • I'm not aware of any handwritten position-specific rules of that sort, and I sincerely doubt that you could feasibly develop such detailed rules by hand. Although some instances of pawn structure will be more common than others, the sheer number of even "common" positions is too large, and thoroughly analysing each one would take too long.
    – Chromatix
    Commented Nov 14, 2019 at 5:13
  • too long for the programmer, or for the engine (in the sense that the engine searches to lower depth because it has such loops)? If the former, it still sounds like a possible project to me because it can potentially gain elo.
    – Allure
    Commented Nov 14, 2019 at 5:17
  • Too long for the programmer. And it would only gain elo if the resulting heuristics were more accurate than the simpler heuristics more commonly used, which is very difficult to ensure over such a broad category, without the sort of near-exhaustive analysis that neural-net engines apply. That's why pawn-structure and threat/control map evaluations use featural heuristics as I described, as those are much easier to show the value of.
    – Chromatix
    Commented Nov 14, 2019 at 5:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.