chessalpha-beta-pruningnegamax

Chess engine beta cutoff making engine less threatening?


I'm quite new to chess programming and have ran into a problem with the search. At the moment, my engine has a simple, "standard" negamax search with a basic evaluation function (pure material counts, non-positional).

But the outcome is that given the following FEN:

rnbqkbnr/1ppppppp/p7/7Q/4P3/8/PPPP1PPP/RNB1KBNR b KQkq -

Black doesn't want to make g7g6 to threaten the Queen. If I remove the beta cutoff however, it does. Presumably it sees that white is likely to move the queen resulting in no capture, therefore is not an advantageous position (the evaluated score is equal to beta, not greater, in the if score >= beta check).

I'm assuming the evaluation function probably has something to do with it and needs more than just material counts, but otherwise what sort of things would need to be implemented to make an engine more aggressive?


Solution

  • Alpha/Beta pruning will not give a different result from a normal mini/negamax algorithm. If it does give different result then you have implemented it wrong. Since you haven't shared any code I can't give much more guidance than this from your main issue.

    As for getting a more "aggressive" engine is hard to elaborate on. Everything regarding that is in your evaluation function. You could for example create pawn tables that gives bonus for pawns that are pushed forward which is often seen as aggressive.