Author: Roberto Waldteufel
Date: 19:19:24 12/22/98
Go up one level in this thread
On December 22, 1998 at 13:26:10, Sylvain Lacombe wrote: >> >>Hi Sylvain, >> >>Many programmers (myself included) treat positions where the side to move is in >>check differently from other positions in the q-search. If the side to move is >>not in check, we do just as you say, captures and promotions (sometimes a few >>other "threatening" moves eg pawn pushes to the 7th rank), together with the >>"stand pat" option. However, if the side to move is in check, we treat the node >>in the same way as in the main search: no standing pat, and all legal replies >>are searched (not just captures). This way mate can be detected in the q-search, >>although often the side being mated can just stand pat a move earlier. However, >>standing pat a move earlier often changes the terminal evaluation dramatically! >> >>Hope this makes sense, >>Roberto > >Hi Roberto, > > It's starting to make sense. What is a "standing pat". I think this will help >me alot if i know what it is. And it will probably help my engine too! :) > >Thanx, > >Sylvain. Hi Sylvain, OK, let's start at the beginning. In the main search you search all the moves, but in the q-search you only search *some* of the legal moves. Now it may happen that all the captures and promotions turn out to be bad, that is to say that the side to move would be better off not making any of these moves. If you don't search the rest, you could end up thinking a good postion was bad by forcing yourself to make a losing capture. In order to avoid this possibility, we make the assumption that there is at least one "neutral" move among the unexplored moves, so that the side to move can "stand pat" instead of making one of the captures. Standing pat is simply accepting the evaluation function score of the position. So before you examine any moves, you evaluate the position with your static evaluation function. You treat this score as if it had been returned by a move, ie your stand-pat score can cause a beta cut-off, in which case you exit from that node. If the stand pat score does not cause a cut-off, then you search the rest of the moves (ie the caotures and promotions). But you have the advantage of a good alpha value obtained from the stand pat score. If you don't allow standing pat, then you *must* search all the moves. Sometimes it is worth doing this even in q-search, eg when the side to move is in check:- if you don't search all moves at such a node then you will miss mate positions. But once you decide to be selective at a q-search node (as you normally would), standing pat is necessary to compensate for the unsearched moves. Once you implement standing pat, there are other enhancements you can make in the main search at nodes close to the frontier ( the point where you leave the main search and enter the q-search). For example at depth=1, you know that any move you make will allow the opponent to stand pat at the next ply, so if your stand pat score is already well below alpha, then only checks or captures need be considered. This is called "futility pruning", and it can speed up your search quite a lot. Check out Ernst Heinz's articles at the DarkThought web site for more details on futility pruning and similar techniques. Good luck with your program, Roberto
This page took 0 seconds to execute
Last modified: Thu, 15 Apr 21 08:11:13 -0700
Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.