Well, I've done some basic testing just with Negascout (the tree becomes exponentially large at 3+ depth and I'm not sure how to display/visualize the tree). It gives reasonable results for depth 1 and 2 (ie. computer's move and counter move). But it falls apart setting the depth to 3, which would be the computer's second move. It seams that search becomes "unstable". Since my move ordering/scoring puts checking first, it thinks the best move is to place the opponent under check instead of capturing a piece (I'm assuming that it's finding a cutoff to soon?). Henceforth, it will sometimes place a piece that will instantly get captured because it thinks the opponent will go for the check instead. My evaluation function is similar to the following, and I calculate all moves for a ply then sort by score -- high to low.hgm wrote:If you get non-sensical moves, my guess is that you have a search bug. By limiting the search depth to a very low value (like 1 or 2 ply), and examining the tree, it should be easy to find the variations that get a non-sensical score.
Code: Select all
(white material) - (black material) + (huge check bonus)