Author: Don Dailey
Date: 17:06:35 12/17/97
Go up one level in this thread
On December 17, 1997 at 18:44:05, Robert Hyatt wrote: >On December 17, 1997 at 17:47:16, John Bartkiw wrote: > >>> >>> >>>I use both, because I can try killers before I generate any moves. If I >>>get a cutoff, it is really inexpensive. I didn't notice any particular >>>tree size advantage when I added killers, but I noticed a 10% speed >>>improvement because of trying them before generating any non-capture >>>moves. >>> >> >> Just a question. How can you try killers if you don't know if the >>move is valid? If the last move made the killer not legal. >> >>I've just started working on my program and have noticed that a tonne of >>my cycles are used generating moves. I'm using the bitboard approach >>along with a make move and unmake move function. >> >> To generate my list of moves I make every possible move to see if >>it's valid (ie. doesn't reveal a check) and then after I've done that I >>start the whole search. The making and unmaking of the moves twice >>(once to check if it's valid and then later when actually searching) is >>really killing my nps. >> >> Is there a better approach?? Yes there is. First of generate your moves without any testing. Pretend they are all legal and do your move ordering etc. In many positions you will get a beta cutoff and the tests will be greatly wasted on most of the move list. You should do the same with en-passant captures. Now before you make ANY move you can apply a pre-test to it. It is possible in most cases to quickly determine that no check testing is required. So do not do check testing in these cases, it will save you a lot of time. Look at the "from" square of the move you want to make. Is it on the same diagonal or orthogonal as your king? If not, the move cannot possibly put you into check (unless it's a king move or en-passant) and the test can be a simple table lookup. Of course all of this assumes you are not currently in check! But your program should know this too and you can apply similar very fast tests to this case too. -- Don
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.